Skip to content

IHS-136: Update click version#1024

Merged
solababs merged 3 commits into
stablefrom
sb-15052026-update-click-ihs-136
May 25, 2026
Merged

IHS-136: Update click version#1024
solababs merged 3 commits into
stablefrom
sb-15052026-update-click-ihs-136

Conversation

@solababs
Copy link
Copy Markdown
Contributor

@solababs solababs commented May 15, 2026

Why

infrahubctl --help (and all other infrahubctl commands) crash with a TypeError when click 8.2+ is installed. Click 8.2 changed the make_metavar() signature to require a ctx argument; 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 upgrading ariadne-codegen (which requires click 8.2+).

Closes #406

How to test

uv run infrahubctl --help        # should print the command listing, no TypeError

Summary by cubic

Upgrades click and typer so infrahubctl --help no longer crashes with Click 8.2+, and refreshes CLI docs to match current help output. Aligns with IHS-136 and unblocks packages that require newer click (e.g., ariadne-codegen).

  • Dependencies

    • Set click to >=8.2,<9 and typer to >=0.15.0 for ctl and all extras; regenerated uv.lock (now resolves to click 8.2.1 and typer 0.25.1).
  • Docs

    • Synced infrahubctl pages (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

@solababs solababs requested a review from a team as a code owner May 15, 2026 07:10
Copy link
Copy Markdown

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

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

No issues found across 2 files

@codecov
Copy link
Copy Markdown

codecov Bot commented May 15, 2026

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           
Flag Coverage Δ
integration-tests 41.71% <ø> (ø)
python-3.10 54.58% <ø> (ø)
python-3.11 54.58% <ø> (ø)
python-3.12 54.56% <ø> (-0.02%) ⬇️
python-3.13 54.56% <ø> (-0.02%) ⬇️
python-3.14 54.56% <ø> (-0.02%) ⬇️
python-filler-3.12 22.67% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages Bot commented May 15, 2026

Deploying infrahub-sdk-python with  Cloudflare Pages  Cloudflare Pages

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

View logs

@github-actions github-actions Bot added the type/documentation Improvements or additions to documentation label May 15, 2026
Copy link
Copy Markdown
Contributor

@ajtmccarty ajtmccarty left a comment

Choose a reason for hiding this comment

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

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

do you know why there are all these docs changes? they seem to have un-alphabetized the sub commands

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

They are the same as #997 (comment) this just went to infrahub-develop

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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.

Copy link
Copy Markdown
Contributor

@ajtmccarty ajtmccarty left a comment

Choose a reason for hiding this comment

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

looks like there's a merge conflict now

@solababs solababs merged commit 0a1c782 into stable May 25, 2026
21 checks passed
@solababs solababs deleted the sb-15052026-update-click-ihs-136 branch May 25, 2026 07:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type/documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug: infrahubctl --help returns a TypeError with click v8.2.0

3 participants