Skip to content

Conversation

muddyfish
Copy link
Contributor

Description of change

Add UNSTABLE_CACHE_KEY environment variable.
Using UNSTABLE_CACHE_KEY allows users to specify a cache path disambiguator. This key can be used to ensure that cache directories are unique, even if the cache directory specified is shared.

Relevant issues: N/A

Does this change impact existing behavior?

No breaking changes. This will change behaviour when the UNSTABLE_CACHE_KEY variable is passed.

Does this change need a changelog entry in any of the crates?

No, this is being added as an unstable feature without documentation or promise for continued support.


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license and I agree to the terms of the Developer Certificate of Origin (DCO).

@muddyfish muddyfish had a problem deploying to PR integration tests August 22, 2024 14:05 — with GitHub Actions Failure
@muddyfish muddyfish had a problem deploying to PR integration tests August 22, 2024 14:05 — with GitHub Actions Failure
@muddyfish muddyfish had a problem deploying to PR integration tests August 22, 2024 14:05 — with GitHub Actions Failure
@muddyfish muddyfish had a problem deploying to PR integration tests August 22, 2024 14:05 — with GitHub Actions Failure
@muddyfish muddyfish had a problem deploying to PR integration tests August 22, 2024 14:05 — with GitHub Actions Failure
@muddyfish muddyfish had a problem deploying to PR integration tests August 22, 2024 14:05 — with GitHub Actions Failure
@muddyfish muddyfish had a problem deploying to PR integration tests August 22, 2024 14:05 — with GitHub Actions Failure
@muddyfish muddyfish had a problem deploying to PR integration tests August 22, 2024 14:19 — with GitHub Actions Failure
@muddyfish muddyfish had a problem deploying to PR integration tests August 22, 2024 14:19 — with GitHub Actions Failure
@muddyfish muddyfish had a problem deploying to PR integration tests August 22, 2024 14:19 — with GitHub Actions Failure
@muddyfish muddyfish had a problem deploying to PR integration tests August 22, 2024 14:19 — with GitHub Actions Failure
@muddyfish muddyfish had a problem deploying to PR integration tests August 22, 2024 14:19 — with GitHub Actions Failure
@muddyfish muddyfish had a problem deploying to PR integration tests August 22, 2024 14:19 — with GitHub Actions Failure
@muddyfish muddyfish had a problem deploying to PR integration tests August 22, 2024 14:19 — with GitHub Actions Failure
@muddyfish muddyfish force-pushed the feature/unstable-cache-key branch from 32e4d48 to ec564bd Compare August 22, 2024 14:21
@muddyfish muddyfish temporarily deployed to PR integration tests August 22, 2024 14:21 — with GitHub Actions Inactive
@muddyfish muddyfish temporarily deployed to PR integration tests August 22, 2024 14:21 — with GitHub Actions Inactive
@muddyfish muddyfish temporarily deployed to PR integration tests August 22, 2024 14:21 — with GitHub Actions Inactive
@muddyfish muddyfish temporarily deployed to PR integration tests August 22, 2024 14:21 — with GitHub Actions Inactive
@muddyfish muddyfish temporarily deployed to PR integration tests August 22, 2024 14:21 — with GitHub Actions Inactive
@muddyfish muddyfish temporarily deployed to PR integration tests August 22, 2024 14:21 — with GitHub Actions Inactive
@muddyfish muddyfish temporarily deployed to PR integration tests August 22, 2024 14:21 — with GitHub Actions Inactive
@muddyfish muddyfish requested a review from dannycjones August 22, 2024 15:12
@muddyfish muddyfish had a problem deploying to PR integration tests August 23, 2024 14:44 — with GitHub Actions Failure
@muddyfish muddyfish had a problem deploying to PR integration tests August 23, 2024 14:44 — with GitHub Actions Failure
@muddyfish muddyfish had a problem deploying to PR integration tests August 23, 2024 14:44 — with GitHub Actions Failure
@muddyfish muddyfish had a problem deploying to PR integration tests August 23, 2024 14:44 — with GitHub Actions Failure
@muddyfish muddyfish had a problem deploying to PR integration tests August 23, 2024 14:44 — with GitHub Actions Failure
@muddyfish muddyfish had a problem deploying to PR integration tests August 23, 2024 14:44 — with GitHub Actions Failure
Tidy up cache_directory.rs

Signed-off-by: Simon Beal <simobeal@amazon.com>
…n<OsString>`

Signed-off-by: Simon Beal <simobeal@amazon.com>
Signed-off-by: Simon Beal <simobeal@amazon.com>
Signed-off-by: Simon Beal <simobeal@amazon.com>
@muddyfish muddyfish force-pushed the feature/unstable-cache-key branch from 270150a to 18807d6 Compare August 28, 2024 15:30
@muddyfish muddyfish temporarily deployed to PR integration tests August 28, 2024 15:30 — with GitHub Actions Inactive
@muddyfish muddyfish temporarily deployed to PR integration tests August 28, 2024 15:30 — with GitHub Actions Inactive
@muddyfish muddyfish temporarily deployed to PR integration tests August 28, 2024 15:30 — with GitHub Actions Inactive
@muddyfish muddyfish temporarily deployed to PR integration tests August 28, 2024 15:30 — with GitHub Actions Inactive
@muddyfish muddyfish temporarily deployed to PR integration tests August 28, 2024 15:30 — with GitHub Actions Inactive
@muddyfish muddyfish temporarily deployed to PR integration tests August 28, 2024 15:30 — with GitHub Actions Inactive
@muddyfish muddyfish temporarily deployed to PR integration tests August 28, 2024 15:30 — with GitHub Actions Inactive
@muddyfish muddyfish requested a review from passaro August 28, 2024 15:46
passaro
passaro previously approved these changes Aug 29, 2024
Copy link
Contributor

@passaro passaro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Remaining suggestions are optional.

Signed-off-by: Simon Beal <simobeal@amazon.com>
Signed-off-by: Simon Beal <simobeal@amazon.com>
@muddyfish muddyfish temporarily deployed to PR integration tests August 29, 2024 09:01 — with GitHub Actions Inactive
@muddyfish muddyfish temporarily deployed to PR integration tests August 29, 2024 09:01 — with GitHub Actions Inactive
@muddyfish muddyfish temporarily deployed to PR integration tests August 29, 2024 09:01 — with GitHub Actions Inactive
@muddyfish muddyfish temporarily deployed to PR integration tests August 29, 2024 09:01 — with GitHub Actions Inactive
@muddyfish muddyfish temporarily deployed to PR integration tests August 29, 2024 09:01 — with GitHub Actions Inactive
@muddyfish muddyfish temporarily deployed to PR integration tests August 29, 2024 09:01 — with GitHub Actions Inactive
@muddyfish muddyfish temporarily deployed to PR integration tests August 29, 2024 09:01 — with GitHub Actions Inactive
@muddyfish muddyfish requested a review from passaro August 29, 2024 09:01
Copy link
Contributor

@passaro passaro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

let managed_cache_path = match cache_key {
None => mountpoint_cache_path.clone(),
Some(cache_key) => mountpoint_cache_path.join(hash_cache_key(cache_key.as_bytes())),
Some(ref cache_key) => mountpoint_cache_path.join(hash_cache_key(cache_key.as_bytes())),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI: this is fine, but we usually prefer using a reference in the match, like this:

        let managed_cache_path = match &cache_key {
            None => mountpoint_cache_path.clone(),
            Some(cache_key) => mountpoint_cache_path.join(hash_cache_key(cache_key.as_bytes())),
        };

@muddyfish muddyfish added this pull request to the merge queue Aug 29, 2024
Merged via the queue into awslabs:main with commit fd0bc1a Aug 29, 2024
@muddyfish muddyfish deleted the feature/unstable-cache-key branch August 29, 2024 09:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants