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

feat: add reusable workflow for autofilling an issue when there's a new TUF version #224

Merged

Conversation

rdimitrov
Copy link
Contributor

The following adds a workflow that can be used by projects that want to keep track and be notified when there's a new version of the TUF specification.

In case there's a newer version, it will file an issue against the project with several links, like the currently supported version, and a comparison showing what's changed. Here's an example of the issue it will create -

Title:

TUF specification has a new version - v1.0.30

Body:

Hey, it seems there's a newer version of the TUF specification - v1.0.30

The version which rdimitrov/python-tuf state it supports is - v1.0.29

The following is a comparison of what changed between the two versions - Compare v1.0.29 to v1.0.30

Please review the newer version and address the changes.

Note:
A few other PRs will be created and referenced here for https://github.com/theupdateframework/python-tuf and https://github.com/theupdateframework/go-tuf which can serve as examples of how to use this workflow.

Related to - theupdateframework/go-tuf#283

@jku
Copy link
Member

jku commented May 10, 2022

I have a question on permissions: can the python-tuf workflow define a permission so that the embedded action can't override that?

I'm asking in context of the @master versioning in the workflow... If python-tuf can't practically limit the permission, then a compromised specification repo would immediately compromise the python-tuf repo as well if we use @master

link: theupdateframework/python-tuf#2001 (comment)

@rdimitrov
Copy link
Contributor Author

I have a question on permissions: can the python-tuf workflow define a permission so that the embedded action can't override that?

I'm asking in context of the @master versioning in the workflow... If python-tuf can't practically limit the permission, then a compromised specification repo would immediately compromise the python-tuf repo as well if we use @master

link: theupdateframework/python-tuf#2001 (comment)

Yes, you should be able to either set the permissions for a specific job or for the whole workflow 👍

ref: Github Actions/permissions

Copy link
Member

@joshuagl joshuagl left a comment

Choose a reason for hiding this comment

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

Can we add a comment to the top of the reusable workflow which includes a one-line description of what the workflow does and includes an example of how to use it?

It might also be worth mentioning in the README that the reusable workflow exists and implementers can use it to be notified of when new specification versions are released? This could also be a follow-on PR if preferred.

@rdimitrov
Copy link
Contributor Author

Can we add a comment to the top of the reusable workflow which includes a one-line description of what the workflow does and includes an example of how to use it?

It might also be worth mentioning in the README that the reusable workflow exists and implementers can use it to be notified of when new specification versions are released? This could also be a follow-on PR if preferred.

Thanks! I've addressed the suggestions 👍

joshuagl
joshuagl previously approved these changes May 16, 2022
Copy link
Member

@joshuagl joshuagl left a comment

Choose a reason for hiding this comment

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

This is great, thanks!

@joshuagl
Copy link
Member

Could we get a second review here from an @theupdateframework/tap-editors ?

@JustinCappos
Copy link
Member

JustinCappos commented May 21, 2022 via email

lukpueh
lukpueh previously approved these changes May 23, 2022
Copy link
Member

@lukpueh lukpueh left a comment

Choose a reason for hiding this comment

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

This is really great! And it LGTM, modulo a copy-pasted typo, some trailing whitespace and a line-wrap nit. Feel free to address or ignore. I'll approve as is.

Note, I also diffed the script with python-tuf's specification-version.yml, which we know works and probably served as a base for this workflow(?). It looks like they do the same thing.

README.rst Outdated Show resolved Hide resolved
.github/workflows/check-latest-spec-version.yml Outdated Show resolved Hide resolved
.github/workflows/check-latest-spec-version.yml Outdated Show resolved Hide resolved
.github/workflows/check-latest-spec-version.yml Outdated Show resolved Hide resolved
.github/workflows/check-latest-spec-version.yml Outdated Show resolved Hide resolved
@rdimitrov rdimitrov dismissed stale reviews from lukpueh and joshuagl via dedff00 May 25, 2022 13:33
@rdimitrov
Copy link
Contributor Author

This is really great! And it LGTM, modulo a copy-pasted typo, some trailing whitespace and a line-wrap nit. Feel free to address or ignore. I'll approve as is.

Note, I also diffed the script with python-tuf's specification-version.yml, which we know works and probably served as a base for this workflow(?). It looks like they do the same thing.

Thanks for the review! 👍 I've used it as a base so thus the reason for the PR in python-tuf which discards the old one and switches to the one that will be hosted here - theupdateframework/python-tuf#2001

@rdimitrov rdimitrov requested review from lukpueh and joshuagl May 25, 2022 13:42
@lukpueh
Copy link
Member

lukpueh commented May 25, 2022

This is really great! And it LGTM, modulo a copy-pasted typo, some trailing whitespace and a line-wrap nit. Feel free to address or ignore. I'll approve as is.
Note, I also diffed the script with python-tuf's specification-version.yml, which we know works and probably served as a base for this workflow(?). It looks like they do the same thing.

Thanks for the review! 👍 I've used it as a base so thus the reason for the PR in python-tuf which discards the old one and switches to the one that will be hosted here - theupdateframework/python-tuf#2001

Oh yeah, it was not meant as a criticism, but more as a this has already been reviewed elsewhere, so it should be fine statement. :)

@mnm678 mnm678 merged commit 0ec72e4 into theupdateframework:master May 27, 2022
@rdimitrov rdimitrov deleted the dimitrovr/spec-bump-workflow branch May 27, 2022 16: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.

6 participants