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

bw test: Can we make a test that shows all “unused” metadata keys? #624

Open
vain opened this issue Apr 29, 2021 · 3 comments
Open

bw test: Can we make a test that shows all “unused” metadata keys? #624

vain opened this issue Apr 29, 2021 · 3 comments

Comments

@vain
Copy link
Member

vain commented Apr 29, 2021

I just added some metadata to a node:

'backuptool': {
    'retention': '5d',
},

It should have been this instead:

'backups': {
    'retention': '5d',
},

So, my initial change didn’t have any effect, it was just dead metadata.

Can we add something to bw test that shows all keys which are never read by anything? This would probably need a list of keys (probably in the format some/key/path to allow for deeper stuff) which should not be reported.

@trehn
Copy link
Member

trehn commented Apr 29, 2021

Yes, shouldn't be too hard.

@trehn
Copy link
Member

trehn commented Apr 29, 2021

This would have to be a test covering every node at once. Checking just a single node for unused metadata would produce many false positives (extra metadata added by a group or bundle; or metadata that is only read by another node).

@trehn
Copy link
Member

trehn commented Apr 29, 2021

I think the way to do this would be to build two set of metadata key paths while building the entire repo (including files). One set for every metadata key path on all nodes and another set for every path read while building the repo. When done, diff the sets. Extra credit for storing or finding the nodes with the unused paths so users won't have to do it manually.

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

2 participants