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

Fix: EOL filtering to only exclude builds with no valid tracks. #272

Open
wants to merge 27 commits into
base: main
Choose a base branch
from

Conversation

clay-lake
Copy link
Contributor

@clay-lake clay-lake commented Oct 21, 2024


Included in this PR:

  • Fix EOL filtering to only exclude builds with no valid tracks.
  • Refactor of src/image/prepare_single_image_build_matrix.py.
  • Upgrade pydantic to 2.8.2 globally.
  • Respective testing for EOL handeling.
  • Testing for image trigger file validator.

@clay-lake clay-lake marked this pull request as ready for review October 21, 2024 10:08
@clay-lake clay-lake requested a review from a team as a code owner October 21, 2024 10:08
Copy link
Contributor

@zhijie-yang zhijie-yang left a comment

Choose a reason for hiding this comment

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

Thanks for the changes. Nicely done. A few nitpicks regarding the formatting. I would also suggest use isort to sort the imports ;)

src/image/requirements.txt Show resolved Hide resolved
tests/unit/test_image_trigger_file_validator.py Outdated Show resolved Hide resolved
tests/unit/test_prepare_single_image_build_matrix.py Outdated Show resolved Hide resolved
tests/unit/test_prepare_single_image_build_matrix.py Outdated Show resolved Hide resolved
tests/unit/test_image_trigger_file_validator.py Outdated Show resolved Hide resolved
src/image/prepare_single_image_build_matrix.py Outdated Show resolved Hide resolved

class InvalidSchemaError(Exception):
"""Raised when image.yaml schema is found."""

Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change


class Config:
extra = pydantic.Extra.forbid
model_config = pydantic.ConfigDict(extra="forbid")


class ChannelsSchema(pydantic.BaseModel):
"""Schema of the 'release' tracks within the image.yaml file."""

Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change

tests/unit/test_image_trigger_file_validator.py Outdated Show resolved Hide resolved
Copy link
Contributor

@zhijie-yang zhijie-yang left a comment

Choose a reason for hiding this comment

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

We will omit the blank line after the docstring in this PR as per the discussion offline. Looks good to me. Thanks.

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