abcxyz / abc

Apache License 2.0
12 stars 3 forks source link

When upgrading, merge the old and new manifests instead of overwriting #469

Closed drevell closed 7 months ago

drevell commented 7 months ago

The previous design was, when upgrading, to generate an entirely new manifest and use it to overwrite the old manifest. This was incorrect because we need to preserve the creation_time from the old manifest. So the new approach is to "merge" the old and new manifest. By "merge," I just mean to take the creation_time from the old manifest and take all other fields from the new manifest.

I also made some changes to the way we test the upgrade feature. Previously, the test case would set up a directory structure, then run upgrade. This wasn't great because it relied on the test author to create a realistic directory structure that looks like it came from a render operation. The new approach is to actually run Render() before Upgrade(), thus ensuring that the two features actually work together.