Project

Profile

Help

Refactor #5068

Refactor depsolving code

Added by dalley 5 months ago. Updated about 2 months ago.

Status:
CLOSED - CURRENTRELEASE
Priority:
Normal
Assignee:
Category:
-
Sprint/Milestone:
-
Start date:
Due date:
% Done:

0%

Platform Release:
2.21.0
Blocks Release:
Groomed:
No
Sprint Candidate:
No
Tags:
Pulp 2
Complexity:
Verified:
No
Verification Required:
No
Sprint:
Sprint 56

Description

Issue created to keep track of refactor commits required to be backported in case of additional fixes.


Related issues

Blocked by RPM Support - Refactor #4923: Document and refactor depsolving code CLOSED - CURRENTRELEASE Actions
Blocks RPM Support - Issue #5063: Module defaults need to be considered and copied automatically during recursive dependency solving CLOSED - CURRENTRELEASE Actions

Associated revisions

Revision b550dba0 View on GitHub
Added by dalley 5 months ago

Refactor depsolving part 2 (necessary for bugfix)

The scope of UnitSolvableMapping needs to be reduced for reasons
discussed on the PR. It makes sense to keep this separate from the
bugfix to reduce noise.

re: #4962
https://pulp.plan.io/issues/4962

Revision 5e3996e7 View on GitHub
Added by dalley 5 months ago

Refactor to remove decorator snake pit

Nested decorators 3-8 deep, sometimes with nontrivial logic inside makes
it difficult to understand what's really going on inside functions. Some
decorators even modify the function signature so that it is called with
different arguments than the docstrings show.

Get rid of all of that. Unrolling everything made the code much easier
to understand and reason about.

re: #5068
https://pulp.plan.io/issues/5068

Revision b07c62d3 View on GitHub
Added by dalley 5 months ago

Simplify DB loading code

.only() is better for us than .excludes()

re: #5068
https://pulp.plan.io/issues/5068

Revision 443c7bf5 View on GitHub
Added by dalley 5 months ago

Replace the Pulp version of module dependency code with MBS version

Use Module Build Service code to create libsolv dependencies for
modules. The code is better commented, cleaner, possibly less buggy and
has had more eyes on it. It is otherwise almost identical. Some of the
MBS implementation was stripped out as not necessary, so this code is closer to
the FUS version.

re: #5068
https://pulp.plan.io/issues/5068

Revision 4521b78f View on GitHub
Added by dalley 5 months ago

Address PR review feedback

Wanted to rebase but it got nasty

re: #5068
https://pulp.plan.io/issues/5068

Revision 5be74efc View on GitHub
Added by dalley 4 months ago

Small refactor

Get rid of a small single-purpose function and replace with a loop.
Move other single-purpose functions into their caller locations.

re: #5068
https://pulp.plan.io/issues/5068

Revision a99114df View on GitHub
Added by dalley 4 months ago

Fix KeyError

Epoch doesn't always exist but we still have to use it.

re: #5068
https://pulp.plan.io/issues/5068

Revision d4ff5204 View on GitHub
Added by dalley 4 months ago

Add an "ignore_missing" parameter to the depsolver

Assist with debugging so that the solvable faking behavior can be
disabled easily.

re: #5068
https://pulp.plan.io/issues/5068

Revision 02b9411e View on GitHub
Added by dalley 4 months ago

Run createwhatprovides() more aggressively

This is probably more than necessary but it doesn't hurt anything and
it's annoying to debug issues where it isn't done often enough.

Also reusing the solver instead of recreating it every attempt.

Also renamed the depsolving methods to have more accurate names.

re: #5068
https://pulp.plan.io/issues/5068

Revision e1edc3de View on GitHub
Added by dalley 4 months ago

Refactor the Solver() handling of target repos

Libsolv only allows one repo at a time to be "installed" so we should
reflect that in the API.

re: #5068
https://pulp.plan.io/issues/5068

History

#1 Updated by dalley 5 months ago

  • Blocks Issue #5063: Module defaults need to be considered and copied automatically during recursive dependency solving added

#2 Updated by dalley 5 months ago

  • Blocked by Refactor #4923: Document and refactor depsolving code added

#3 Updated by dalley 5 months ago

The issue that this issue has a "blocked by" relationship to was merged into 2.20, but will need to be cherry picked into prior releases (2.18, 2.19) during backports.

#4 Updated by dalley 5 months ago

  • Status changed from NEW to MODIFIED
  • Assignee set to dalley
  • Platform Release set to master

#5 Updated by dalley 5 months ago

  • Description updated (diff)

#6 Updated by dalley 5 months ago

  • Sprint set to Sprint 55

#7 Updated by dalley 5 months ago

  • Platform Release deleted (master)

#8 Updated by dalley 4 months ago

  • Status changed from MODIFIED to POST

This PR also - moving back to POST so that the commits will associate.

https://github.com/pulp/pulp_rpm/pull/1401

#9 Updated by dkliban@redhat.com 4 months ago

  • Sprint changed from Sprint 55 to Sprint 56

#10 Updated by dalley 4 months ago

  • Status changed from POST to MODIFIED

#11 Updated by dalley 4 months ago

  • Blocks deleted (Issue #5063: Module defaults need to be considered and copied automatically during recursive dependency solving)

#12 Updated by dalley 4 months ago

  • Blocks Issue #5063: Module defaults need to be considered and copied automatically during recursive dependency solving added

#13 Updated by dalley 3 months ago

  • Platform Release set to 2.21.0

#14 Updated by dalley about 2 months ago

  • Status changed from MODIFIED to CLOSED - CURRENTRELEASE

Please register to edit this issue

Also available in: Atom PDF