-
Notifications
You must be signed in to change notification settings - Fork 15
Indicate launch module updates in app layer versioning #89
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I initially thought this could use the same approach as the existing Instead, we need a dedicated (automatically generated) versioning file checked into git for each application layer, just as we already have for the environment lock versioning. Proposed location for that file:
Proposed fields for that file:
Output metadata (option 1 - flat):
Output metadata (option 2 - nested):
My current preference is to keep a flat output metadata structure (for consistency with the way the corresponding lock versioning info is already handled), but could be potentially talked into the nested option if that might be easier to consume. Either way, the old output metadata field names would be temporarily retained for 0.3.0, but removed in 0.4.0. As part of this, we should explicitly document the expectation that |
After chatting to @neilmehta24 about it, I'm going to try an approach that treats the launch module hash as an additional input to the environment lock file for application layers. However, I still have to decide how the visible layer versioning numbering should work:
|
I'm currently leaning towards Neil's suggested app layer versioning format, where the part immediately after the The general idea being that complex launch modules should ideally be separated out as regular versioned Python packages, with the launch modules being a relatively thin layer that adapts the application interface to the CLI interface expected by the embedding application. |
Further discussion between Neil and myself narrowed the four options above down to two candidates:
These are the two that feel the most "similar in spirit" to the way the runtime and framework layer versioning works (with just a lock version defined, since The (arguable) problem with the first option (exposing the two numbers separately), is that it promotes an implementation detail (whether an application is written as a complex launch module only distributed with Distinguished versioning with a complex launch module and the occasional dependency update:
Distinguished versioning with a simple launch module and all functional changes happening via dependency updates:
If we make the launch module versioning zero-based instead of one based, then summing the two version numbers would give the following progression: Combined versioning with a complex launch module and the occasional dependency update:
Combined versioning with a simple launch module and all functional changes happening via dependency updates:
|
I'm still not loving either of the app layer versioning approaches explored in my previous comment. The fact I felt compelled to explain the sums involved when writing out the "combined version number" examples isn't a good sign, and neither is the fact that the combined approach needs zero-based launch modules versions to avoid making the initial layer version number weird. It did inspire a fifth idea, though, which is to use Distinguished versioning with a complex launch module and the occasional dependency update:
Distinguished versioning with a simple launch module and all functional changes happening via dependency updates:
|
|
After several months of working around this limitation via explicit layer versioning, @neilmehta24 is now less sure it's worthwhile exposing the lock version separately from the overall layer version in the deployed layer name when using automatic layer versioning. This favours a variation on combined versioning, where the layer version is updated when the lock version or any other relevant application layer input changes (such as the launch module contents, the post-install module contents, the underlying runtime name, or the relative deployed framework layer locations that will be added to |
The resolution of the remaining parts of #149 in #154 offer a potential path forward without needing to track a separate app version directly: the launch module hash could be treated as an additional "other input" when determining the layer lock validity. This would be particularly appropriate if that change was combined with an enhancement to accept app layer dependency declarations via inline script metadata. |
#166 implements the approach of treating the app module version as "another input" for the layer versioning. Adding inline script metadata support is left as a potential future enhancement for now. |
* Invalidate layer locks for launch module changes Closes #89
The automated application layer versioning in 0.2.0 is misleading, as the given version number only reflects the lock version, it doesn't reflect the launch module version. This makes it hard for the deploying application to work out if the latest version of an application layer is already installed, or if it needs to download and install a new one.
To fix this, the meaning of
versioned=True
on application layers should change to include aapp_launch_module_version
field (based on theapp_launch_module_hash
changing) in addition to the existinglock_version
field.For app layers, the deployed layer name format would change from
{layer_name}@{lock_version}
to{layer_name}@{app_launch_module_version}.{lock_version}
The text was updated successfully, but these errors were encountered: