Skip to content
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

[repo] Always execute build-test step #2054

Merged
merged 2 commits into from
Sep 12, 2024
Merged
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
8 changes: 5 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -590,6 +590,7 @@ jobs:
lint-misspell-sanitycheck,
detect-changes,
lint-md,
lint-yml,
lint-dotnet-format,
build-test-exporter-geneva,
build-test-exporter-influxdb,
Expand Down Expand Up @@ -633,7 +634,8 @@ jobs:
build-test-contrib-shared-tests,
verify-aot-compat
]
if: always() && !cancelled() && !contains(needs.*.result, 'failure')
runs-on: windows-latest
if: always() && !cancelled()
runs-on: ubuntu-latest
steps:
- run: echo 'build complete ✓'
- run: |
if ( ${{ contains(needs.*.result, 'failure') }} == true ); then echo 'build failed ✗'; exit 1; else echo 'build complete ✓'; fi
Comment on lines +637 to +641
Copy link
Member

Choose a reason for hiding this comment

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

@Kielek I'm kind of confused by this 😄 build-test is a required status. If it doesn't run (because something failed), that should block the merge by design. Having it run always seems like it would pass the status check even when there was a failure?

Copy link
Member

Choose a reason for hiding this comment

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

Current config for main*:

image

Copy link
Contributor Author

@Kielek Kielek Sep 11, 2024

Choose a reason for hiding this comment

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

Current status:
When ${{ contains(needs.*.result, 'failure') is true (one of the required step is failing) build-status step is not executed. It has skipped status. For some reasons in this case, GitHub unblocks Merge button. Eg. #2052 there were possibility to merge traditional way, without forcing it.

After changes:
build-test is always executed, but when ${{ contains(needs.*.result, 'failure') is true it calls exit 1. It means that step is failing. The merge should be not possible. I was testing it, and seems it is working correctly.

I agree that the GitHub behavior is odd.

Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That's the plan. Same for auto-instrumentation repo.

Loading