-
-
Notifications
You must be signed in to change notification settings - Fork 746
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
st2 pack install should check existing installed version and warn if new version being installed is incompatible #3585
Comments
How will you know that new version is incompatible? What will it be incompatible with? |
Installing the most recent version is a reasonable default. A user can specify & pin the version of the pack (given the discipline of pack authors on versioning):
see https://docs.stackstorm.com/packs.html Compatibility and upgrade notes are pack author responsibility IMO. So to me, it's "no-op". The one little thing to reduce "user error" may be to require a flag to "upgrade if exists", and error out if flag not specified. |
The new version of the AWS pack will introduce some breaking changes, and we were discussing ways to make that more obvious. I think there's a reasonable expectation that users will read upgrade notes when upgrading st2 core, but this is far less emphasized for packs. So for popular packs like the AWS pack, when breaking changes are introduced, this could be as disruptive as breaking changes in st2 itself. So this would go beyond users pinning versions - we would want to add some form of metadata to the pack config that indicates a "boundary" between incompatible versions, so that the user can be properly notified. To answer @LindsayHill question, we would want to query the DB first to see what version is already installed, and figure out from the pack meta if that version is incompatible with the new version attempting to install. This would require a code change for sure, the net benefit is that we have a bit more to offer the user in the form of warnings when they're about to introduce something disruptive by re-installing a pack, instead of just assuming they'll read the upgrade notes |
We've had quite a few breaking changes in configs in the past, but it hasn't been handled well. Has relied on users reading CHANGELOG, if it even exists. In terms of breaking changes, I guess there's three categories:
The problem is: How do you identify those in a programmatic way? How do you decide from pack metadata that the new version is incompatible with the old ones? Gets messy if you try to maintain some complex schema of compatible versions. Maybe instead we enforce semver for any pack.yaml version changes, and require major version change for anything breaking. Then Will that work? |
@LindsayHill I personally like the idea using |
I like the semver solution, though it would require a bit more handholding for all existing packs so people don't bump major versions willy-nilly. This would go above simply enforcing semver, which is easy to do, but also ensuring that changes to the version are meaningful (telling pack maintainers that fixing a typo doesn't qualify as a major change). |
This came from AWS pack discussion where we will have two branches boto2 and boto3. master branch will point to boto2 for now. When we deprecate boto2 and make boto3 the default, master will point to boto3.
If user already has boto2 aws installed and does st2 pack install aws when master points to boto3, we'd mess up the user box. We should detect the version of aws pack installed and check if incoming version is incompatible.
The text was updated successfully, but these errors were encountered: