question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Why filenames instead of rolenames in snapshot?

See original GitHub issue

Previously, we used to allow metadata files nested inside directories, which explains the following text in the specification:

   METAFILES is an object whose format is the following:

       { METAPATH : {
             "version" : VERSION,
             ("length" : LENGTH,)
             ("hashes" : HASHES) }
         , ...
       }

   METAPATH is the file path of the metadata on the repository relative to the
   metadata base URL. For snapshot.json, these are top-level targets metadata
   and delegated targets metadata.

However, I don’t think we need METAPATH anymore. Instead, all we need is to list valid targets rolenames instead, correct?

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:7 (7 by maintainers)

github_iconTop GitHub Comments

2reactions
jkucommented, Jul 12, 2021

After implementing both client and some repo side tools, I still ask the question in the title… Even though all my work has been completely based on normal files, I’ve never had any benefit from the meta keys being filenames. Instead I have had to add code like filename = f"{role}.{ext}" in places that logically should not know about the specific file format, let alone the file extension that is used.

0reactions
lukpuehcommented, Dec 17, 2020

… do we expect a repository to host the same metadata in different data transport formats?

Probably not. It’s just something to think through. Should the client provide a setting for the “role name to metadata filename” conversion? Or should it be inferred from the root metadata payload type? Etc…

Btw. we don’t only use METAPATH in snapshot but also in timestamp, but that probably doesn’t change anything about the argument. Just something to keep in mind.

Also, in Uptane, the notion of files is altogether problematic, and as much as we can avoid details of filesystems, the better.

That makes sense, although that could also be seen as argument for something more generic like URIs, but not necessarily less specific?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Why has my filename changed? - Microsoft Support
When saving files to your personal OneDrive, certain characters are automatically renamed by Office apps, including Word, Excel and PowerPoint.
Read more >
I'd like to have my image filenames / paths when using Jest ...
I'd like to have my image filenames / paths when using Jest Snapshots ; "jest": { "moduleNameMapper": { "^.+\\.(png|jpg|jpeg|gif|eot|otf|webp|svg ...
Read more >
dbt Guide - GitLab
Ideally we would like to stick to {source_name}_{source_table_name}_snapshots as our naming convention. But dbt doesn't allow duplicated file names in projects.
Read more >
Add obsolete snapshot file name to the error message #8287
Feature Proposal Current output {n} obsolete snapshot files found. ... Changes to the default reporter (use custom reporters instead) ...
Read more >
Create DB snapshot without specifying the FILENAME attribute
Is there a way to use some default path for FILENAME instead of copy-pasting the same string 20 x 3 times? Alternatively, is...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found