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

Don't abort if weakremover.inc don't exist on source project #3049

Closed
wants to merge 7 commits into from

Conversation

fcrozat
Copy link
Contributor

@fcrozat fcrozat commented Jan 23, 2024

For ALP, weakremover.inc might not be part of the staging parent project. Just ignore 404 error in that case.

Copy link
Member

@Vogtinator Vogtinator left a comment

Choose a reason for hiding this comment

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

IMO this needs explicit error handling for all possible cases:

(exists in staging, doesn't exist in staging) * (exists in target project, doesn't exist in target project)

In the case that there's a mismatch I'm not sure what it should do though. IMO abort and ask the user to resolve it manually.

Currently it silently ignores any possible errors which is bad.

@codecov-commenter
Copy link

codecov-commenter commented Jan 23, 2024

Codecov Report

Attention: Patch coverage is 72.72727% with 3 lines in your changes are missing coverage. Please review.

Project coverage is 28.02%. Comparing base (7b5a3b7) to head (a5f4943).

Files Patch % Lines
osclib/freeze_command.py 72.72% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3049      +/-   ##
==========================================
+ Coverage   27.99%   28.02%   +0.03%     
==========================================
  Files          86       86              
  Lines       14972    14981       +9     
==========================================
+ Hits         4191     4199       +8     
- Misses      10781    10782       +1     

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

Copy link
Member

@Vogtinator Vogtinator left a comment

Choose a reason for hiding this comment

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

Should ideally check for 404 but it didn't do that before either 🤷

osclib/freeze_command.py Outdated Show resolved Hide resolved
fcrozat and others added 4 commits May 14, 2024 10:44
For ALP, weakremover.inc might not be part of the staging parent
project. Just ignore 404 error in that case.
Co-authored-by: Fabian Vogt <[email protected]>
g7 and others added 3 commits May 15, 2024 14:18
The summary dictionary used to create summary-{scope}.txt was
previously returned by solve_project() via write_all_groups().

After c46dd3e, solve_project()
doesn't return anything anymore, as write_all_groups() is being
invoked just after solve_project().

Thus, the "summary" dictionary would always be None.

Since the summary dict creation is generic enough, move it
to its own function, and call it afterwards after project
solving.

This commit also drops the return statement both on write_all_groups()
and write_productcompose() (where it would always return an empty
dictionary), and moves the write_productcompose() call after
solve_project() as well to match the change with write_all_groups().

Signed-off-by: Eugenio Paolantonio <[email protected]>
@Vogtinator
Copy link
Member

I'd merge, but now there are unrelated commits on top

@fcrozat
Copy link
Contributor Author

fcrozat commented May 15, 2024

I'd merge, but now there are unrelated commits on top

let me fix that, I should have used a topic branch in the first place..

@fcrozat
Copy link
Contributor Author

fcrozat commented May 15, 2024

switching to #3083

@fcrozat fcrozat closed this May 15, 2024
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.

4 participants