hammerkit 2.0.0-next.14 → 2.0.0-next.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -723,10 +723,13 @@ exports.getPrivilegedNamespaceProblem = getPrivilegedNamespaceProblem;
723
723
  // What may mount a claim a run kept: the runs of the same branch or tag of a repository,
724
724
  // which share its cache, so that the runs of two branches go side by side and the runs of one find what
725
725
  // the last one left; on a sandbox the runs of that sandbox only, whose claim is on the same
726
- // node or zone as the kept ones. The owner is the namespace's.
726
+ // node or zone as the kept ones. An approved run on a sandbox keeps nothing with those runs,
727
+ // whose outputs nobody approved, as its cache is apart from theirs: it has a scope of its own,
728
+ // per sandbox, so that approved runs on two sandboxes go side by side. The owner is the namespace's.
727
729
  function getVolumeScope(run) {
728
730
  if (run.source.type === 'sandbox' && !run.source.check) {
729
- return `sandbox-${(0, crypto_1.createHash)('sha256').update(run.source.id).digest('hex').slice(0, 24)}`;
731
+ const id = (0, crypto_1.createHash)('sha256').update(run.source.id).digest('hex').slice(0, 24);
732
+ return (run.approvals?.length ?? 0) > 0 ? `approved-${id}` : `sandbox-${id}`;
730
733
  }
731
734
  // a ref given as a commit hash names no branch: its runs keep the repository's claims
732
735
  if (run.source.type === 'ref' && !/^[0-9a-f]{40}([0-9a-f]{24})?$/i.test(run.source.ref)) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "hammerkit",
3
3
  "description": "Containerized build tool with incremental caching that runs the same build file locally, in Docker and on Kubernetes.",
4
- "version": "2.0.0-next.14",
4
+ "version": "2.0.0-next.15",
5
5
  "keywords": [
6
6
  "build",
7
7
  "build-tool",