AcademySoftwareFoundation / AcademySoftwareFoundation/rez

add 'solve boundary' to improve resolve caching

Open
#824 0 comments 0 reactions 0 assignees View on GitHub
enhancement resolver
Dominant language
Python
Stars
1.1k
Forks
374
Avg merge
9d 12h
Merged PRs (30d)
5

Description

For any solve, there exists a 'boundary' (a set of package version ranges). Any new package released outside of this boundary, cannot change the results of that solve. For example, the solve ['A-1'] cannot be affected by the release of newer package A-2.0.0.

Currently we do not calculate the boundary, but it could be done during a solve, at virtually no cost. All we need to do (I think) is:

* At each exhaustion phase during a solve, store off all the version ranges of each package scope
* OR together all of these ranges, when the solve is completed.

The boundary is a useful product. It could be used to:

* Invalidate cached resolves less often. Currently, a resolve is invalidated when any newer package has been released that is in the resolved list. So for eg, the resolve ['A-1'] will actually become invalidated if A-2.0.0 is released. If we had the solve boundary, we could use this to only invalidate the solve if any newer packages _within its boundary_ have been released.
* The boundary could be used to drive package archival decisions. For example, you may want to store all solve boundaries produced in the last month, and delete older packages outside of the total union of those boundaries.

Contributor guide

Open the contributing guide

Research direction

Start by locating the solve's exhaustion phases and the resolve-cache invalidation logic. Trace how version ranges and resolved package lists are represented, then determine how a completed solve could expose a combined boundary. Done means the boundary is calculated and cache invalidation uses it without invalidating solves for releases outside that boundary.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.