Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Restore earlier log messages for checkHashPatterns
  • Loading branch information
mbg committed Nov 9, 2025
commit a47d5507cfc59e8bf828011bfbf2808490c2182d
5 changes: 3 additions & 2 deletions lib/analyze-action.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions lib/init-action.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions src/dependency-caching.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ test("checkHashPatterns - logs when no patterns match", async (t) => {
features,
KnownLanguage.csharp,
config,
"download",
getRecordingLogger(messages),
);

Expand Down Expand Up @@ -158,6 +159,7 @@ test("checkHashPatterns - returns patterns when patterns match", async (t) => {
features,
KnownLanguage.csharp,
config,
"upload",
getRecordingLogger(messages),
);

Expand Down
6 changes: 5 additions & 1 deletion src/dependency-caching.ts
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,7 @@ export type DependencyCacheRestoreStatusReport = DependencyCacheRestoreStatus[];
* @param features Information about which FFs are enabled.
* @param language The language the `CacheConfig` is for. For use in the log message.
* @param cacheConfig The caching configuration to call `getHashPatterns` on.
* @param checkType Whether we are checking the patterns for a download or upload.
* @param logger The logger to write the log message to if there is an error.
* @returns An array of glob patterns to use for hashing files, or `undefined` if there are no matching files.
*/
Expand All @@ -209,13 +210,14 @@ export async function checkHashPatterns(
features: FeatureEnablement,
language: Language,
cacheConfig: CacheConfig,
checkType: "download" | "upload",
logger: Logger,
): Promise<string[] | undefined> {
const patterns = await cacheConfig.getHashPatterns(codeql, features);

if (patterns === undefined) {
logger.info(
`Skipping download of dependency cache for ${language} as we cannot calculate a hash for the cache key.`,
`Skipping ${checkType} of dependency cache for ${language} as we cannot calculate a hash for the cache key.`,
);
}

Expand Down Expand Up @@ -257,6 +259,7 @@ export async function downloadDependencyCaches(
features,
language,
cacheConfig,
"download",
logger,
);
if (patterns === undefined) {
Expand Down Expand Up @@ -354,6 +357,7 @@ export async function uploadDependencyCaches(
features,
language,
cacheConfig,
"upload",
logger,
);
if (patterns === undefined) {
Expand Down