You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When a bundle defines an advanced dependency, it can specify a default implementation and a semver constraint for matching against other versions of that bundle.
First, we need to add a configuration setting, dependencies.version-strategy, that indicates if/how porter can select another version of the default bundle implementation. By default this setting is off, and Porter will use the default implementation specified in the dependency.
The flag would be --dependencies-version-strategy=max
# ~/.porter/config.yamldependencies:
version-strategy: max # defaults to exact
And here's an example bundle demonstrating the version range:
When porter is executed with the setting enabled (via the config file, env var or command flag), porter should retrieve all tags for the referenced bundle and check for the highest semver value that matches the constraint AND meets all requirements for the bundle (such as the bundle interface).
This setting applies to both selecting a single dependency, and when determining if two dependencies on the same bundle can share the node by selecting a compatible version. So if depA wants a bundle at 1.x, and depB wants 1.5.x, we would use the strategy to select either the max or min matching version between the two strategies.
Supported Strategies
exact, use the exact version/digest from the default implementation
max-patch, use the highest matching patch version
max-minor, use the highest matching minor version
min, use the lowest matching version, similar to go
ℹ️ Read PEP003 - Advanced Dependencies for context about how dependencies should work, design details, and notes about desired behavior.
The text was updated successfully, but these errors were encountered:
When a bundle defines an advanced dependency, it can specify a default implementation and a semver constraint for matching against other versions of that bundle.
First, we need to add a configuration setting, dependencies.version-strategy, that indicates if/how porter can select another version of the default bundle implementation. By default this setting is off, and Porter will use the default implementation specified in the dependency.
The flag would be
--dependencies-version-strategy=max
And here's an example bundle demonstrating the version range:
When porter is executed with the setting enabled (via the config file, env var or command flag), porter should retrieve all tags for the referenced bundle and check for the highest semver value that matches the constraint AND meets all requirements for the bundle (such as the bundle interface).
This setting applies to both selecting a single dependency, and when determining if two dependencies on the same bundle can share the node by selecting a compatible version. So if depA wants a bundle at 1.x, and depB wants 1.5.x, we would use the strategy to select either the max or min matching version between the two strategies.
Supported Strategies
exact
, use the exact version/digest from the default implementationmax-patch
, use the highest matching patch versionmax-minor
, use the highest matching minor versionmin
, use the lowest matching version, similar to goℹ️ Read PEP003 - Advanced Dependencies for context about how dependencies should work, design details, and notes about desired behavior.
The text was updated successfully, but these errors were encountered: