Closed marco-m closed 2 years ago
Hello @nywilken, would you (or anybody from the Packer team) have time to look at this ? Thanks!
@marco-m apologies can you rebase on to the latest main now that #17 has been merged. And to confirm #17 adds the new snapshot but doesn't remove the old. So this PR fixes that issue, correct?
hello @nywilken !
@marco-m apologies can you rebase on to the latest main now that #17 has been merged.
done
And to confirm #17 adds the new snapshot but doesn't remove the old. So this PR fixes that issue, correct?
This is correct.
Also, as mentioned in the PR description: while developing this feature, I noticed two pre-existing bugs, fixed in commits efcc738 rebase: 930a8e9 and d9b9ba3 rebase: f083f10. Probably worthwile to involve somebody from Hetzener cloud to double-check.
Hello @nywilken friendly ping if you have time :-)
hello @LKaemmerling could you please have a look (or propose somebody else from Hetzener) ? Please pay attention also at the commits that fix pre-existing bugs (see details in this PR description). thanks!
Hey @marco-m,
looks fine from my side. Initially the for loop it was used to show the progress of the action, but as packer never used this it should be save to remove it.
thanks for the quick feedback @LKaemmerling :-)
Thanks @nywilken ! :-)
Thanks @nywilken ! :-)
I'll work on cutting a release of this plugin tomorrow. I would like to pull in the latest Packer SDK change (plumbing change).
This is on top of #17, but unfortunately this GitHub UI doesn't show only the incremental work. Best reviewed commit-per-commit.
With previous PR #17 we detected if a snapshot name was already present and refused to proceed, unless
packer build -force
was specified. If it was specified, then we would add the new snapshot to the existing one.This PR brings the behavior of this plugin completely on par with the expected behavior of
packer build -force
:The overwite is done safely: first a new image is built and a snapshot is taken. Only if the new snapshot is taken with success we then delete the old one.
As for PR #17, this PR comes with full test coverage.
NOTE: while developing this feature, I noticed two pre-existing bugs, fixed in commits
efcc738rebase: 930a8e9 andd9b9ba3rebase: f083f10. Probably worthwile to involve somebody from Hetzener cloud to double-check.Closes #14
EDIT: rebased over master, now this PR contains only commits related to itself.