abcxyz / abc

Apache License 2.0
12 stars 3 forks source link

Add the concept of "upgrade track" to the manifest #589

Closed drevell closed 4 months ago

drevell commented 4 months ago

This addresses a UX issue that was found during a recent test of the upgrade algorithm in the infra-gcp repo. When a user installs a template from main using abc render github.com/foo/bar@main, we should remember that fact in the manifest. Later, when they run abc upgrade, we should upgrade to the tip of main. We shouldn't require the user to remember to add -version=main to their upgrade command.

The way this worked in the past is that the abc upgrade command would upgrade to the latest semver release tag, which might be very old (or not even exist) and is probably not what the user wanted if they installed from main (or another branch).

This is part of the solution: to store the upgrade_track field in the manifest. This field is either a branch name or the special string latest.

A future PR will plumb this manifest through the upgrade command so we pull the new template version from the right branch.