← Back to issue list

chore!: migrate to pydantic 2

View original Github issue

Metadata

Project
rockcraft
Number
#663
Type
pull request
State
merged
Author
tigarmo
Labels
—
Created
Updated
Closed

Current evaluation

Merged PR #663 migrated Rockcraft to Pydantic 2, adopted craft-application's Platform, and fixed #657; migration work includes commit f1681ea1.

Resolution: closed resolved

Reason: PR #663 was merged and explicitly states “Fixes #657.” Commit f1681ea1 records the Pydantic migration, while 4690fba3 records adoption of craft-application's Platform model.

Evaluated by: mr-cal-bot

No scores available.

Issue body

Many of the changes are just straightforward updates and cleanups. I had to do things like finally dropping the Rockcraft `Platform` model because otherwise I'd have to re-do the work that craft-application already did. There are some commits here that address things that aren't really pydantic-2 related, unfortunately, but they should be small. Although the commits are reasonably split I would actually suggest reviewing the final diff because some of the commits change things done by earlier ones, so there's a bit of "waste" there. Fixes #657

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed resolved Merged PR #663 migrated Rockcraft to Pydantic 2, adopted craft-application's Platform, and fixed #657; migration work includes commit f1681ea1.
stealth/space-bunny-alpha — closed resolved Merged PR #663 completed Rockcraft’s migration to Pydantic 2, dropped the redundant Platform model, and fixed issue #657.
stealth/space-bunny-alpha — closed resolved Merged in rockcraft#663 via commit f1681ea1, migrating Rockcraft to Pydantic 2, removing the redundant Platform model, and fixing #657.
stealth/space-bunny-alpha — closed resolved Migrated Rockcraft to Pydantic 2, dropping the redundant Platform model and related cleanups. Merged via PR #663, fixing issue #657.
qwen/qwen3.6-35b-a3b — — Merged after approval by four reviewers, migrating the codebase to Pydantic 2. The update drops the Rockcraft Platform model, applies necessary cleanups, and resolves issue #657 across 27 files.
qwen3.6-35b-a3b-mtp-q6 — — Merged Pydantic 2 migration, dropping the Rockcraft Platform model and including minor cleanup commits. Resolves #657.

Update history

No update history recorded yet.

Related work

Related issues

Issue Project State Summary Similarity
#657 Migrate to Pydantic 2 rockcraft closed Rockcraft was migrated to Pydantic 2 by merged PR #663, which updated the models and removed the redundant Platform model.
85%
#4955 chore!: migrate to pydantic 2 snapcraft merged Merged snapcraft#4955 completed the Pydantic 2 migration for CRAFT-3159 and fixed snapcraft#4941; commit 1fc8fe6ab moved dependencies to Pydantic 2.
80%
#672 merge feature/pydantic-2 rockcraft merged Merged feature/pydantic-2 into main, completing Rockcraft's Pydantic 2 migration and final dependency updates after two approvals.
76%
#1768 Migrate to Pydantic 2 charmcraft closed Migrated Charmcraft to Pydantic 2 via merged PR #1777 (70078b03), with the feature branch merged to main in #1817 (394e6e55).
75%
#4941 Migrate to Pydantic 2 snapcraft closed Pydantic 2 migration completed in merged snapcraft#4955 via commit 1fc8fe6ab, resolving CRAFT-3159.
74%
#370 chore(deps): update dependency pydantic to v2 craft-providers closed Renovate pydantic v2 bump closed unmerged by mr-cal to defer migration to a larger craft effort; the upgrade later landed in merged PR #451 (commit f380a9e) for 2.0.
74%
#33 chore!: update to Pydantic 2 craft-grammar merged Merged as commit 5e225fb via PR #33, updating craft-grammar to Pydantic 2 and revising grammar validation errors; fixes #32.
74%
#401 build!: update to pydantic 2 craft-application merged Merged PR #401 as commit c2f0978a, migrating craft-application to Pydantic 2 across 23 files; craft-grammar#34 was required for the tests.
73%
#728 Migrate to Pydantic 2.x craft-parts closed Pydantic 2 migration landed in canonical/craft-parts#771 via commit 6b155294, followed by cleanup in #778; craft-parts now requires pydantic>=2.0.0.
73%
#1817 chore: merge pydantic 2 support to main charmcraft merged Pydantic 2 support was merged into main by PR #1817 (commit 394e6e55), completing the migration begun in #1777 across 52 files.
72%