-
Notifications
You must be signed in to change notification settings - Fork 20
fix(cas): fall back from unwritable installation pools #349
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
Merged
Merged
Changes from 5 commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
f2342b0
fix(cas): fall back from an unwritable installation CAS pool
bobtista 7d7098d
fix(cas): preserve fallback pool state safely
bobtista a885079
fix(cas): harden writable pool fallback
bobtista 4a1d4f0
fix(cas): honor pool selection cancellation
bobtista 047d0ab
fix(cas): normalize legacy pool roots
bobtista 140f798
fix(cas): avoid duplicate primary legacy storage
bobtista cca0299
test(cas): tolerate cleanup failures in installation pool tests
bobtista 84c836d
refactor(cas): drop a redundant installation-path check
bobtista 7fb0a1b
fix(cas): retain every previous installation pool root for lookup
bobtista File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
24 changes: 24 additions & 0 deletions
24
GenHub/GenHub.Core/Interfaces/Common/IStorageWritabilityProbe.cs
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| namespace GenHub.Core.Interfaces.Common; | ||
|
|
||
| /// <summary> | ||
| /// Determines whether GenHub can create storage at a filesystem location. | ||
| /// </summary> | ||
| public interface IStorageWritabilityProbe | ||
| { | ||
| /// <summary> | ||
| /// Checks whether a directory can be created at, or files written into, the given path. | ||
| /// </summary> | ||
| /// <remarks> | ||
| /// A successful check creates the storage directory when it does not already exist and leaves | ||
| /// that directory in place. Callers should account for this filesystem side effect. | ||
| /// </remarks> | ||
| /// <param name="storagePath">The storage path to check.</param> | ||
| /// <returns><c>true</c> when the location accepts writes; otherwise, <c>false</c>.</returns> | ||
| bool CanCreateStorageAt(string storagePath); | ||
|
|
||
| /// <summary> | ||
| /// Discards any cached result for a storage path so the next check probes the filesystem again. | ||
| /// </summary> | ||
| /// <param name="storagePath">The storage path to re-probe, or <c>null</c> to discard every cached result.</param> | ||
| void Invalidate(string? storagePath = null); | ||
| } | ||
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
19 changes: 19 additions & 0 deletions
19
GenHub/GenHub.Core/Interfaces/Storage/IInstallationCasPoolService.cs
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| using GenHub.Core.Models.GameInstallations; | ||
|
|
||
| namespace GenHub.Core.Interfaces.Storage; | ||
|
|
||
| /// <summary> | ||
| /// Selects and persists an effective installation CAS pool from detected installations. | ||
| /// </summary> | ||
| public interface IInstallationCasPoolService | ||
| { | ||
| /// <summary> | ||
| /// Ensures installation-pool settings reflect the currently detected installations. | ||
| /// </summary> | ||
| /// <param name="installations">The detected game installations.</param> | ||
| /// <param name="cancellationToken">A token that can cancel the settings update.</param> | ||
| /// <returns><c>true</c> when content acquisition may continue; otherwise, <c>false</c>.</returns> | ||
| Task<bool> EnsurePoolPathAsync( | ||
| IReadOnlyList<GameInstallation> installations, | ||
| CancellationToken cancellationToken = default); | ||
| } |
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.