Skip to content

chore: update the workflow responsible for notifying of new TUF spec release - #2001

Merged
jku merged 3 commits into
theupdateframework:developfrom
rdimitrov:dimitrovr/spec-bump-workflow
Aug 30, 2022
Merged

jku merged 3 commits into
theupdateframework:developfrom
rdimitrov:dimitrovr/spec-bump-workflow

Conversation

@rdimitrov

Copy link
Copy Markdown
Contributor

Description of the changes being introduced by the pull request:

The following PR deprecates the use of the existing workflow for notifying of new TUF releases and moves to one that is hosted in the https://github.com/theupdateframework/specification/ repository.

Note: Dependent on - theupdateframework/specification#224

Please verify and check that the pull request fulfills the following
requirements
:

  • The code follows the Code Style Guidelines
  • Tests have been added for the bug fix or new feature
  • Docs have been added for the bug fix or new feature

@coveralls

coveralls commented May 9, 2022 •

Copy link
Copy Markdown

Pull Request Test Coverage Report for Build 2299654911

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.001%) to 98.355%

Totals Coverage Status
Change from base Build 2280279923: 0.001%
Covered Lines: 1202
Relevant Lines: 1218

💛 - Coveralls

# Get the latest TUF specification release and open an issue (if needed)
specification-bump-check:
needs: get-supported-tuf-version
uses: theupdateframework/specification/.github/workflows/check-latest-spec-version.yml@master

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

this does bring to surface a small issue with this approach: We do not want @master in our workflows... but on the other hand, getting dependabot updates to workflows on every spec commit sounds bad (I assume that's how it's going to work).

Hmm...

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

It's a possible drawback, indeed. Unfortunately, I think the only way to change that is to bundle it as a Github Action and create a separate repository just for it.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

In that sense, I'll update the PR and add permissions to the job calling the workflow in order to protect the project from any vulnerabilities coming from the specification repo 👍

version: ${{ steps.get-version.outputs.version }}
steps:
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b
- uses: actions/setup-python@98f2ad02fd48d057ee3b4d4f66525b231c3e52b6

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Quoting @jku from #2089 (comment)

We should definitely set python-version to "3.x" in this workflow and everywhere else where we don't use a specific version.

rdimitrov and others added 3 commits August 30, 2022 09:36
1. update action/setup-python to latest version
2. pin major version to be used to 3.x
3. upgrade pip before using it

1 and 2 were suggested in theupdateframework#2089

Signed-off-by: Lukas Puehringer <[email protected]>
@lukpueh
lukpueh force-pushed the dimitrovr/spec-bump-workflow branch from 04cfad5 to 7baf1d3 Compare August 30, 2022 07:48
@lukpueh

lukpueh commented Aug 30, 2022

Copy link
Copy Markdown
Member

@rdimitrov: This is a friendly takeover of your PR to

  1. rebase and solve conflicts
  2. update action/setup-python to latest version
  3. pin major version to be used to 3.x
  4. upgrade pip before using it

(3) and (4) were suggested by @jku in #2089

Given that the upstream dependent (theupdateframework/specification#224) has been merged and permissions concerns addressed (#2001 (comment)), I suggest this PR is good to go.

This PR also fixes parts of #2089.

@jku jku left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks good I suppose? Using master as the version still does not set a great example but I agree it seems safe.

Thanks!

@jku
jku merged commit 7047475 into theupdateframework:develop Aug 30, 2022
@jku

jku commented Aug 30, 2022

Copy link
Copy Markdown
Member

oops, pip now complains: no such option: -u: I left #2089 open.

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.

4 participants