Skip to content

Do not label auto-generated toolchain PR #2753

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

Closed
wants to merge 2 commits into from

Conversation

tautschnig
Copy link
Member

Description of changes:

Creating the PR with the Z-BenchCI label will not actually trigger the performance benchmarking workflow: that workflow is conditional on the label newly being attached to an existing PR. Consequently, one had to remove and then re-add the label for the workflow to be triggered (see
#2752 for an example).

Resolved issues:

n/a

Related RFC:

n/a

Call-outs:

n/a

Testing:

  • How is this change tested? CI

  • Is this a refactor change? no

Checklist

  • Each commit message has a non-empty body, explaining why the change was made
  • n/a Methods or procedures are documented
  • Regression or unit tests are included, or existing tests cover the modified code
  • My PR is restricted to a single feature or bugfix

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 and MIT licenses.

Creating the PR with the Z-BenchCI label will not actually trigger the
performance benchmarking workflow: that workflow is conditional on the
label newly being attached to an existing PR. Consequently, one had to
remove and then re-add the label for the workflow to be triggered (see
 model-checking#2752 for an example).
@tautschnig tautschnig requested a review from a team as a code owner September 9, 2023 12:09
Copy link
Contributor

@qinheping qinheping left a comment

Choose a reason for hiding this comment

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

LGTM

@celinval
Copy link
Contributor

What if instead of removing the label here, we change the benchCI to run if the PR has the label...

@tautschnig
Copy link
Member Author

What if instead of removing the label here, we change the benchCI to run if the PR has the label...

I’m afraid I haven’t found a good way to put this in a condition for a workflow: AFAIK this requires using the API and cannot be read from a variable directly. But I’m happy to be told otherwise!

@celinval
Copy link
Contributor

Yeah, I think the only way it works is that you trigger the workflow for every PR but you skip the job if the label is not available

@adpaco-aws
Copy link
Contributor

Another option is to add label after the PR has been created, no?

@celinval
Copy link
Contributor

Another option is to add label after the PR has been created, no?

Indeed. I don't know if the bot has permission to label our PRs though.

@tautschnig tautschnig marked this pull request as draft September 15, 2023 07:26
@tautschnig
Copy link
Member Author

Yeah, I think the only way it works is that you trigger the workflow for every PR but you skip the job if the label is not available

I'll try to do something to this effect, the current approach seems dangerous: Updating a branch to the latest changes from main will also quietly skip the Performance workflow even when the "Z-BenchCI" label is present.

@tautschnig tautschnig self-assigned this Sep 15, 2023
@zhassan-aws
Copy link
Contributor

zhassan-aws commented Sep 15, 2023

Another option is to rely on comments on the PR instead of a label:

https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#issue_comment

similar to what is done in the rust compiler, e.g. rust-lang/rust#115684 (comment).

@celinval
Copy link
Contributor

I created #2785 as an alternative. It incorporates these changes and also auto-label our PRs depending on the files that were touched in the PR.

@celinval
Copy link
Contributor

Closing this since the change proposed was incorporated by #2785

@celinval celinval closed this Sep 26, 2023
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.

5 participants