Skip to content

Commit

Permalink
add more logging
Browse files Browse the repository at this point in the history
  • Loading branch information
rarmatei committed Jan 10, 2025
1 parent 164af51 commit 4fe09ee
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 2 deletions.
2 changes: 2 additions & 0 deletions workflow-steps/cache/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ const baseBranchKeys = baseBranch
? [hashedKey].map((k) => `${baseBranch}-${k}`)
: [];

console.log(`Expanded unhashed key is: ${key}\n`);

cacheClient
.restore(
new RestoreRequest({
Expand Down
2 changes: 2 additions & 0 deletions workflow-steps/cache/output/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -6045,6 +6045,8 @@ var key = `${inputKey}|"${stringifiedPaths}"`;
var hashedKey = hashKey(key);
var currentBranchKeys = [hashedKey].map((k) => `${currentBranch}-${k}`);
var baseBranchKeys = baseBranch ? [hashedKey].map((k) => `${baseBranch}-${k}`) : [];
console.log(`Expanded unhashed key is: ${key}
`);
cacheClient.restore(
new RestoreRequest({
keys: [...currentBranchKeys, ...baseBranchKeys]
Expand Down
2 changes: 1 addition & 1 deletion workflow-steps/cache/output/post.js
Original file line number Diff line number Diff line change
Expand Up @@ -6030,7 +6030,7 @@ if (!!cacheWasHit) {
const stringifiedPaths = paths.join(",");
const key = `${inputKey}|"${stringifiedPaths}"`;
const hashedKey = hashKey(key);
console.log(`Expanded cache key is: ${key}`);
console.log(`Expanded unhashed cache key is: ${key}`);
console.log("Storing the following directories:\n" + paths.join("\n"));
console.log(`
under hash: ${process.env.NX_BRANCH}-${hashedKey}`);
Expand Down
2 changes: 1 addition & 1 deletion workflow-steps/cache/post.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ if (!!cacheWasHit) {
const key = `${inputKey}|"${stringifiedPaths}"`;
const hashedKey = hashKey(key);

console.log(`Expanded cache key is: ${key}`);
console.log(`Expanded unhashed cache key is: ${key}`);
console.log('Storing the following directories:\n' + paths.join('\n'));
console.log(`\nunder hash: ${process.env.NX_BRANCH}-${hashedKey}`);

Expand Down

0 comments on commit 4fe09ee

Please sign in to comment.