Skip to content

Override all Number properties - #140

Merged
huwshimi merged 3 commits into
juju:mainfrom
huwshimi:override-all-number-properties
May 29, 2026
Merged

huwshimi merged 3 commits into
juju:mainfrom
huwshimi:override-all-number-properties

Conversation

@huwshimi

Copy link
Copy Markdown
Member

Done

The Number type in the Juju schema is actually a string (see: https://bugs.launchpad.net/juju/+bug/2025108). Previously we had an override for the agent-version fields, but this PR overrides the property anywhere that a Number is referenced.

All facades have been regenerated, and Juju 4.0.10 has been added.

The relevant changes are in this commit: 8584b37 and the second commit only contains the changes from running the regenerate-all-facades script.

@alesstimec alesstimec left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

excuse my ignorance, but what's with all the seemingly random formatting changes (comments removed, comments added, new lines removed, new lines added).. it makes it very hard to review this PR as there seem to be loads of unrelated changes.

@huwshimi

Copy link
Copy Markdown
Member Author

excuse my ignorance, but what's with all the seemingly random formatting changes (comments removed, comments added, new lines removed, new lines added).. it makes it very hard to review this PR as there seem to be loads of unrelated changes.

Juju 4 dropped descriptions from the facade methods so I made a change to remove the empty comment blocks. Something I did must have introduced another issue to add some blank lines. I'll take a look.

@huwshimi
huwshimi force-pushed the override-all-number-properties branch from 50f18f4 to 7436b20 Compare May 27, 2026 06:59
@huwshimi

Copy link
Copy Markdown
Member Author

I've addressed the issue with the new blank lines. However there are still a lot of changes from regenerating the facades.

@Ninfa-Jeon Ninfa-Jeon left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

All good. One question and one correction.

Comment thread generator/generator.ts Outdated
const valueType = extractType(patternProperty);
const valueType = extractType({
...patternProperty,
// Use the type that was extract above in case a ref was substituted with a primitive type.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Suggested change
// Use the type that was extract above in case a ref was substituted with a primitive type.
// Use the type that was extracted above in case a ref was substituted with a primitive type.

Comment thread README.md
@huwshimi
huwshimi merged commit eb132a1 into juju:main May 29, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants