-
Notifications
You must be signed in to change notification settings - Fork 4
fix(ci): scope release failure notifications to their channel #424
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎯 Functional Correctness | 🟠 Major | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
Repository: clerk/cli
Length of output: 13586
🏁 Script executed:
Repository: clerk/cli
Length of output: 7346
🌐 Web query:
GitHub Actions job outputs available when producing job fails step outputs needs context always downstream job💡 Result:
In GitHub Actions, if a step fails, the job typically stops executing subsequent steps unless the step that failed uses 'continue-on-error: true' [1][2]. Consequently, outputs from a failed step—or steps that were skipped because of a failure—are generally not available or reliable unless handled specifically [3][1]. To make job outputs available to downstream jobs, you must explicitly define them in the 'jobs.<job_id>.outputs' section of your workflow configuration [4][5]. If a step fails, any output assigned to the job level from that step will typically be empty or behave based on the step's completion status [1]. Key considerations for managing failed step outputs include: 1. 'continue-on-error: true': If you use this on a step that might fail, the step's 'outcome' will be 'failure', but its 'conclusion' will be 'success' [6][1][7]. Because the job continues, you can capture outputs from that step and map them to job outputs [1][7]. Downstream jobs can then access these via the 'needs.<job_id>.outputs.<output_name>' context [4][5]. 2. Accessing Outputs: To check if a step actually failed while using 'continue-on-error', downstream steps or conditions must inspect 'steps.<step_id>.outcome' rather than 'conclusion' [7][2]. 3. Job Result: The 'needs.<job_id>.result' context represents the overall status of the job [6]. If a step fails and 'continue-on-error' is NOT used, the job fails, and subsequent jobs dependent on it via 'needs' will be skipped unless they use an 'if: always' or 'if: failure' condition [3][8]. If 'continue-on-error' is used, the job may still be marked as 'success' overall, which can lead to downstream jobs running even if a step technically failed [7][2][8]. In summary, if you need outputs from a step that might fail, you must use 'continue-on-error: true' to allow the workflow to reach the definition of the job output [1][7]. You should then manually verify the 'outcome' of the specific step in subsequent steps or downstream jobs to ensure the failure is acknowledged [7][2].
Citations:
🏁 Script executed:
Repository: clerk/cli
Length of output: 6560
🏁 Script executed (no clone):
Length of output: 15589
🌐 Web query:
site:github.com/actions/runner job outputs failed job steps outputs needs outputs if always💡 Result:
In GitHub Actions, managing outputs and status when a job or step fails requires understanding how the runner handles context and execution flow. Step Outputs Outputs from steps are explicitly set using the GITHUB_OUTPUT environment file [1]. If a step fails, subsequent steps in the same job are skipped by default. To process outputs from a failing step, you must use the continue-on-error: true setting on that step [2][3]. This allows the step to fail without marking the entire job as failed, enabling you to inspect its outcome or conclusion later [3]. Within a job, you can check the status of a specific step using the steps context [3]: - steps..outcome: The status of the step before considering continue-on-error [3]. - steps..conclusion: The final status of the step after considering continue-on-error [3]. For example: steps: - id: my-step continue-on-error: true run: exit 1 - if: steps.my-step.outcome == 'failure' run: echo "Step failed, but I can still access its outputs if they were set." Job Outputs and Needs Outputs from a previous job are accessed through the needs context [4]. Note that if a job fails, the downstream jobs that depend on it (via needs) are typically skipped by the runner [5]. To allow a downstream job to run even when dependencies fail, you must use the if: always condition [5][6]. When using if: always, the downstream job will execute regardless of the success or failure of its dependencies [6]. Inside this job, you can inspect the result of a needed job using the needs.<job_id>.result expression (which can be 'success', 'failure', 'cancelled', or 'skipped') [7][6]. Important limitations: - continue-on-error: If you set a job step to continue-on-error: true, the job status remains 'success' even if that step fails, which may cause needs.job_id.result to report 'success' [8][6]. - Accessing outputs: If a job fails, its outputs may not be populated correctly. Ensure your workflow logic accounts for the possibility that the needed job did not reach the point of setting those outputs [9].
Citations:
🌐 Web query:
site:github.com/orgs/community/discussions GitHub Actions job outputs failed job always needs outputs💡 Result:
In GitHub Actions, a job's outputs are only produced and made available to subsequent jobs if the job completes successfully. If a job fails, any outputs it was intended to produce will not be registered or accessible by other jobs that depend on them [1]. This behavior occurs because GitHub Actions treats output generation as part of a successful execution flow. If a job is terminated due to an error, the platform does not persist the partial state or outputs, preventing downstream jobs from consuming potentially invalid or incomplete data. If you have a workflow where a downstream job must run regardless of the success of an upstream job, or if you need to pass data despite a failure, consider the following strategies: 1. Continue-on-error: If you want a job to be considered successful even when a step fails (thereby allowing outputs to be generated), you can set continue-on-error: true on the specific step that might fail. This allows the job to proceed and define its outputs [2]. 2. Conditional Execution: Use the if: always condition in downstream jobs if they need to run even when the upstream job fails. Note, however, that these downstream jobs will still not have access to the upstream job's outputs if that job failed [3]. 3. Alternative Persistence: If you need to share information from a failed job, consider uploading the required data as a workflow artifact. Artifacts are persisted even if a job fails, and can be downloaded by subsequent jobs.
Citations:
🏁 Script executed (no clone):
Length of output: 20384
🌐 Web query:
GitHub Actions "needs.job.outputs" "job fails" output available💡 Result:
If a GitHub Actions job output appears empty or is unavailable in a subsequent job, it is typically due to one of the following common causes [1][2][3]: 1. Incorrect Output Definition: The job output must be explicitly mapped in the workflow YAML file [4][5]. Ensure the jobs.<job_id>.outputs section correctly references the step output using the syntax: output_name: ${{ steps.step_id.outputs.step_output_name }} [4][5]. A common mistake is using a different name in the job output mapping than the one defined in the step [1]. 2. Secret/Masked Value Redaction: GitHub Actions automatically redacts outputs that contain secrets or masked values [6][3]. If an output contains a secret (or anything previously masked via add-mask), it will be discarded and appear empty in the dependent job to prevent leakage [6][2][7]. The runner logs will often contain a warning such as: "Skip output '...' since it may contain secrets" [7]. 3. Missing or Incorrect Usage of GITHUB_OUTPUT: Step outputs must be written to the $GITHUB_OUTPUT environment file using the format echo "output_name=value" >> "$GITHUB_OUTPUT" [4][8][5]. Using the deprecated::set-output command or writing to the wrong file will result in the output not being registered [5]. 4. Improper Dependency Configuration: The downstream job must explicitly depend on the job producing the output using the needs keyword [4][3]. The output is then accessed via the context: ${{ needs.job_id.outputs.output_name }} [4][5]. To troubleshoot: - Verify that the step setting the output is using the correct syntax and the $GITHUB_OUTPUT file [4][5]. - Check for secrets: If the data being passed is sensitive, consider an alternative approach such as using a shared artifact (upload/download-artifact) or an encrypted/encoded workaround if secure transfer is required [6][2][7]. - Review logs for any "Skip output" warnings, which confirm that the value is being intentionally redacted [7].
Citations:
🏁 Script executed (no clone):
Length of output: 174
🌐 Web query:
GitHub Actions runner "EvaluateJobOutput" failed job outputs💡 Result:
The term "EvaluateJobOutput" is an internal method name within the GitHub Actions runner source code [1][2] and is not a standard error message exposed to users in workflow logs. If you are encountering issues where job outputs are failing, it is generally due to configuration errors or environment-specific behaviors rather than a failure of this internal function. To troubleshoot and resolve issues with GitHub Actions job outputs: 1. Use the GITHUB_OUTPUT environment file: Ensure you are correctly setting outputs by writing to the file located at$GITHUB_OUTPUT [3]. Older methods like using the set-output command (echo "::set-output name=...") are deprecated and may behave inconsistently, especially on certain operating systems like Windows [3]. 2. Verify shell compatibility: When using self-hosted runners, particularly on Windows, ensure the shell is explicitly set (e.g., shell: bash) if your scripts rely on Linux-style commands, as default shells vary by OS [3]. 3. Check for evaluation errors: If your outputs are not passing between jobs, verify that the downstream job correctly references the upstream job using the needs context (e.g., $ {{needs.job_id.outputs.output_name}}) [4][3]. 4. Enable debug logging: If the cause is unclear, enable step debug logging by adding the secret ACTIONS_STEP_DEBUG to your repository set to true [5]. This provides additional output in your workflow logs that can help identify why an expression failed to evaluate or why an output was not captured [5]. If you see internal runner exceptions in logs related to "EvaluateJobOutput" or similar, this often indicates an issue with the runner environment or a bug in the runner version itself [3]. Ensure your self-hosted runner software is updated to the latest available version [5].
Citations:
🏁 Script executed (no clone):
Length of output: 18162
🏁 Script executed (no clone):
Length of output: 18563
🏁 Script executed:
Repository: clerk/cli
Length of output: 424
Require successful
versioningbefore channel failure notifications.Add
needs.versioning.result == 'success'to both stable and canary conditions. A laterversioningfailure can retainrelease_createdand trigger both a channel alert andnotify-ci-failure.📍 Affects 1 file
.github/workflows/release.yml#L171-L178(this comment).github/workflows/release.yml#L325-L334🤖 Prompt for AI Agents