Skip to content

fix(exec): use client err for substitution failures and delay PlanStep#701

Merged
ecrupper merged 1 commit into
mainfrom
fix/contextual-error-with-subst
Apr 30, 2026
Merged

fix(exec): use client err for substitution failures and delay PlanStep#701
ecrupper merged 1 commit into
mainfrom
fix/contextual-error-with-subst

Conversation

@ecrupper
Copy link
Copy Markdown
Contributor

Any substitution errors were failing silently and not being relayed to the user in any fashion. Further, because PlanStep was executed before the substitution, the step is marked as running and is not properly cleaned up.

By using c.err, the build will bomb out expectedly if there's a container config breaking error and will also set the upcoming step as skipped instead of success when it's all said and done.

Example Pipeline:

version: "1"

steps:
  - name: sleepy
    image: hub.docker.target.com/alpine:latest
    commands:
      - sleep 5

  - name: mess up
    image: hub.docker.target.com/alpine:latest
    parameters:
      tags:
        - ${VELA_BUILD_NUMBER:0:8} // FAILED SUBSTITUTION (number cannot be indexed :0:8)
    commands:
      - echo "This is a test"

BEFORE:
Screenshot 2026-04-30 at 1 02 03 PM

AFTER:
Screenshot 2026-04-30 at 1 02 43 PM

@ecrupper ecrupper requested a review from a team as a code owner April 30, 2026 18:03
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 30, 2026

Codecov Report

❌ Patch coverage is 57.14286% with 6 lines in your changes missing coverage. Please review.
✅ Project coverage is 52.67%. Comparing base (38835a1) to head (062ab61).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
executor/linux/build.go 40.00% 3 Missing and 3 partials ⚠️
Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #701   +/-   ##
=======================================
  Coverage   52.67%   52.67%           
=======================================
  Files         130      130           
  Lines        5635     5635           
=======================================
  Hits         2968     2968           
  Misses       2438     2438           
  Partials      229      229           
Files with missing lines Coverage Δ
executor/linux/stage.go 73.78% <100.00%> (ø)
executor/linux/build.go 67.36% <40.00%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@ecrupper ecrupper merged commit 8ae8b6f into main Apr 30, 2026
12 of 13 checks passed
@ecrupper ecrupper deleted the fix/contextual-error-with-subst branch April 30, 2026 19:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants