[PDK-739] The cached version of the template url in the answer file can be out of sync with the actual template used Created: 2017/12/20  Updated: 2018/01/18  Resolved: 2018/01/08

Status: Closed
Project: Puppet Development Kit
Component/s: None
Affects Version/s: None
Fix Version/s: PDK 1.3.2

Type: Bug Priority: Major
Reporter: Helen Campbell Assignee: Tim Sharpe
Resolution: Fixed Votes: 0
Labels: resolved-issue-added
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Acceptance Criteria:
  • Manually update the ~/.pdk/answers.json with a bad template-url entry. Try to generate a module and verify that you see a warning message, but the module successfully generates using the default template.
Epic Link: PDK Maintenance
Team: Puppet Developer Experience
Method Found: Needs Assessment
Release Notes: Known Issue
Release Notes Summary: When creating or converting a module, and there is a saved template-url value in the answers file, the PDK will now check that the repository specified in the template-url answer exists and fall back to using the default template if it doesn't.
QA Risk Assessment: Needs Assessment


The cached answer file is no longer syncing properly with the actual template used with the pdk.

Steps to replicate:

vim ~/.pdk/cache/answers.json

Run the above command and change the template url to the old template repo like so:
"template-url": "https://github.com/puppetlabs/pdk-module-template",

Then run your local pdk against a module using the 'convert' command.

Check the details within metadata.json and you can see the values won't match the template actually used:

"template-url": "https://github.com/puppetlabs/pdk-templates",
"template-ref": "1.3.0-0-g632fa63"

A solution is to possibly remove this key from the answers file entirely - else we need to make sure this value is actually up to date with the template used.

Comment by Bryan Jen [ 2018/01/03 ]

If the template url in the answers file fails to clone, we should show a warning/info message to the user and proceed with generating using the default template-url.

Generated at Sun May 31 14:05:35 PDT 2020 using Jira 8.5.2#805002-sha1:a66f9354b9e12ac788984e5d84669c903a370049.