Skip secrets/vars validation when context is incomplete (#233)

This commit is contained in:
eric sciple
2025-12-08 09:18:18 -06:00
committed by GitHub
parent 69b383af3d
commit e20dbae803
5 changed files with 346 additions and 2 deletions
@@ -40,7 +40,15 @@ export async function getContext(
continue;
}
value = (await config?.getContext(contextName, value, workflowContext, mode)) || value;
const remoteValue = await config?.getContext(contextName, value, workflowContext, mode);
if (remoteValue) {
value = remoteValue;
} else if (contextName === "secrets" || contextName === "vars") {
// Without a context provider to fetch remote secrets/vars, we can't know
// what values exist, so mark the context as incomplete to avoid false
// "Context access might be invalid" warnings
value.complete = false;
}
context.add(contextName, value, getDescription(RootContext, contextName));
}