-
Notifications
You must be signed in to change notification settings - Fork 2k
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
update_cluster_revisions.py: Add possibility to bump cluster revisions to the latest in spec #36456
base: master
Are you sure you want to change the base?
update_cluster_revisions.py: Add possibility to bump cluster revisions to the latest in spec #36456
Conversation
Changed Files
|
PR #36456: Size comparison from c3b35eb to 53d4c18 Full report (3 builds for cc32xx, stm32)
|
PR #36456: Size comparison from c3b35eb to ab056da Full report (68 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, cyw30739, efr32, esp32, linux, nrfconnect, nxp, psoc6, qpg, stm32, telink, tizen)
|
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.
How is this different from scripts/tools/zap/update_cluster_revisions.py
? Is the idea that the other one you say what update you want and this one will automatically update everything to "latest revision"?
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.
Thanks, Boris. When I wrote this I didn't know we already had a somewhat similar tool. That's great!
From a quick look at the code, that seems to be the difference. This tool bumps all clusters to the latest revision according to the spec.
Another use I see for this tool is to run it in CI to monitor/scan which ZAP files/clusters are outdated and need a rev bump (and how far behind they are from the spec).
I could also move this code into scripts/tools/zap/update_cluster_revisions.py
if it makes more sense.
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.
I honestly don't have strong opinions on where the functionality should live, though having the existing script be able to just take some value for "latest" might be nice, and then people can just keep using it.
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.
I moved everything into update_cluster_revisions.py
and added a readme file with examples.
Now, if you omit --new-revision
, it will assume latest revision according to the spec. If you want to give it a try, you can run:
./scripts/tools/zap/update_cluster_revisions.py --dry-run --no-parallel
And you should see it print all of the outdated clusters:
Checking for outdated cluster revisions on: examples/light-switch-app/light-switch-common/icd-lit-light-switch-app.zap
6 found!
Endpoint: 0 cluster_code: 0x28 cluster_revision: 3 cluster_spec_revision: 4 name: Basic Information
Endpoint: 0 cluster_code: 0x30 cluster_revision: 1 cluster_spec_revision: 2 name: General Commissioning
Endpoint: 0 cluster_code: 0x31 cluster_revision: 1 cluster_spec_revision: 2 name: Network Commissioning
Endpoint: 0 cluster_code: 0x35 cluster_revision: 2 cluster_spec_revision: 3 name: Thread Network Diagnostics
Endpoint: 1 cluster_code: 0x3 cluster_revision: 4 cluster_spec_revision: 5 name: Identify
Endpoint: 2 cluster_code: 0x3 cluster_revision: 2 cluster_spec_revision: 5 name: Identify
Checking for outdated cluster revisions on: examples/light-switch-app/light-switch-common/light-switch-app.zap
6 found!
Endpoint: 0 cluster_code: 0x28 cluster_revision: 3 cluster_spec_revision: 4 name: Basic Information
Endpoint: 0 cluster_code: 0x30 cluster_revision: 1 cluster_spec_revision: 2 name: General Commissioning
Endpoint: 0 cluster_code: 0x31 cluster_revision: 1 cluster_spec_revision: 2 name: Network Commissioning
Endpoint: 0 cluster_code: 0x35 cluster_revision: 2 cluster_spec_revision: 3 name: Thread Network Diagnostics
Endpoint: 1 cluster_code: 0x3 cluster_revision: 4 cluster_spec_revision: 5 name: Identify
Endpoint: 2 cluster_code: 0x3 cluster_revision: 2 cluster_spec_revision: 5 name: Identify
Checking for outdated cluster revisions on: examples/light-switch-app/qpg/zap/switch.zap
7 found!
Endpoint: 0 cluster_code: 0x28 cluster_revision: 3 cluster_spec_revision: 4 name: Basic Information
Endpoint: 0 cluster_code: 0x2f cluster_revision: 1 cluster_spec_revision: 3 name: Power Source
Endpoint: 0 cluster_code: 0x30 cluster_revision: 1 cluster_spec_revision: 2 name: General Commissioning
Endpoint: 0 cluster_code: 0x31 cluster_revision: 1 cluster_spec_revision: 2 name: Network Commissioning
Endpoint: 0 cluster_code: 0x35 cluster_revision: 2 cluster_spec_revision: 3 name: Thread Network Diagnostics
Endpoint: 1 cluster_code: 0x3 cluster_revision: 4 cluster_spec_revision: 5 name: Identify
Endpoint: 2 cluster_code: 0x3 cluster_revision: 4 cluster_spec_revision: 5 name: Identify
Checking for outdated cluster revisions on: src/controller/data_model/controller-clusters.zap
0 found!
This PR updates the
update_cluster_revisions.py
tool to bump the cluster revisions to the latest according to the spec if no--new-revision
is provided.I've also added documentation in
README.md
on how to use the tool and expected output examples.