Skip to content
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: correct the consistency checker's config "type" validation #106

Merged
merged 7 commits into from Apr 2, 2024

Conversation

tonyandrewmeyer
Copy link
Collaborator

Some small corrections to the consistency checker's validation of the type field in config:

  1. "integer" is not valid (at least in Juju 3.4.0), so remove it
  2. "number" is not valid (at least in Juju 3.4.0), so remove it
  3. "float" is missing, so add it
  4. This is currently undocumented (that should be fixed soon) but "type: secret" is valid from Juju 3.4 onwards, so add it (conditionally on the Juju version)

Adjust tests to match.

See also canonical/operator#1166 for type:secret issue in Harness.

scenario/consistency_checker.py Show resolved Hide resolved
scenario/consistency_checker.py Outdated Show resolved Hide resolved
scenario/consistency_checker.py Outdated Show resolved Hide resolved
scenario/consistency_checker.py Outdated Show resolved Hide resolved
@benhoyt
Copy link
Contributor

benhoyt commented Mar 27, 2024

Oh, and thanks for this, Tony -- appreciated!

Copy link
Collaborator

@PietroPasotti PietroPasotti left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Couple of nits and grits but it looks good!
Might be a good chance to get rid of that commented-out attrs question mark too?
I'm sure there was an attrs type in some document at some point, but I can't find it anymore so we can probably safely get rid of it.

scenario/consistency_checker.py Show resolved Hide resolved
scenario/consistency_checker.py Outdated Show resolved Hide resolved
Copy link
Collaborator

@PietroPasotti PietroPasotti left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Noice! thanks a lot :)

@PietroPasotti PietroPasotti merged commit 3029150 into canonical:main Apr 2, 2024
2 checks passed
@tonyandrewmeyer tonyandrewmeyer deleted the config-type-secret branch April 8, 2024 06:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants