Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

models: do not enforce pydantic models on legacy files #1204

Merged
merged 1 commit into from
Aug 12, 2023

Conversation

syu-w
Copy link
Contributor

@syu-w syu-w commented Aug 8, 2023

Only warning when found invalid file for backward compatible.

Fixes #1208

@syu-w syu-w changed the base branch from main to hotfix/2.4 August 8, 2023 19:06
Copy link
Collaborator

@lengau lengau left a comment

Choose a reason for hiding this comment

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

Found a typo, but otherwise I think this makes sense

charmcraft/metafiles/config.py Outdated Show resolved Hide resolved
charmcraft/metafiles/config.py Outdated Show resolved Hide resolved
charmcraft/metafiles/config.py Outdated Show resolved Hide resolved
charmcraft/metafiles/config.py Outdated Show resolved Hide resolved
@lengau lengau requested a review from sergiusens August 8, 2023 19:36
@syu-w syu-w force-pushed the unenforced-metadata branch 4 times, most recently from f24af81 to b876def Compare August 8, 2023 20:08
yaml.dump(
charmcraft_config.config.dict(
include={"options"}, exclude_none=True, by_alias=True
if charmcraft_config.config:
Copy link
Collaborator

Choose a reason for hiding this comment

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

not for this PR, but for the next release, we probably want for b876def#diff-393cfb3bc4ec4de9d80e214583c4e8d6a4ca712299b7416d32391263674e3238R26 to inherit from YamlModel, that would clean this up a bit.

Copy link
Collaborator

@sergiusens sergiusens left a comment

Choose a reason for hiding this comment

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

these tests are not running, none of the metafiles ones are

@syu-w syu-w force-pushed the unenforced-metadata branch 12 times, most recently from a3fc7e2 to f725f8a Compare August 11, 2023 19:16
Only warning when found invalid file for backward compatible.
@sergiusens sergiusens merged commit 2c56901 into canonical:hotfix/2.4 Aug 12, 2023
25 checks passed
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