← Back to issue list

fix(pebble): avoid pydantic warning for exec checks

View original Github issue

Metadata

Project
rockcraft
Number
#1196
Type
pull request
State
open
Author
gcomneno
Labels
Created
Updated
Closed

Current evaluation

Fixes PydanticSerializationUnexpectedValue warning when marshalling projects with exec checks by handling already-validated models in the check discriminator; adds unit test. Closes #1154. Rebased on main, author active; awaiting review, minor CI failures.

Suggested action: needs review

Reason: The PR is small (+45/-4, 2 files) and still relevant: issue #1154 remains open and rockcraft/pebble.py on main still has the unpatched _get_check_tag discriminator. The author actively maintained it (rebased onto upstream/main, merged @lczyk's patch, reran focused tests with 80 passed), but it has 0 reviewers and pending review status, with only minor CI failures (source-spread-tests, OSV-scanner, lint/files).

Impact: 35 Quick Win: 28.0 Staleness: 45 Complexity: 20 Confidence: 82

Issue body

## Summary - make the check discriminator handle already-validated check models during serialization - avoid the PydanticSerializationUnexpectedValue warning when marshalling projects with exec checks - add a unit test covering Project.marshal() with an exec health check ## Issue - closes #1154

Evaluation history

Date Model Scores Action Summary
qwen/qwen3.8-27b
Impact: 35
Quick Win: 28.0
Staleness: 45
Complexity: 20
Confidence: 82
needs review Fixes PydanticSerializationUnexpectedValue warning when marshalling projects with exec checks by handling already-validated models in the check discriminator; adds unit test. Closes #1154. Rebased on main, author active; awaiting review, minor CI failures.
qwen/qwen3.6-35b-a3b
Staleness: 25
Complexity: 15
Confidence: 85
needs review Fixes Pydantic serialization warning for exec checks by handling already-validated models during marshalling. Adds unit test. Currently awaiting maintainer review with minor failing CI checks.
qwen3.6-35b-a3b-mtp-q6
Staleness: 15
Complexity: 20
Confidence: 85
keep open Fix Pydantic serialization warning for exec checks by updating the check discriminator during marshalling. Includes unit tests and passes local linting. Recently rebased and actively maintained.
qwen3.6-35b-a3b-mtp-q6
Staleness: 10
Complexity: 20
Confidence: 90
needs review Fixes Pydantic serialization warning for exec health checks by updating the check discriminator logic. Includes unit tests and passes linting. Awaiting final maintainer review after recent rebase and applied patch.
qwen3.6-35b-a3b-mtp-q6
Staleness: 35
Complexity: 25
Confidence: 85
needs review Fixes a Pydantic serialization warning when marshalling projects with exec health checks. Includes a new unit test and passes all linting. Author rebased and followed up; awaiting maintainer review and merge.

Update history

No update history recorded yet.

Related work

  • Likely Fixed By: rockcraft#1154 (confidence 90%)

    PR body states 'closes #1154'; issue is the PydanticSerializationUnexpectedValue warning during Project.marshal() with ExecCheck models, which this PR directly addresses.

Related issues

No related issues found above the similarity threshold.