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 update and convert fixes #433

Merged
merged 3 commits into from
Feb 22, 2018
Merged

pdk update and convert fixes #433

merged 3 commits into from
Feb 22, 2018

Conversation

bmjen
Copy link
Contributor

@bmjen bmjen commented Feb 22, 2018

Fixes two problems:

  1. When convert is run and there are removed files, the summary will throw an error because the removed files set is a set of strings and not a set of hashes.
  2. When pdk update is run on a tagged template, it needs to be able to compare against a tag vs comparing against branches and sha.

@coveralls
Copy link

coveralls commented Feb 22, 2018

Coverage Status

Coverage decreased (-0.04%) to 92.235% when pulling f28b18e on bmjen:fix-update into df6abcf on puppetlabs:master.

data = GIT_DESCRIBE_PATTERN.match(current_template_version)

return version if data.nil?
return version unless version.include?('/')

branch = version.partition('/').last if version.include?('/')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we care about branches with /'s in the name?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The git ref we pull from repos shows up as 'origin/master' or 'refs/heads/master'.

@bmjen bmjen requested a review from scotje February 22, 2018 00:37
When doing starting an update, pdk needs to be able to handle
refs that are tags or branch heads and be able to compare sha when
they are branches.
@scotje
Copy link
Contributor

scotje commented Feb 22, 2018

Bryan and I talked about this more, we think long-term we can stop comparing the refs altogether and just check to see if there are pending changes and report the version of the template that was used, but this works for now.

@bmjen bmjen merged commit 1fdbdb1 into puppetlabs:master Feb 22, 2018
@bmjen bmjen deleted the fix-update branch February 22, 2018 21:04
@bmjen bmjen added the bug label Feb 22, 2018
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.

4 participants