Project

Profile

Help

Task #920

Updated by dkliban@redhat.com almost 9 years ago

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. 

 Deliverables: 

 * 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 [0], 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. 

 clients as old as 2.7.18.  

 * Update any tests and add test coverage for new code 

 [0]:    https://github.com/pulp/pulp_puppet/pull/177/

Back