We encountered errors when building multible product versions at the same time with for example
bake -p omid -i 0.0.0-dev
This builds 1.1.0, 1.1.1 and 1.1.2 in parallel, all of which shared the cache volume with the name "maven".
When attempting to delete the cache there was a race condititon that caused the rm for the first container to finish to fail because after the rm the directory was not empty - other containers were still using it.
To fix this we include the product version in the name of the cache volume, which causes every builder to get their own volume.
We might need to revisit this, if we ever want to build the same product version with different other parameters (java version comes to mind). But our toolchain cannot handle this anyway at the moment, so that is a worry for later.
Definition of Done Checklist
Not all of these items are applicable to all PRs, the author should update this template to only leave the boxes in that are relevant
Please make sure all these things are done and tick the boxes
- [ ] Changes are OpenShift compatible
- [ ] All added packages (via microdnf or otherwise) have a comment on why they are added
- [ ] Things not downloaded from Red Hat repositories should be mirrored in the Stackable repository and downloaded from there
- [ ] All packages should have (if available) signatures/hashes verified
- [ ] Add an entry to the CHANGELOG.md file
- [ ] Integration tests ran successfully
TIP: Running integration tests with a new product image
The image can be built and uploaded to the kind cluster with the following commands:
```shell
bake --product --image-version
kind load docker-image --name=
```
See the output of `bake` to retrieve the image tag for ``.
Description
We encountered errors when building multible product versions at the same time with for example
bake -p omid -i 0.0.0-dev
This builds 1.1.0, 1.1.1 and 1.1.2 in parallel, all of which shared the cache volume with the name "maven".
When attempting to delete the cache there was a race condititon that caused the rm for the first container to finish to fail because after the rm the directory was not empty - other containers were still using it.
Error log:
To fix this we include the product version in the name of the cache volume, which causes every builder to get their own volume.
We might need to revisit this, if we ever want to build the same product version with different other parameters (java version comes to mind). But our toolchain cannot handle this anyway at the moment, so that is a worry for later.
Definition of Done Checklist
TIP: Running integration tests with a new product image
The image can be built and uploaded to the kind cluster with the following commands: ```shell bake --product