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 lp copy packages arbitrary lookback (infra) #1067

Merged
merged 3 commits into from
Mar 15, 2024

Conversation

Hook25
Copy link
Collaborator

@Hook25 Hook25 commented Mar 14, 2024

Description

The lp_copy_packages.py script failed to update our stable PPA because it assumed that any package that had to be copied over was less than 4 weeks old.

This is false for two reasons:

  1. A package has to be copied over regardless of how old it is if it is still the most recent version we have (namely, it took us way more than 1month to release stable this time around)
  2. A package doesn't have to be copied over if it is Superseeded (namely, we have a more current version in the PPA of that same package)

Note: there is a bit more insight on the filter I have left in the comment, but this is the top level view.
Note1: the old comment stating that LP will choke on the request if no date is provided is only true if the iterator that the request returns is fully unwrapped. For this reason this PR only unwraps the relevant part.

Resolved issues

Last stable release failed to update stable channel, see log: https://github.com/canonical/checkbox/actions/runs/7987143879/job/21809020771

(No copying over message -> no package copied over)

Documentation

This PR adds documentation for what the function does and also adds a note about the more "counterintuitive" side of it (the fact that non-superseeded packages may still be non-copy-wrothy)

Tests

This updates the test with the new two cases at hand

Copy link

codecov bot commented Mar 14, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 40.92%. Comparing base (539ec18) to head (08cad09).
Report is 3 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1067   +/-   ##
=======================================
  Coverage   40.92%   40.92%           
=======================================
  Files         337      337           
  Lines       37547    37548    +1     
  Branches     6383     6384    +1     
=======================================
+ Hits        15365    15366    +1     
  Misses      21543    21543           
  Partials      639      639           
Flag Coverage Δ
release-tools 74.32% <100.00%> (+0.06%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

fernando79513

This comment was marked as duplicate.

Copy link
Collaborator

@fernando79513 fernando79513 left a comment

Choose a reason for hiding this comment

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

LGTM +1

@fernando79513 fernando79513 merged commit fbc7fd8 into main Mar 15, 2024
11 checks passed
@fernando79513 fernando79513 deleted the fix_lp_copy_packages_weeks branch March 15, 2024 16:17
fernando79513 pushed a commit that referenced this pull request Mar 18, 2024
* Use date_superseeded and order_by_date instead of time

* Update testing also filtering

* black test_lp_copy_packages.py
LiaoU3 pushed a commit to LiaoU3/checkbox that referenced this pull request Mar 20, 2024
* Use date_superseeded and order_by_date instead of time

* Update testing also filtering

* black test_lp_copy_packages.py
binli pushed a commit to binli/checkbox that referenced this pull request Mar 22, 2024
* Use date_superseeded and order_by_date instead of time

* Update testing also filtering

* black test_lp_copy_packages.py
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.

2 participants