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

Fix merge queue CI #11797

Merged
merged 1 commit into from
Dec 5, 2024
Merged

Conversation

jade-guiton-dd
Copy link
Contributor

@jade-guiton-dd jade-guiton-dd commented Dec 4, 2024

Description

This PR removes the merge_group trigger from the two CI checks that failed in merge queues (but not in PRs). See tracking issue for details.

The reasoning for simply disabling them instead of modifying them to work in merge queues is three-fold:

  • For changelog to be meaningful, it needs to only run for PRs with no [chore] title tag or Skip changelog label, but it seems there is no simple way to access this data in merge queue workflows unfortunately. (A possible complicated way may be to parse the ref (PR branch) name and query the title and labels in a script with the gh command.)
  • api-compatibility is never meaningful because it seems to have been broken for a long time (see [CI] 'Inform Incompatible PRs / Check-Compatibility' doesn't work #7443)
  • Both changelog and api-compatibility are checks on the set of changes made by a PR, not on the resulting state of the codebase. As such, their result should not meaningfully change when merged against an old main vs. a newer main, making running them in the merge queue pointless.

Link to tracking issue

Fixes #11790

This should let us try enabling the merge queue again.

Testing

Testing merge queue checks is unfortunately quite difficult, but since we're only disabling checks I don't foresee any issues.

@jade-guiton-dd jade-guiton-dd requested a review from a team as a code owner December 4, 2024 13:41
@jade-guiton-dd jade-guiton-dd added the Skip Changelog PRs that do not require a CHANGELOG.md entry label Dec 4, 2024
Copy link

codecov bot commented Dec 4, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.43%. Comparing base (bc7af62) to head (b88fbab).
Report is 3 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #11797   +/-   ##
=======================================
  Coverage   91.43%   91.43%           
=======================================
  Files         447      447           
  Lines       23745    23745           
=======================================
  Hits        21712    21712           
  Misses       1657     1657           
  Partials      376      376           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@evan-bradley evan-bradley left a comment

Choose a reason for hiding this comment

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

Makes sense to me, thanks for the detailed reasoning.

@mx-psi mx-psi merged commit 230d7f8 into open-telemetry:main Dec 5, 2024
53 of 68 checks passed
@github-actions github-actions bot added this to the next release milestone Dec 5, 2024
@jade-guiton-dd jade-guiton-dd deleted the fix-ci-in-queue branch December 5, 2024 13:35
github-merge-queue bot pushed a commit that referenced this pull request Dec 5, 2024
#### Description

In a previous PR (#11797), I removed the `merge_group` trigger from the
`changelog` and `api-compatibility` CI checks, which don't work properly
in merge queues. However, `changelog` is a required check for the `main`
branch, which means Github will wait for the check status to be reported
even though the job never started, eventually resulting in a timeout and
rejection from the queue. ([see this note in the
docs](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/collaborating-on-repositories-with-code-quality-features/troubleshooting-required-status-checks#status-checks-with-github-actions-and-a-merge-queue))

This PR adds the `merge_group` trigger back in `changelog`, but uses an
`if` to skip it outside of pull requests (which should count as success
for the purposes of the merge queue).
HongChenTW pushed a commit to HongChenTW/opentelemetry-collector that referenced this pull request Dec 19, 2024
#### Description

This PR removes the `merge_group` trigger from the two CI checks that
failed in merge queues (but not in PRs). See tracking issue for details.

The reasoning for simply disabling them instead of modifying them to
work in merge queues is three-fold:
- For `changelog` to be meaningful, it needs to only run for PRs with no
`[chore]` title tag or `Skip changelog` label, but it seems there is no
simple way to access this data in merge queue workflows unfortunately.
(A possible complicated way may be to parse the ref (PR branch) name and
query the title and labels in a script with the `gh` command.)
- `api-compatibility` is never meaningful because it seems to have been
broken for a long time (see open-telemetry#7443)
- Both `changelog` and `api-compatibility` are checks on the _set of
changes_ made by a PR, not on the resulting state of the codebase. As
such, their result should not meaningfully change when merged against an
old main vs. a newer main, making running them in the merge queue
pointless.

#### Link to tracking issue
Fixes open-telemetry#11790

This should let us try [enabling the merge
queue](open-telemetry/community#2469) again.

#### Testing
Testing merge queue checks is unfortunately quite difficult, but since
we're only disabling checks I don't foresee any issues.
HongChenTW pushed a commit to HongChenTW/opentelemetry-collector that referenced this pull request Dec 19, 2024
…1810)

#### Description

In a previous PR (open-telemetry#11797), I removed the `merge_group` trigger from the
`changelog` and `api-compatibility` CI checks, which don't work properly
in merge queues. However, `changelog` is a required check for the `main`
branch, which means Github will wait for the check status to be reported
even though the job never started, eventually resulting in a timeout and
rejection from the queue. ([see this note in the
docs](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/collaborating-on-repositories-with-code-quality-features/troubleshooting-required-status-checks#status-checks-with-github-actions-and-a-merge-queue))

This PR adds the `merge_group` trigger back in `changelog`, but uses an
`if` to skip it outside of pull requests (which should count as success
for the purposes of the merge queue).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Skip Changelog PRs that do not require a CHANGELOG.md entry
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make CI workflows compatible with merge queues
4 participants