Skip to content

Conversation

jku
Copy link
Member

@jku jku commented Aug 20, 2025

  • Update the related Makefile rules
    • Include the signingconfig file we now use
    • Add rule for staging (I kept the rules separate so we don't get issues like Embedded TUF root is not up-to-date #1473 for staging content that can change a lot more often)
  • Remove TUF repository mock from tests to simplify maintenance (see comment further down)
  • Update TUF root for public good instance, both staging and production

The files can be verified by running make update-embedded-root update-embedded-root-staging -- if there's no change to the files in git, they are correct.

jku added 3 commits August 20, 2025 15:23
* Include the new signingconfig file
* Add a rule for updating staging

Signed-off-by: Jussi Kukkonen <jkukkonen@google.com>
Signed-off-by: Jussi Kukkonen <jkukkonen@google.com>
Signed-off-by: Jussi Kukkonen <jkukkonen@google.com>
@jku jku linked an issue Aug 20, 2025 that may be closed by this pull request
@jku jku marked this pull request as draft August 20, 2025 12:30
The mock was useful to ensure we don't e.g. end up downloading files
multiple times but maintaining it is a bit of a hassle: the mock files
have to be kept in sync with actual staging tuf (alternatively we'd
have to create our own local tuf repository which would be another kind
of hassle).

Remove the uses of mock_staging_tuf (except for test_trust_root_tuf_offline
that ensures we do not call tuf repo when offline).

Signed-off-by: Jussi Kukkonen <jkukkonen@google.com>
@jku
Copy link
Member Author

jku commented Aug 20, 2025

I'm removing the TUF mocking from our tests: it was useful to really verify that every request is expected but maintenance is a bit of a hassle. If other maintainers would rather keep it, I can update the test assets instead (need to copy some more files from the tuf repo and update some expected test results).

@jku jku marked this pull request as ready for review August 20, 2025 12:57
@jku jku mentioned this pull request Aug 20, 2025
8 tasks
@woodruffw
Copy link
Member

I'm removing the TUF mocking from our tests: it was useful to really verify that every request is expected but maintenance is a bit of a hassle. If other maintainers would rather keep it, I can update the test assets instead (need to copy some more files from the tuf repo and update some expected test results).

Huge +1 to removing -- I found updating these mocks to be really brittle, so I'm happy to have them gone 🙂

@@ -248,59 +245,6 @@ def test_bad_media_type(self, asset):
# TODO(ww): Move these into appropriate class-scoped tests.


def test_trust_root_tuf_caches_and_requests(mock_staging_tuf, tuf_dirs):
Copy link
Member

Choose a reason for hiding this comment

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

Out of curiosity, can we now remove mock_staging_tuf and tuf_dirs entirely?

Copy link
Member Author

Choose a reason for hiding this comment

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

there's one user: the test that verifies that we don't make requests when offline. That one likely could be refactored so it does not need the mock (should just work with a non-existing repo) but I left it as is for now.

@jku jku merged commit 664b064 into sigstore:main Aug 21, 2025
23 checks passed
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.

Embedded TUF root is not up-to-date
2 participants