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

scan-for-updates.yml: only update "automatic" PRs when the package changed? #238

Closed
fingolfin opened this issue Mar 29, 2022 · 2 comments
Closed

Comments

@fingolfin
Copy link
Member

Right now, whenever main changes, scan-for-updates.yml will rebase all open PRs with automatic/FOOBAR branches. On the one hand, this is useful because it re-runs tests against the latest package distro resp. with the latest scripts. On the other hand, it generates quite some load.

Do we really want this? Or should we change things so that the only time the PRs get updated is when upstream changes the package metadata? (That would require additional work on our side).

If we do keep it as it is, then perhaps this behavior should be documented somewhere, so that people down the road don't wonder about it unduly

@fingolfin
Copy link
Member Author

Here are two ways to deal with this:

  1. We can insert additional logic in the create-pull-request which duplicates some logic from the peter-evans/create-pull-request action: i.e., it a automatic/${{ matrix.package }} branch already exists, then it compares the file packages/${{ matrix.package }}/meta.json present locally against the one in the branch; if they do not differ, it skips the step creating/updating the PR.
  2. We move the tools directory again out of the main branch resp. out of this repository. I know, I know, we worked hard on merging the two together, but perhaps this is the simpler solution? Although it wouldn't solve the issue completely, as changes to the .github dir would still trigger updates to those PRs... so I guess we need approach 1 in any case?

@fingolfin
Copy link
Member Author

After some months of gathering experience, I am now convinced we want the tests to re-run in most cases. For exceptions (e.g. PRs for updates/new packages that are known to need more work), I've introduce a label skip tests which can be added to a PR and which will prevent it from spawning a ton of CI jobs each time it is rebased. This can then be set (and later removed) manually for relevant PRs. This has worked well for me in practice.

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

No branches or pull requests

1 participant