Project

Profile

Help

Refactor #5068

closed

Refactor depsolving code

Added by dalley over 4 years ago. Updated over 4 years ago.

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

0%

Estimated time:
Platform Release:
2.21.0
Groomed:
No
Sprint Candidate:
No
Tags:
Pulp 2
Sprint:
Sprint 56
Quarter:

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 codeCLOSED - CURRENTRELEASEdalley

Actions
Blocks RPM Support - Issue #5063: Module defaults need to be considered and copied automatically during recursive dependency solvingCLOSED - CURRENTRELEASEdalleyActions

Added by dalley almost 5 years ago

Revision b550dba0 | View on GitHub

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

Actions #1

Updated by dalley over 4 years ago

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

Updated by dalley over 4 years ago

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

Updated by dalley over 4 years 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.

Added by dalley over 4 years ago

Revision 5e3996e7 | View on GitHub

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

Added by dalley over 4 years ago

Revision b07c62d3 | View on GitHub

Simplify DB loading code

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

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

Added by dalley over 4 years ago

Revision 443c7bf5 | View on GitHub

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

Added by dalley over 4 years ago

Revision 4521b78f | View on GitHub

Address PR review feedback

Wanted to rebase but it got nasty

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

Actions #4

Updated by dalley over 4 years ago

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

Updated by dalley over 4 years ago

  • Description updated (diff)
Actions #6

Updated by dalley over 4 years ago

  • Sprint set to Sprint 55
Actions #7

Updated by dalley over 4 years ago

  • Platform Release deleted (master)

Added by dalley over 4 years ago

Revision 5be74efc | View on GitHub

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

Added by dalley over 4 years ago

Revision a99114df | View on GitHub

Fix KeyError

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

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

Added by dalley over 4 years ago

Revision d4ff5204 | View on GitHub

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

Added by dalley over 4 years ago

Revision 02b9411e | View on GitHub

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

Added by dalley over 4 years ago

Revision e1edc3de | View on GitHub

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

Actions #8

Updated by dalley over 4 years 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

Actions #9

Updated by dkliban@redhat.com over 4 years ago

  • Sprint changed from Sprint 55 to Sprint 56
Actions #10

Updated by dalley over 4 years ago

  • Status changed from POST to MODIFIED
Actions #11

Updated by dalley over 4 years ago

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

Updated by dalley over 4 years ago

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

Updated by dalley over 4 years ago

  • Platform Release set to 2.21.0
Actions #14

Updated by dalley over 4 years ago

  • Status changed from MODIFIED to CLOSED - CURRENTRELEASE

Also available in: Atom PDF