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

Implement workflows for dependency updates #979

Merged
merged 3 commits into from Oct 22, 2021

Conversation

CasperWA
Copy link
Member

Closes #958

These workflows are similar to the ones in the OPTIMADE Gateway (see https://github.com/Materials-Consortia/optimade-gateway).

The following is done:

  • Run Dependabot updates every Monday at 5 UTC.
  • Merge into/reset permanent, dedicated dependabot branch whenever there is a new push to master (the default branch).
  • Create a PR every Wednesday at 6:30 UTC, requesting to merge a copy of the dedicated dependabot branch into master.
    As a bonus, before opening this PR, an attempt is made at also updating the pre-commit hooks and running pre-commit to commit any changes.
  • Enable "auto-merge" for all Dependabot-created PRs.

Remaining issues/manual labour:

  • Update setup.py with dependencies according to the Wednesday PR.
  • Fix pre-commit if issues arise when running it.
  • Fix Dependabot dependency PRs if they do not pass the CI tests.

These workflows are similar to the ones in the OPTIMADE Gateway (see
https://github.com/Materials-Consortia/optimade-gateway).

The following is done:
- Run Dependabot updates every Monday at 5 UTC.
- Merge into/reset permanent, dedicated dependabot branch whenever there
  is a new push to `master` (the default branch).
- Create a PR every Wednesday at 6:30 UTC, requesting to merge a copy of
  the dedicated dependabot branch into `master`.
  As a bonus, before opening this PR, an attempt is made at also
  updating the `pre-commit` hooks and running `pre-commit` to commit any
  changes.
- Enable "auto-merge" for all Dependabot-created PRs.

Remaining issues/manual labour:
- Update `setup.py` with dependencies according to the Wednesday PR.
- Fix `pre-commit` if issues arise when running it.
- Fix Dependabot dependency PRs if they do not pass the CI tests.
@codecov
Copy link

codecov bot commented Oct 20, 2021

Codecov Report

Merging #979 (4407117) into master (98175d3) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #979   +/-   ##
=======================================
  Coverage   92.92%   92.92%           
=======================================
  Files          67       67           
  Lines        3787     3787           
=======================================
  Hits         3519     3519           
  Misses        268      268           
Flag Coverage Δ
project 92.92% <ø> (ø)
validator 92.92% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.


Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 98175d3...4407117. Read the comment docs.

Need to checkout repository.
Copy link
Contributor

@JPBergsma JPBergsma left a comment

Choose a reason for hiding this comment

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

Good idea to automate the dependency updates further.
I did not see anything wrong with the changes you made but I do think it would be good if Matthew looked at it as well as I do not know much about setting up git actions.

Copy link
Member

@ml-evs ml-evs left a comment

Choose a reason for hiding this comment

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

This will definitely save some time, thanks @CasperWA!

Couple of general comments:

  • I can foresee is occasionally we have to manually ask dependabot to recreate PRs after another PR has been merged into dependabot_updates. We can see how we go with it though.
  • What happens if we don't merge the Wednesday PR before the next one is created? It looks like the dependabot branch gets reset either way?

A few specific comments:

.github/dependabot.yml Outdated Show resolved Hide resolved
.github/workflows/ci_automerge_dependabot.yml Show resolved Hide resolved
.github/utils/single_dependency_pr_body.txt Outdated Show resolved Hide resolved
.github/workflows/ci_dependabot.yml Show resolved Hide resolved
.github/workflows/ci_dependabot.yml Show resolved Hide resolved
@CasperWA
Copy link
Member Author

Couple of general comments:

  • I can foresee is occasionally we have to manually ask dependabot to recreate PRs after another PR has been merged into dependabot_updates. We can see how we go with it though.

It might. However, since we're not making changes to the PRs when activating the auto-merge it shouldn't be crucial.
But then again, since we're disabling the automatic rebasing - yeah...

  • What happens if we don't merge the Wednesday PR before the next one is created? It looks like the dependabot branch gets reset either way?

Bad things could happen I think. I haven't tested this. Although I think it may just delete/overwrite the ci/update-dependencies burner branch with the newer updates from dependabot_updates?
It's worth maybe looking at the action documentation, specifically this section.

@CasperWA CasperWA requested a review from ml-evs October 21, 2021 14:07
Copy link
Member

@ml-evs ml-evs left a comment

Choose a reason for hiding this comment

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

Thanks @CasperWA, let's see how this goes 🙃

@CasperWA CasperWA merged commit 8d94df0 into master Oct 22, 2021
@CasperWA CasperWA deleted the close-958-automate-dependency-updates branch October 22, 2021 15:42
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.

Automate dependency workflow further
3 participants