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

repository debug dump refactor: support versioned metadata and dumping artifacts #112

Open
jku opened this issue Aug 6, 2024 · 3 comments

Comments

@jku
Copy link
Member

jku commented Aug 6, 2024

--repository-dump-dir currently dumps current metadata that repository is serving.

If it is seen useful, we could also output the targets we are serving:

  • could create the directory structure that the web server is using
  • the artifact filename should be hash prefixed I suppose
@jku
Copy link
Member Author

jku commented Aug 6, 2024

I'm not 100% sure this is worth the amount of work but the use case I'm thinking of is manual debugging

  • Run test, dump repo
  • the dump content tries to accurately match the http server contents
  • user can run python -m http.server or similar and the manually run their client against that server to see what happens

(this sequence could even be automated into a debug tool but that's step 2)

@jku
Copy link
Member Author

jku commented Aug 12, 2024

the dump content tries to accurately match the http server contents

this does not happen currently for the metadata dump: current dump tries to be as readable and diffable as possible so e.g. version numbers are not used in filenames

@jku
Copy link
Member Author

jku commented Aug 16, 2024

This might be something we want as it makes it possible to run other clients against a repository version (say, example client from python-tuf) for debugging purposes.

What would need to happen for metadata:

  • change the dump method so that every other metadata file is prefixed with version except timestamp
  • there should be an additional metadata directory, so e.g. if dump dir is /tmp/tuf-conformance-dump then test_basic_init_and_refresh metadata goes in /tmp/tuf-conformance-dump/test_basic_init_and_refresh/refresh-1/metadata/

and then artifacts

  • artifacts for the same test go in /tmp/tuf-conformance-dump/test_basic_init_and_refresh/refresh-1/targets/
  • artifact targetpath subdirectories should be created and hash prefix should be used. so "a/artifact" would go in
    /tmp/tuf-conformance-dump/test_basic_init_and_refresh/refresh-1/targets/a/<HASH>.artifact

@jku jku changed the title repository debug dump: support dumping artifacts repository debug dump refactor: support versioned metadata and dumping artifacts Aug 16, 2024
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

1 participant