Extract prefix locks and failure markers from Database#39024
Merged
haampie merged 12 commits intospack:developfrom Aug 7, 2023
Merged
Extract prefix locks and failure markers from Database#39024haampie merged 12 commits intospack:developfrom
haampie merged 12 commits intospack:developfrom
Conversation
This class manages locks for concrete specs
This class manages installation failures
944f9b6 to
a1f4128
Compare
Member
|
a1f4128 is just because flake8 doesn't like type(...) == ... anymore. |
haampie
approved these changes
Aug 7, 2023
Member
Author
|
I approve @haampie 's part, even though I can't ✔️ on a PR I submitted 😆 |
Member
Author
|
Well, first example of pair programming in Spack over slack 🙂 |
mpokorny
pushed a commit
to mpokorny/spack
that referenced
this pull request
Sep 18, 2023
This PR extracts two responsibilities from the `Database` class: 1. Managing locks for prefixes during an installation 2. Marking installation failures and pushes them into their own class (`SpecLocker` and `FailureMarker`). These responsibilities are also pushed up into the `Store`, leaving to `Database` only the duty to manage `index.json` files. `SpecLocker` classes no longer share a global list of locks, but locks are per instance. Their identifier is simply `(dag hash, package name)`, and not the spec prefix path, to avoid circular dependencies across Store / Database / Spec.
alalazo
added a commit
to alalazo/spack
that referenced
this pull request
Jul 9, 2024
This fixture was introduced in spack#16429, and made redundant in spack#39024
haampie
pushed a commit
that referenced
this pull request
Jul 9, 2024
hariharan-devarajan
pushed a commit
to hariharan-devarajan/spack
that referenced
this pull request
Jul 10, 2024
This fixture was introduced in spack#16429, and made redundant in spack#39024
FrederickDeny
pushed a commit
to FrederickDeny/spack
that referenced
this pull request
Aug 26, 2024
This fixture was introduced in spack#16429, and made redundant in spack#39024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR extracts two responsibilities from the
Databaseclass:and pushes them into their own class (
SpecLockerandFailureMarker). These responsibilities are also pushed up into theStore, leaving toDatabaseonly the duty to manageindex.jsonfiles.Locking
SpecLockerclasses no longer share a global list of locks, but locks are per instance. Their identifier is simply(dag hash, package name), and not the spec prefix path, to avoid circular dependencies across Store / Database / Spec.