Skip to content
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

cache_samples.sh should create cache directory if does not exist #1553

Closed
michael-valdron opened this issue May 14, 2024 · 1 comment · Fixed by devfile/registry-support#239
Assignees
Labels
area/registry Devfile registry for stacks and infrastructure kind/bug Something isn't working

Comments

@michael-valdron
Copy link
Member

/kind bug

Which area is this bug related to?

/area registry

Bug Summary

Describe the bug:

The cache_samples.sh helper script fails if the given cache directory path does not exist.

To Reproduce:

Under cloned registry-support, run bash build-tools/cache_samples.sh <path_to_extraDevfileEntries.yaml> <non_existent_caching_path>

Expected behavior

The cache_samples.sh helper script should allow the creation of the cache directory if it does not exist.

Any logs, error output, screenshots etc? Provide the devfile that sees this bug, if applicable

mkdir: cannot create directory ‘samples/.cache/nodejs-basic’: No such file or directory

Additional context

Blocking #1142

Any workaround?

Create the cache directory before running this script. This expects the creation of the cache directory to be handled by all consumers of this helper script.

Suggestion on how to fix the bug

Change mkdir $samplesDir/$sample to mkdir -p $samplesDir/$sample: https://github.com/devfile/registry-support/blob/f77b0bf0fc614951a199fb049db07832d833f4da/build-tools/cache_samples.sh#L106

@michael-valdron michael-valdron self-assigned this May 14, 2024
@openshift-ci openshift-ci bot added kind/bug Something isn't working area/registry Devfile registry for stacks and infrastructure labels May 14, 2024
@michael-valdron michael-valdron moved this to In Progress 🚧 in Devfile Project May 14, 2024
@michael-valdron michael-valdron moved this from In Progress 🚧 to In Review 👀 in Devfile Project May 14, 2024
@michael-valdron
Copy link
Member Author

Sized to 1 to match time spent to create PR: devfile/registry-support#239

PR is ready for review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/registry Devfile registry for stacks and infrastructure kind/bug Something isn't working
Projects
Status: Done ✅
Development

Successfully merging a pull request may close this issue.

1 participant