Skip to content

generate_new_metadata in tidy_backup_clean.rb needs to preserve metadata.json #105

@lamont-granquist

Description

@lamont-granquist

If the cookbook has a metadata.json that file should never be stripped, removed or tampered with at all (no matter if metadata.rb exists or not, client programs should never attempt to regenerate metadata.json from the metadata.rb in the cookbook if it is present, the metadata.json file MUST be considered authoritative. The metadata.rb file MAY require build time artifacts which are not present in the shipping cookbook and trying to recompile it after the metadata.json has been generated is guaranteed to fail on some cookbooks.

If the cookbook has a metadata.rb file that should also not be tampered with, but it should also be ignored completely if the metadata.json file is present (so if the metadata.json and metadata.rb files are present then nothing should be done with either file THE metadata.rb file may not be parseable and THIS IS NOT A BUG TO FIX -- downstream utilities must be modified to prefer the metadata.json file.

ONLY IF one of the files exists and the other does not should knife tidy attempt to generate or reconstruct one from the other.

I can't sort out precisely what knife tidy is actually doing, but I'm reasonably confident it isn't following these guidelines.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Status: UntriagedAn issue that has yet to be triaged.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions