Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Dec 5, 2025

Description

Updates the results job in ci.yml to check skip_workflow output on all declared dependencies, not just prepare_for_ci.

Changes:

  • Added checks for needs.tests.outputs.skip_workflow and needs.build_cli_archives.outputs.skip_workflow alongside existing prepare_for_ci check
  • Added comment explaining that workflows without skip_workflow outputs evaluate to empty string, so the check still works ('' != 'true' is true)
if: >-
  ${{ always() &&
      needs.prepare_for_ci.outputs.skip_workflow != 'true' &&
      needs.tests.outputs.skip_workflow != 'true' &&
      needs.build_cli_archives.outputs.skip_workflow != 'true' &&
      (contains(needs.*.result, 'failure') ||
       contains(needs.*.result, 'cancelled') ||
       contains(needs.*.result, 'skipped')) }}

This makes the workflow more maintainable for when additional dependencies may also define skip_workflow outputs.

Checklist

  • Is this feature complete?
    • Yes. Ready to ship.
    • No. Follow-up changes expected.
  • Are you including unit tests for the changes and scenario tests if relevant?
    • Yes
    • No
  • Did you add public API?
    • Yes
    • No
  • Does the change make any security assumptions or guarantees?
    • Yes
    • No
  • Does the change require an update in our Aspire docs?
    • Yes
    • No
Original prompt

Update the results job to check for skip_worfklow on all the dependencies that have been declared.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI changed the title [WIP] Update results job to check for skip_workflow on dependencies Update results job to check skip_workflow on all declared dependencies Dec 5, 2025
Copilot AI requested a review from captainsafia December 5, 2025 20:28
Copilot finished work on behalf of captainsafia December 5, 2025 20:28
@github-actions
Copy link
Contributor

github-actions bot commented Dec 5, 2025

🚀 Dogfood this PR with:

⚠️ WARNING: Do not do this without first carefully reviewing the code of this PR to satisfy yourself it is safe.

curl -fsSL https://raw.githubusercontent.com/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 13353

Or

  • Run remotely in PowerShell:
iex "& { $(irm https://raw.githubusercontent.com/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 13353"

@captainsafia captainsafia marked this pull request as ready for review December 5, 2025 20:31
Copilot AI review requested due to automatic review settings December 5, 2025 20:31
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the results job in the CI workflow to check the skip_workflow output on all declared dependencies (prepare_for_ci, tests, and build_cli_archives), not just prepare_for_ci. This makes the workflow more maintainable for future changes where additional dependencies might define skip_workflow outputs.

Key Changes

  • Added skip_workflow checks for needs.tests.outputs.skip_workflow and needs.build_cli_archives.outputs.skip_workflow
  • Added explanatory comment about how workflows without skip_workflow outputs are handled
  • Maintains existing behavior since the new checks evaluate to true (empty != 'true') for workflows that don't define skip_workflow outputs

Comment on lines +89 to +91
# 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).
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.
@joperezr
Copy link
Member

joperezr commented Dec 5, 2025

@radical can you please TAL?

@joperezr joperezr requested a review from radical December 5, 2025 20:34
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?

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.

4 participants