Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,13 +86,18 @@ jobs:
steps:
- name: Fail if any of the dependent jobs failed
# Don't fail if the workflow is being skipped.
# Check skip_workflow on all declared dependencies. Workflows without
# skip_workflow outputs (e.g., tests, build_cli_archives) evaluate to
# empty string, so the check still works ('!= true' is true for empty).
Comment on lines +89 to +91
Copy link

Copilot AI Dec 5, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The comment claims that tests and build_cli_archives workflows don't have skip_workflow outputs, which is correct. However, the comment then suggests these checks "still work" because empty strings evaluate to != 'true'.

This is misleading because if these workflows don't have skip_workflow outputs, then checking needs.tests.outputs.skip_workflow != 'true' and needs.build_cli_archives.outputs.skip_workflow != 'true' is redundant and serves no functional purpose. These checks will always evaluate to true (since the outputs don't exist and will be empty/null), making them no-ops.

The comment should either:

  1. Clarify that these checks are added proactively for future maintainability (in case these workflows add skip_workflow outputs later), or
  2. Acknowledge that these specific checks are currently redundant but included for consistency

The current wording implies these checks are actively doing something useful, when they're effectively no-ops given the current workflow definitions.

Suggested change
# Check skip_workflow on all declared dependencies. Workflows without
# skip_workflow outputs (e.g., tests, build_cli_archives) evaluate to
# empty string, so the check still works ('!= true' is true for empty).
# Check skip_workflow on all declared dependencies. Note: tests and build_cli_archives
# do not currently produce skip_workflow outputs, so these checks are redundant and always true.
# They are included for consistency and future maintainability, in case these jobs add such outputs later.

Copilot uses AI. Check for mistakes.
#
# For others 'skipped' can be when a transitive dependency fails and the dependent job gets
# 'skipped'. For example, one of setup_* jobs failing and the Integration test jobs getting
# 'skipped'
if: >-
${{ always() &&
needs.prepare_for_ci.outputs.skip_workflow != 'true' &&
needs.tests.outputs.skip_workflow != 'true' &&
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you help me understand what use case this would be helpful for?

needs.build_cli_archives.outputs.skip_workflow != 'true' &&
(contains(needs.*.result, 'failure') ||
contains(needs.*.result, 'cancelled') ||
contains(needs.*.result, 'skipped')) }}
Expand Down
Loading