Skip to content

Conversation

@PeterSchafer
Copy link
Contributor

@PeterSchafer PeterSchafer commented Jul 22, 2024

This PR introduces an additional fallback cache directory to increase fault tolerance of the Snyk CLI. When the first cache directory can't be used it'll try the tmp dir and later only the current dir.
This shall make the CLI function in environments that are very limited in their permissions.

Implementation detail:
I replaced a handwritten mock by a generated mock to easier test, which is why there are a couple of changes in the tests.

Risk: There is a rick that this change of behaviour could cause problems for certain customers the limit strongly from where applications can be executed. Since the primary folder doesn't change and just the first fallback changes, the risk is probably small. Also the last fallback will be as before.

Related Tickets: CLI-409, CLI-576

@PeterSchafer PeterSchafer changed the title fix: introduce additional fall back the user cache directory can't be used fix: introduce additional fall back if the user cache directory can't be used Jul 22, 2024
@PeterSchafer PeterSchafer marked this pull request as ready for review August 7, 2024 10:51
@PeterSchafer PeterSchafer requested a review from a team as a code owner August 7, 2024 10:51
@PeterSchafer PeterSchafer force-pushed the fix/CLI-409_improved_cachedir_usage branch from 3921713 to fccff04 Compare November 25, 2024 17:20
@PeterSchafer PeterSchafer requested a review from a team as a code owner November 25, 2024 17:20
@PeterSchafer PeterSchafer merged commit 602aefa into main Dec 5, 2024
9 checks passed
@PeterSchafer PeterSchafer deleted the fix/CLI-409_improved_cachedir_usage branch December 5, 2024 10:28
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.

3 participants