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

deploy dependabot submodule version update github action across repos #63

Open
kbroch-rivosinc opened this issue Dec 4, 2024 · 14 comments

Comments

@kbroch-rivosinc
Copy link
Collaborator

kbroch-rivosinc commented Dec 4, 2024

Why

Discussed in doc-sig meeting today as an automation step to ease maintenance of repos using submodules. (mostly docs-resources repo)

There's not really a downside to this. Maintainers of the repo can choose whether to merge the dependabot PR but at least with this enabled they will be aware of the change and can simple accept the PR to include it.

Also at least for repos generating extension documentation that will end up in the isa-manual repo, they will see those changes there anyways, so probably better to get ahead of them.

Stat's relating to this

Currently here's the repos using dependabot:

❯ fd -H dependabot.yml
riscv/sig-functional-safety-whitepaper/.github/dependabot.yml
riscv/riscv-isa-manual/.github/dependabot.yml
riscv/docs-spec-template/.github/dependabot.yml
riscv-admin/policies/.github/dependabot.yml

Here's number of repos that could benefit from it:

❯ for dir in $(ls -1 | tr "\n" " "); do echo "$dir: $(find "$dir" -type f -name .gitmodules | wc -l)"; done
riscv:       41
riscv-admin:        4
riscv-collab:        2
riscv-non-isa:       30
riscv-software-src:        3

NOTE: riscv-android-src excluded

Implementation

  • @kbroch-rivosinc will create PR to add the dependabot.yml to repos that can benefit
    • basically using repo foreach to map upstream remote to cherry-pick commit from and push to PR
  • org or repo maintainers enable the use of dependabot (either at the org level or repo level)
@kbroch-rivosinc
Copy link
Collaborator Author

not surprising but means definitely don't deploy this to repo's w/o submodules:
https://github.com/riscv-admin/docs-sig/network/updates/927327612
image

kbroch-rivosinc added a commit that referenced this issue Dec 4, 2024
@wmat
Copy link
Collaborator

wmat commented Dec 5, 2024 via email

@kbroch-rivosinc
Copy link
Collaborator Author

Yes, I will selectively apply based on whether repo has a .gitmodules file.

This was referenced Dec 10, 2024
This was referenced Dec 10, 2024
@kbroch-rivosinc
Copy link
Collaborator Author

Deployment was a bit more involved as I needed to fork the projects as I am not a maintainer on almost all of them. I was able to use gh to automate that. NOTE: gh said I had to fork to an "org" not an "user" but luckily, but that's wasn't hard to just create an org.

After that I just had to define another "downstream" remote of the forks and push to that.

For the creation of the PR's I just clicked on the "Create pull request links" and created them manually in the web browser.

@wmat
Copy link
Collaborator

wmat commented Dec 10, 2024 via email

@kbroch-rivosinc
Copy link
Collaborator Author

Awesome, what's the run frequency of dependabot? Does it monitor the submodule repo for changes?

Run frequency is daily: https://github.com/riscv/docs-spec-template/blob/main/.github/dependabot.yml#L8

Yes, once dependabot.yml file is in place and dependabot settings are enabled, it will run, and generate a PR if the existing submodule ref(s) are behind. ex: riscv/sig-functional-safety-whitepaper#2

Do you think the owners of the orgs should just enable it for everyone? If not, might need to announce to repo owners to do it in order to to see the change.

@wmat
Copy link
Collaborator

wmat commented Dec 10, 2024 via email

@kbroch-rivosinc
Copy link
Collaborator Author

Can I manually trigger dependabot to update the docs-resources by re-running the job?

Haven't tried that. Let me know if it works :)

@wmat
Copy link
Collaborator

wmat commented Dec 10, 2024 via email

@wmat
Copy link
Collaborator

wmat commented Dec 11, 2024 via email

@kbroch-rivosinc
Copy link
Collaborator Author

Can we utilize repo to add or update .github/release.yml? Christian Herber rightfully pointed out to me that dependabot may pollute the changelogs. This can be prevented, by blocking the author dependabot from the changelog https://docs.github.com/en/repositories/releasing-projects-on-github/automatically-generated-release-notes I.e. add a .github/release.yml, with changelog.exclude.authors set to dependabot.

I don't see many/any projects that would be affected by this. Seems like it can wait till it actually becomes a problem.

@wmat
Copy link
Collaborator

wmat commented Dec 11, 2024 via email

tariqkurd-repo pushed a commit to riscv/riscv-cheri that referenced this issue Dec 12, 2024
@kbroch-rivosinc
Copy link
Collaborator Author

The ISA manuals would be hit by this, I think.

Here's the first instance of this. I'll leave it to the maintainers of isa to decide if this "pollutes" the changelog. IMO it is good to see this change occurred as it could have real impact on the resulting release.

@wmat
Copy link
Collaborator

wmat commented Dec 16, 2024 via email

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

2 participants