IHS-136: Update click version#1024
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. @@ Coverage Diff @@
## stable #1024 +/- ##
=======================================
Coverage 81.54% 81.54%
=======================================
Files 134 134
Lines 11467 11467
Branches 1735 1735
=======================================
Hits 9351 9351
Misses 1569 1569
Partials 547 547
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
Deploying infrahub-sdk-python with
|
| Latest commit: |
2fd816a
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://05872b13.infrahub-sdk-python.pages.dev |
| Branch Preview URL: | https://sb-15052026-update-click-ihs.infrahub-sdk-python.pages.dev |
ajtmccarty
left a comment
There was a problem hiding this comment.
might be worth trying to upgrade typer from 0.12.5 to some newer version. the latest is 0.25.1, which may or may not work with everything, but probably worth attempting
There was a problem hiding this comment.
do you know why there are all these docs changes? they seem to have un-alphabetized the sub commands
There was a problem hiding this comment.
They are the same as #997 (comment) this just went to infrahub-develop
There was a problem hiding this comment.
My guess is that typer changed the order, while I think it might look better to have them ordered by name I'm sure some people want to control the order and have them as they appear in the code. I'm not sure it's worth it to change this around. There's talk about moving away from typer as well and use another package for that.
ajtmccarty
left a comment
There was a problem hiding this comment.
looks like there's a merge conflict now
Why
infrahubctl --help(and all otherinfrahubctlcommands) crash with aTypeErrorwhen click 8.2+ is installed. Click 8.2 changed themake_metavar()signature to require actxargument; click 8.3 added stricter boolean flag validation. Typer 0.12.x calls both APIs in the old way, so it breaks on any click release beyond 8.1.The existing
click==8.1.*pin kept things working as a workaround, but it blocks users from installing packages that require a newer click and prevents us from upgradingariadne-codegen(which requires click 8.2+).Closes #406
How to test
uv run infrahubctl --help # should print the command listing, no TypeErrorSummary by cubic
Upgrades
clickandtyperto fixinfrahubctlcrashing on--helpwith Click 8.2+, and syncs command docs with the updated CLI help. Aligns with IHS-136 and unblocks packages that require newerclick(e.g.,ariadne-codegen).Dependencies
clickto>=8.2,<9(from8.1.*) forctlandallextras.typerto>=0.15.0(compatible with Click 8.2+).uv.lock.Docs
infrahubctlpages (branch, object, repository, schema, telemetry, validate) with current CLI help: reorder subcommands, add missing sections, and correct options/examples.Written for commit 2fd816a. Summary will update on new commits.