As a user, I can rely on Pulp server to compute the Puppet unit key in all cases
Currently the unit_key can be optionally submitted by the client. There aren't any use cases for Puppet content which require the client to need to specify the unit key when the metadata.json file contains everything needed for the server to compute this. The optional-ness has caused at least one bug (#890) and is overly complex. This story is an attempt to square up to that problem.
These deprecations need to be done as part of an X or Y release, not a Z.
- Consolidate the metadata.py module to eliminate many codepaths. The server logic will simplify. It should only look for the metadata.json in the "first folder". This logic is already in there from this PR , but all the extra .tar.gz extractions, special finding code, etc should be removed.
- Stop the CLI from sending the unit_key when it calls /pulp/api/v2/repositories/<repo_id>/actions/import_upload/
- Add a release note deprecating unit_key as a valid parameter to /pulp/api/v2/repositories/<repo_id>/actions/import_upload/
- Add documentation to the Puppet docs that have the following:
- The unit_key parameter to /pulp/api/v2/repositories/<repo_id>/actions/import_upload/ is deprecated and ignored
- The server always computes the unit_key for uploaded Puppet modules based on the metadata (there is already a codepath for this today)
- The format of the unit key the server computes
- The requirements that Puppet modules adhere to the Puppet 3.6+ guidelines which require metadata and that metadata be expressed with metadata.json
- The requirements that uploaded modules have exactly one Puppet module in them. Extra folders may cause unexpected behavior. Failure to find metadata.json will result in a failure.
- A Note stating that even though puppet modules have to adhere to Puppet 3.6+ guidelines, these modules can still be installed using older puppet clients.
- Update any tests and add test coverage for new code
Removed generation of unit key based on file name of puppet module
This patch ensures that pulp-admin submits an empty string when making a request to upload a puppet module. The unit key is generated on the server based on the content of metadata.json found in the top level directory of a puppet module.
#7 Updated by email@example.com over 6 years ago
- Status changed from POST to MODIFIED
- % Done changed from 0 to 100
Applied in changeset pulp_puppet:61be099fd4226255ff076ad86c9b6386cf48a79d.
Please register to edit this issue