nimbella / nimbella-deployer

The Nimbella platform deployer library
Apache License 2.0
2 stars 4 forks source link

Fix omissions in incremental deploy digest logic #66

Closed joshuaauerbachwatson closed 2 years ago

joshuaauerbachwatson commented 2 years ago

Several fields were added to ActionSpec and PackageSpec since incremental deploy was coded. Most notably, the environment property has been added to both but there were miscellaneous other additions. Changes to the environment property were not affecting the digests used to decide whether to deploy an action, and so, nim project watch would appear to misbehave (not redeploy the action) after such changes.

After updating the digest calculation to take into account the additions, this symptom went away.

I'm leaving for another day a way to automate the underlying issue out of existence. You can't just iterate over the own properties of the two kinds of object and digest everything because there are fields that are volatile and used, essentially, for bookkeeping. So, if you did that, the digests would never stabilize and the deploy would no longer be incremental. Perhaps we should use a blacklist approach (digest everything except certain fields, which are listed in some constant right alongside the declaration of the types. Or something.