-
Notifications
You must be signed in to change notification settings - Fork 117
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
[GHA] Remove e2e job dependencies #1733
Conversation
Removing the dependencies isn't ideal, I guess the workflow could depend on the cmake workflow? |
They were added to avoid wasting time on E2E runners if UR doesn't even build or CTS doesn't pass. |
I'll have a look to see what the options are with dependencies then. The workflow dependencies trigger might not have sufficient permissions, though. |
yeeeah, removing these jobs dependencies make sense, cause they won't work here, I guess 😄 but, making dependency to another workflow could be tricky, especially since we want |
ech.. we could revert your latest change, go back to PR trigger, but skip writting comments and always look into the CI log :/ |
or we could add a trigger similar to the current benchmark trigger (on none of these are ideal, I guess |
This might make the most sense in the short term while we try and figure out something nicer. |
No, let's just remove the dependencies if they don't work and reevaluate if we see the jobs waiting too long on runners. |
tbh, I was trying to find something nicer but ended up in this thread: https://github.com/orgs/community/discussions/15452 and related issue: actions/runner#2347 - waiting for the feature from GHA for quite some time... |
Yeah, that's not great UI. |
I browsed the docs once more and I think, @pbalcer was right in the previous PR - it seems this workflow will be using the base branch's SHA, not the merge SHA: docs and the quote:
and a little below
so we'll most likely end up with the the status of |
GitHub Actions feel like a big mess. I'll try adding the checkout PR branch step. For the UI issue, I'm wondering about doing something similiar to |
Seems like the checkout action checked out 9e90dec which is actually the HEAD of this PR. |
wouldn't
It does seem proper, but can this be caused by you opening PR from an upstream branch, not from a fork...? 😉 |
It would be using
Good point! |
9e90dec
to
7140a2d
Compare
7140a2d
to
3308f0a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wouldn't gh pr still require some kind of authentication...? if you'd like to use secret for that, it will not work on pull_request trigger, right...?
It would be using
GITHUB_TOKEN
to authenticate so would still necessitatepull_request_target
trigger to be grantedpull-request: write
permission. This would only workaround the check showing up as red rather than green.
I don't think the gh pr
vs github/script
is a solution. We either got red status from any of the steps not working properly (build, tests, anything) or we make the status green (via continue-on-error
), but hide the real problem from the reviewers in the log.
@@ -59,6 +59,16 @@ jobs: | |||
any_changed: ${{ steps.get-changed.outputs.any_changed }} | |||
steps: | |||
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | |||
|
|||
- name: Fetch PR's merge commit |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we have "approve and run" button for pull_request_target
trigger? If not, we can't blindly fetch content from users in here, especially since it runs on our sel-hosted runners
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Given it shows up in the check UI I would expect the approval and run button also applies but I don't have proof for that.
The more caveats and gotchas turn up the more I'm leaning towards going with #1734 for now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Given it shows up in the check UI I would expect the approval and run button also applies but I don't have proof for that.
I just found in other docs that it's not true, unfortunately:
Workflows triggered by pull_request_target events are run in the context of the base branch. Since the base branch is considered trusted, workflows triggered by these events will always run, regardless of approval settings.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The more caveats and gotchas turn up the more I'm leaning towards going with #1734 for now.
yeah... either this or we come back to idea with dispatch
trigger (like benchmarks)
it seems weird, the config looks like it's taken from your commit, not from Perhaps, remove |
No description provided.