Skip to content

Instantly share code, notes, and snippets.

@h4xnoodle
Created November 8, 2019 03:59
Show Gist options
  • Save h4xnoodle/f2b3919c6f04ce4a88b1cae61c468f35 to your computer and use it in GitHub Desktop.
Save h4xnoodle/f2b3919c6f04ce4a88b1cae61c468f35 to your computer and use it in GitHub Desktop.
bosh faster prepare deployment diff
does the unrendered template have a fingerprint?
can i build list of template's used properties? probably with ruby magic
can also warn about unused properties here as a bonus side-effect feature
inputs to final template
template itself (fingerprint unrendered)
job property values from manifest directly (ordered & hashed?)
credhub variables (version ids)
compare properties from manifest that would be used in the template
not entirely sure how yet. unless we have digest(template + manifest var vals) stored vs digest(template)
values are technically stored in old manifest (!) grab there
can also detect any that have been added (and required, prevent job failure) or gone away
compare target template fingerprint with current
if there is a change
then defer a renrender
all variables in template that will be interpolated
compare current version with version returned in get current from credhub
if versions are different
then there will be potentially a different value so defer rerender
otherwise, nothing has changed
rerender prior to sending templates
also if converge or overwrite variables update_mode is set to !nooverwrite check first to short circuit hard. don't know relationship of variable value to remainder of templates so must render all.
diff can explain further
what releases
what templates
variables
leads to updating the whole vm
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment