fix: add set -eo pipefail to all bash steps in pipeline templates and generated steps#494
Draft
fix: add set -eo pipefail to all bash steps in pipeline templates and generated steps#494
Conversation
… generated steps Agent-Logs-Url: https://github.com/githubnext/ado-aw/sessions/ee7bd3f2-df67-4c0e-bd34-984357737bea Co-authored-by: jamesadevine <4742697+jamesadevine@users.noreply.github.com>
Copilot created this pull request from a session on behalf of
jamesadevine
May 10, 2026 10:06
View session
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Every bash step in the generated pipeline templates now runs with
set -eo pipefail, ensuring that any failure causes an immediate, clearly-failed step — never a green step that silently swallowed an error.Root cause
Several bash steps were missing
set -eo pipefail, including all three "Download agentic pipeline compiler" steps (Agent, Detection, and Execution jobs) and the TriggerFiltersExtension scripts download step. These steps run a checksum pattern:Without
-e(exit on error) and withoutpipefail, a failure ingreporsha256sumwas silently ignored becausemvandchmodwould succeed and become the step's final exit code. The step appeared green despite a checksum failure — exactly the class of bug mentioned in the problem statement.Changes
src/data/base.ymlandsrc/data/1es-base.ymlset -eo pipefailto all 27 bash steps in both templates (Agent, Detection, and Execution jobs)set -o pipefailtoset -eo pipefailgrep | tail -1in "Prepare analyzed outputs" to use|| trueinside the subshell, so an expected no-match doesn't abort thecondition: always()cleanup stepCMD; EXIT=$?toCMD && EXIT=0 || EXIT=$?for compatibility withset -esrc/compile/extensions/trigger_filters.rsset -eo pipefailto the scripts download step (samegrep | sha256sum -c -bug)src/compile/common.rsset -eo pipefailtogenerate_integrity_check("Verify pipeline integrity" step)set -eo pipefailtogenerate_awf_path_step("Generate GITHUB_PATH file" step)set -eo pipefailto theverify_mcp_backendsdebug probe stepsrc/runtimes/lean/mod.rs,src/runtimes/node/mod.rs,src/runtimes/dotnet/mod.rsset -eo pipefailto all generated runtime setup stepssrc/compile/extensions/mod.rsset -eo pipefailtoappend_prompt_step