-
Notifications
You must be signed in to change notification settings - Fork 100
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
chore: add juju 3.1.{3,4,5,6,7,8,9,10} schemas, no code changes #1166
chore: add juju 3.1.{3,4,5,6,7,8,9,10} schemas, no code changes #1166
Conversation
After adding each schema we run: rm juju/client/_client*.py juju/client/_definitions.py followed by: make client and verify that there are no changes to the generated code.
If there are no code changes, WDYT about keeping only the oldest and the newest 3.1.x ? |
It seems wasteful and bad for maintenance to check in these large schemas that future maintainers may feel like they need to look through. It would be nice if we could avoid this. Maybe we want a policy like this:
Assuming that this practice was followed, then you'd know that the latest schema present indicates the most recent release that's been checked, and that all earlier versions had been checked already. But you'd have to trust that the versions in between the schemas present had been handled correctly. In the 3.1.X series, there are only differences in the schemas for two version bumps:
The diffs are quite small, so I've attached them at the end of this message. The Following this policy, for the 3.1.X series we'd have:
Future maintainers would know that there are three different versions of the 3.1.X schema and be able to diff the files to see the difference. They'd also know that 3.1.10 was the latest Juju release from the 3.1.X series that had been brought into python-libjuju. Benefits:
Concerns:
But maybe we could add some CI checks to catch easy to make errors?
Alternatively, or perhaps as well, I think it would be good to put these schemas somewhere. Or provide a script for generating them on the fly from Juju repo maybe? Because of the change to client-only schemas, you can't just grab the schema.json from the relevant Juju release. My process has been to check out the Juju release (either Diffs
|
I would rather add a markdown file in the directory noting that 3.1.{1,2,3,4,5} and 3.1.{6,7,8,9,10} are the same than shipping a bunch of identical files. Same markdown file could clearly state what Juju versions are present in this codebase. WDYT? |
Would you be happy with shipping the following schemas for 3.1 series:
If so, are you happy with this policy?
If so, that's what I'll go with for now and that's what I'll add to the release documentation. I'll just open issues about potentially catching errors with adding schemas in CI, and not worry further about that for now. |
Yes, I'm happy with that. |
Closing in favour of:
|
…ema-release-process #1169 #### Description We want to ensure that `python-libjuju` supports the latest Juju schemas, and that it's clear to `python-libjuju` maintainers and users what versions are supported. This PR adds documentation on how to do this (`docs/CONTRIBUTING.md`), and follows this process for the existing schemas, updating the `3.1` series (`juju/client/SCHEMAS.md` and `juju/client/schemas-juju-*.json`) #### QA Steps No changes to generated code are introduced in this PR. `make client` should not produce any changes to the repo state. Test should all pass. #### Notes & Discussion Replaces: - #1166 Implicitly depends on: - #1168 Since we add a schema for `3.1.10` here.
Description
After every Juju 3.X.Y release, python-libjuju should include Juju's
apiserver/facades/schema.json
file underjuju/client/schemas-juju-3.X.Y.json
, regenerate the client code, and verify whether any new facades are supported. The latest schemas currently in python-libjuju are 3.1.2 for the 3.1 series, and 3.3.0 for the 3.3 series, so clearly this hasn't been done in a while.This PR adds (client-only) schemas for 3.1.3 - 3.1.10. There are no facade version changes, so despite regenerating the python-libjuju client code, this PR makes no changes other than adding the schema files themselves.
While it seems kind of wasteful to add these large schema files when they're not making any facade version changes, I think it makes sense to do so as a clear signal that python-libjuju is up to date when it comes to supporting the 3.1 series.
QA Steps
After adding each schema we run:
rm juju/client/_client*.py juju/client/_definitions.py followed by:
make client
and verify that there are no changes to the generated code.