-
Notifications
You must be signed in to change notification settings - Fork 503
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
fix: improve error messages for unsupported features #18022
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Heads up, you'll need to merge this forward explicitly as Simon has a PR up to move the SupportedFeatures function out of stateenvirons on main.
Is bf0a5d3 part of the commit before it? I'm wondering why they need fixing.
@@ -8,10 +8,6 @@ import ( | |||
"github.com/juju/errors" | |||
) | |||
|
|||
// A link to a web page with additional information about features, | |||
// the Juju versions that support them etc. | |||
const featureDocsURL = "https://juju.is/docs/olm/supported-features" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
question: why remove the link to documentation?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The error messages should be self-explanatory and not require external resources to understand. This was previously necessary because the error message was rather cryptic, and the user would have to consult the docs to find out what it meant.
This should be targeting 3.5. |
The error message has changed, the tests need to be changed accordingly. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, please squash commits before merging.
Error messages for supported features were intended to be user-friendly, but they are still too abstract to easily understand. They refer to the concept of "features", which is an internal Juju construct and as such, should not be mentioned to users. This commit attempts to improve the error messaging to make it more straightforward.
4921ebe
to
9b7c7cc
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Meant to click approved last time.
/merge |
1 similar comment
/merge |
#18155 Forward merge: - #18154 - #18022 - #17699 - #18095 - #18052 - #18073 - #18091 - #18083 Conflicts: worker/uniter/runner/context/context_test.go version/version.go scripts/win-installer/setup.iss snap/snapcraft.yaml Note: this PR also has a small change for the #18154 to include the checksum for the idempotent secret feature.
Error messages for supported features were intended to be user-friendly, but they are still too abstract to easily understand. They refer to the concept of "features", which is an internal Juju construct and as such, should not be mentioned to users.
This PR attempts to improve the error messaging to make it more straightforward.
Before
After
Checklist
[ ] Integration tests, with comments saying what you're testing[ ] doc.go added or updated in changed packagesQA steps
Create a new charm:
Remove the
containers
andresources
sections. At the bottom ofcharmcraft.yaml
, add the lines:Build the charm:
Bootstrap Juju (any cloud) and try to deploy the charm. Check the error message.
Also test the following scenarios:
k8s-api
on a machine cloud (you can use any k8s charm e.g.nvidia-gpu-operator
for this, no need to build your own)k8s-api >= 1.35
on a k8s cloudLinks
Launchpad bug: https://bugs.launchpad.net/juju/+bug/2069986
Jira card: JUJU-6584