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 11468 11468
Branches 1735 1735
=======================================
Hits 9352 9352
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: |
b52edaa
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://80244b8d.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
clickandtypersoinfrahubctl --helpno longer crashes with Click 8.2+, and refreshes CLI docs to match current help output. Aligns with IHS-136 and unblocks packages that require newerclick(e.g.,ariadne-codegen).Dependencies
clickto>=8.2,<9andtyperto>=0.15.0forctlandallextras; regenerateduv.lock(now resolves toclick8.2.1 andtyper0.25.1).Docs
infrahubctlpages (branch, object, repository, schema, telemetry, validate) with current CLI help: reordered subcommands (e.g., list/get first), added missing sections, and fixed arguments/options/examples.Written for commit b52edaa. Summary will update on new commits. Review in cubic