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

Make CI workflows compatible with merge queues #11790

Closed
jade-guiton-dd opened this issue Dec 3, 2024 · 0 comments · Fixed by #11797
Closed

Make CI workflows compatible with merge queues #11790

jade-guiton-dd opened this issue Dec 3, 2024 · 0 comments · Fixed by #11797
Assignees
Labels
github_actions Pull requests that update Github_actions code

Comments

@jade-guiton-dd
Copy link
Contributor

After enabling the merge queue on this repository, a PR was rejected from the merge queue because of two failing checks, changelog and api-compatibility, which were passing in the PR tests. Looking into it, it seems the issue is that these checks rely on the context variables github.event.pull_request.head.sha, github.base_ref, and github.head_ref, which don't exist in merge queue-triggered workflows (docs for github context, docs for github.merge_group). We need to figure out if these checks can be modified to work in merge queues, or if we need to disable them in merge queues entirely.

@jade-guiton-dd jade-guiton-dd added the github_actions Pull requests that update Github_actions code label Dec 3, 2024
@jade-guiton-dd jade-guiton-dd self-assigned this Dec 3, 2024
@jade-guiton-dd jade-guiton-dd moved this from Todo to In Progress in Collector: v1 Dec 4, 2024
@mx-psi mx-psi closed this as completed in 230d7f8 Dec 5, 2024
@github-project-automation github-project-automation bot moved this from In Progress to Done in Collector: v1 Dec 5, 2024
HongChenTW pushed a commit to HongChenTW/opentelemetry-collector that referenced this issue 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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
github_actions Pull requests that update Github_actions code
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

1 participant