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

(PDK-736) Improve handling of old template-url and template-ref #397

Merged
merged 1 commit into from
Dec 20, 2017

Conversation

scotje
Copy link
Contributor

@scotje scotje commented Dec 19, 2017

Previously, if the user had the old puppetlabs/pdk-module-template URL
saved in their answers.json, PDK would still try to use the old repo but
attempt to reset to the 1.3.0 tag which doesn't exist in the old repo.
This commit starts treating a value matching the old repo URL the same
as if there is no template URL specified so that it uses the new
template URL instead.

Furthermore, if the user had a real custom template repo, we were still
attempting to reset to the 1.3.0 tag which probably won't exist in
their custom repo. After this commit, pdk will only try to reset to the
pinned tag when using the official template repo (or packaged repo).

Previously, if the user had the old puppetlabs/pdk-module-template URL
saved in their answers.json, PDK would still try to use the old repo but
attempt to reset to the `1.3.0` tag which doesn't exist in the old repo.
This commit starts treating a value matching the old repo URL the same
as if there is no template URL specified so that it uses the new
template URL instead.

Furthermore, if the user had a real custom template repo, we were still
attempting to reset to the `1.3.0` tag which probably won't exist in
their custom repo. After this commit, pdk will only try to reset to the
pinned tag when using the official template repo (or packaged repo).
@scotje scotje requested a review from rodjek December 19, 2017 20:45
@coveralls
Copy link

Coverage Status

Coverage increased (+0.05%) to 93.2% when pulling 21de2a4 on scotje:736_cached_template_url into f996204 on puppetlabs:master.

@HelenCampbell
Copy link
Contributor

Tested this with "template-url": "https://github.com/puppetlabs/pdk-module-template" in the answers file.
Seems to pick up the correct version of the template fine.
Did a convert on ntp and was successful with "template-url": "https://github.com/puppetlabs/pdk-templates" and "template-ref": "1.3.0-0-g632fa63" showing in the metadata.
Will create a separate ticket for the cached url being incorrect. Aside from that, merging this.
Thanks Jessie!

@HelenCampbell HelenCampbell merged commit 61aa64c into puppetlabs:master Dec 20, 2017
@scotje scotje deleted the 736_cached_template_url branch December 20, 2017 17:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants