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

patch(_update_bundle.yaml): Alphabetically sort snap revision list #243

Merged
merged 4 commits into from
Oct 16, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions python/cli/data_platform_workflows_cli/update_bundle.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
from . import github_actions


@dataclasses.dataclass(frozen=True)
@dataclasses.dataclass(order=True, frozen=True)
class Snap:
name: str
revision: int
Expand Down Expand Up @@ -272,7 +272,7 @@ def main():
file.write(yaml_string)

if len(bundle_snaps) > 0:
snaps_data = {"packages": [dataclasses.asdict(snap) for snap in bundle_snaps]}
snaps_data = {"packages": [dataclasses.asdict(snap) for snap in sorted(bundle_snaps)]}
try:
old_snaps_data = yaml.safe_load(pathlib.Path(SNAPS_YAML_PATH).read_text())
except FileNotFoundError:
Expand Down