← Back to issue list

fix: make build base type a union

View original Github issue

Metadata

Project
debcraft
Number
#197
Type
pull request
State
open
Author
jahn-junior
Labels
—
Created
Updated
Closed
—

Current evaluation

Changes BuildBaseT to include None in the union, removing the pydantic validate_default warning; under review with fast tests failing and author yet to validate.

Suggested action: keep open

Reason: The author states 'Have yet to validate the fix', CI fast tests are failing, and reviewers are still discussing an alternative approach (bepri's suggestion to use pydantic.Field(default=...) like platforms). The change is small but not ready to merge until validation and CI are resolved.

Evaluated by: mr-cal-bot

Impact: 30 Quick Win: 7 Complexity: 25 Confidence: 70 Actionability: 30

Issue body

- [ ] Have you followed the guidelines for contributing? - [X] Have you signed the [CLA](http://www.ubuntu.com/legal/contributors/)? - [ ] Have you successfully run `make lint && make test`? --- The current `BuildBaseT` type results in the following error when running commands. ``` UnsupportedFieldAttributeWarning: The 'validate_default' attribute with value True was provided to the `Field()` function, which has no effect in the context it was used. 'validate_default' is field-specific metadata, and can only be attached to a model field using `Annotated` metadata or by assignment. This may have happened because an `Annotated` type alias using the`type` statement was used, or if the `Field()` function was attached to a single member of a union type. ``` Have yet to validate the fix, but the build base field in Rockcraft is identical, so I _think_ this should do it. Not mission-critical, but it'll save me from having to explain that this is a known error when I write the tutorial next pulse.

Evaluation history

Date Model Scores Action Summary
~deepseek/deepseek-pro-latest
Impact: 30
Quick Win: 7
Complexity: 25
Confidence: 70
Actionability: 30
keep open Changes BuildBaseT to include None in the union, removing the pydantic validate_default warning; under review with fast tests failing and author yet to validate.
~deepseek/deepseek-pro-latest
Impact: 30
Quick Win: 8
Complexity: 25
Confidence: 70
Actionability: 35
keep open Changes BuildBaseT to include None in the union, removing the pydantic validate_default warning; under review, fast tests failing.
~deepseek/deepseek-pro-latest
Impact: 40
Quick Win: 8
Complexity: 25
Confidence: 72
Actionability: 25
keep open Changes BuildBaseT to include None in the annotated union so pydantic validate_default applies to the whole type; author has not validated and CI is failing.
~deepseek/deepseek-pro-latest
Impact: 20
Quick Win: 4
Complexity: 10
Confidence: 72
Actionability: 20
keep open Changes BuildBaseT to a union so pydantic validate_default applies to the whole type, avoiding UnsupportedFieldAttributeWarning; author has not yet validated and CI is failing.

Update history

Date Change
updated
updated
created

Related issues

No related issues found above the similarity threshold.