Skip to content

MPT-23808 Cap typer at 0.26 to keep mpt-tool co-installable with the SDK - #95

Merged
d3rky merged 1 commit into
mainfrom
bugfix/MPT-23808/pin-typer-0-26
Aug 4, 2026
Merged

MPT-23808 Cap typer at 0.26 to keep mpt-tool co-installable with the SDK#95
d3rky merged 1 commit into
mainfrom
bugfix/MPT-23808/pin-typer-0-26

Conversation

@svazquezco

@svazquezco svazquezco commented Aug 4, 2026

Copy link
Copy Markdown
Collaborator

🤖 AI-generated PR — Please review carefully.

Problem

mpt-tool 6.0.3 cannot be installed alongside mpt-extension-sdk 6.6.x, so extension repos cannot pick up SDK 6.6.2. Resolution fails outright:

mpt-extension-sdk==6.6.1 depends on typer==0.26.* and mpt-tool==6.0.3 depends on typer==0.27.*, we can conclude that [they are] incompatible.

The cap is not arbitrary: mrok (latest 0.10.5, a dependency of the SDK) requires typer<0.27.0,>=0.26.0, and the SDK keeps mrok/fastapi/typer pinned in lockstep for that reason (MPT-22658). The SDK cannot move to typer 0.27 until mrok lifts its cap — mpt-tool has no such constraint of its own, so it is the side that should hold.

typer reached 0.27 here through an unreviewed Dependabot bump (commit 0e9b43e, 2026-07-27), which touched only pyproject.toml and uv.lock — nothing in mpt-tool actually needed 0.27.

What was done

  • pyproject.toml: typer==0.27.*==0.26.*, with a comment recording why the cap exists. mpt-api-client==6.4.* is left untouched.
  • uv.lock: refreshed — typer 0.27.0 → 0.26.8. Nothing else moves.
  • .github/dependabot.yml: ignore typer >=0.27 so the next scheduled run cannot silently reintroduce the conflict. This mirrors the guard the SDK already carries for the same reason.

Reverting typer is behaviourally safe: the only breaking change in 0.27.0 is metavar rendering in --help output (typer#1863) — types shown as <str> instead of TEXT, choices as <a|b> instead of [a|b] — and 0.27.1 only adjusts epilog formatting. No API or argument-parsing changes. mpt-tool declares its metavars explicitly in mpt_tool/cli.py, which both versions honour.

Testing

  • ruff format --check, ruff check, flake8, mypy, uv lock --check all pass.
  • Full test suite passes (54 tests) — no test expectations needed changing in either direction.
  • End-to-end resolution check in a scratch project depending on this branch plus mpt-extension-sdk[azure-monitor]==6.6.* and mpt-extension-contrib-custom-notifications[teams]==1.2.* resolves cleanly to SDK 6.6.2 with mpt-api-client 6.4.0 and typer 0.26.8, confirming no further hidden conflict.

Follow-up

This needs a release (6.0.4) to reach PyPI before extensions can move to SDK 6.6.2; the currently published 6.0.3 stays unusable with 6.6.x. Once mrok lifts its typer<0.27 cap, the ignore rule here and in the SDK can both be dropped and the two can move up together.

Jira: MPT-23808

🤖 Generated with Claude Code

  • Update mpt-tool to use typer 0.26.*.
  • Update uv.lock to typer 0.26.8.
  • Prevent Dependabot from updating typer to version 0.27 or later.
  • Enable installation with mpt-extension-sdk 6.6.x.
  • Release version 6.0.4 to publish the fix.

… SDK

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@svazquezco
svazquezco requested a review from a team as a code owner August 4, 2026 12:28
@coderabbitai

coderabbitai Bot commented Aug 4, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Organization UI (inherited)

Review profile: CHILL

Plan: Pro

Run ID: fa4de8c3-3785-4d1b-b6ef-1083353b9626

📥 Commits

Reviewing files that changed from the base of the PR and between d48dd16 and cb448e2.

⛔ Files ignored due to path filters (1)
  • uv.lock is excluded by !**/*.lock
📒 Files selected for processing (2)
  • .github/dependabot.yml
  • pyproject.toml
🔗 Linked repositories identified

CodeRabbit considers these linked repositories for cross-repo context during reviews:

  • softwareone-platform/mpt-extension-skills (manual)
📜 Recent review details
⏰ Context from checks skipped due to timeout. (1)
  • GitHub Check: build
🧰 Additional context used
📓 Path-based instructions (1)
**/*

⚙️ CodeRabbit configuration file

**/*: For each subsequent commit in this PR, explicitly verify if previous review comments have been resolved

Files:

  • pyproject.toml
🔇 Additional comments (2)
pyproject.toml (1)

13-16: LGTM!

.github/dependabot.yml (1)

20-25: LGTM!


📝 Walkthrough

Walkthrough

The project now constrains typer to 0.26.*. Dependabot ignores typer versions >=0.27. Comments document the compatibility constraint.

Changes

Typer dependency constraint

Layer / File(s) Summary
Enforce the supported Typer range
.github/dependabot.yml, pyproject.toml
pyproject.toml pins typer to 0.26.*. Dependabot ignores versions >=0.27. Comments document the compatibility requirement.

Estimated code review effort: 1 (Trivial) | ~5 minutes

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Documentation Up To Date ✅ Passed The PR only changes the typer dependency constraint, lockfile, and Dependabot policy; no CLI, migration workflow, commands, or documented behavior changed.

Comment @coderabbitai help to get the list of available commands.

@github-actions

github-actions Bot commented Aug 4, 2026

Copy link
Copy Markdown

✅ Found Jira issue key in the title: MPT-23808

Generated by 🚫 dangerJS against cb448e2

@sonarqubecloud

sonarqubecloud Bot commented Aug 4, 2026

Copy link
Copy Markdown

@d3rky
d3rky merged commit 26e99a7 into main Aug 4, 2026
7 checks passed
@d3rky
d3rky deleted the bugfix/MPT-23808/pin-typer-0-26 branch August 4, 2026 12:41
svazquezco added a commit to softwareone-platform/mpt-installation-extension that referenced this pull request Aug 5, 2026
🤖 AI-generated PR — Please review carefully.

## What was done

Bump `mpt-extension-sdk` from 6.5.2 to **6.6.2**. Since 6.6 falls
outside the previous `==6.5.*` pin, this updates:

- `backend/pyproject.toml`: pin
`mpt-extension-sdk[azure-monitor]==6.5.*` → `==6.6.*`.
- `.pre-commit-config.yaml`: matching pin in the mypy hook's
`additional_dependencies`.
- `backend/uv.lock`: SDK 6.6.2, plus `mpt-api-client` 6.3.1 → 6.4.0 and
`mpt-tool` 6.0.1 → 6.0.4 (see below).
- `backend/tests/conftest.py`: pass `auth` when building the agreement
context.

### Why mpt-tool moves too

SDK 6.6.2 requires `mpt-api-client==6.4.*`, which the published
`mpt-tool` releases blocked until now: 6.0.2 pinned
`mpt-api-client==6.3.*`, and 6.0.3 fixed that but shipped
`typer==0.27.*`, which collides with the SDK's `typer==0.26.*` (capped
by mrok, kept in lockstep per MPT-22658) — so resolution was
unsatisfiable either way and the lock could only reach 6.6.1. mpt-tool
6.0.4 (softwareone-platform/mpt-tool#95) caps typer back at 0.26 while
keeping `mpt-api-client==6.4.*`, which unblocks 6.6.2 here with no pin
gymnastics or `override-dependencies` in this repo.

### Why the conftest change

SDK 6.6 makes `auth` a required field on `BaseContext` (MPT-23514), so
every `AgreementContext` construction must provide it. Only the test
factory builds contexts directly — production code receives the context
from the SDK — so the fixture now builds a real `AuthContext`, per the
shared unit-testing standard's preference for real value objects over
mocks. Its `extension_id` matches the `runtime_settings` stub so the
context stays self-consistent; the token is a module constant to keep
the literal out of the call (ruff `S106`), and the SDK's auth `Account`
is aliased as `AuthAccount` to avoid colliding with the agreement
`Account` model. `InstallationAgreementContext.from_context` copies init
fields generically, so no adapter change was needed.

The lenient status enums introduced in 6.6.2 (`AgreementStatus`,
`LicenseeStatus`, …) needed no changes here — they accept the existing
string values.

## Testing

- Backend lint suite passes (ruff format/check, flake8, mypy, `uv lock
--check`).
- Backend tests pass (39 tests).
- Rebased onto current `main` (a90851b) and revalidated.

Jira: [MPT-23808](https://softwareone.atlassian.net/browse/MPT-23808)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

[MPT-23808]:
https://softwareone.atlassian.net/browse/MPT-23808?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

- Update `mpt-extension-sdk` from the `6.5` line to `6.6.*`.
- Update dependency pins in `backend/pyproject.toml` and
`.pre-commit-config.yaml`.
- Resolve `mpt-extension-sdk` 6.6.1 and `mrok` 0.10.5 in
`backend/uv.lock`.
- Add the required `auth` field to the agreement context test fixture.
- Keep SDK 6.6.2 excluded because it conflicts with `mpt-tool` 6.0.
- Pass lint checks, lock verification, and 38 backend tests.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants