Add registries to the init status complete report
Registries might require authentication, before we add it to the report we remove any credentials.
This commit is contained in:
parent
25d25968e6
commit
9f7e0af9f6
2 changed files with 10 additions and 0 deletions
|
|
@ -881,6 +881,13 @@ function parseRegistries(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function parseRegistriesWithoutCredentials(registriesInput?: string) : RegistryConfigNoCredentials[] | undefined {
|
||||||
|
return parseRegistries(registriesInput)?.map((r) => {
|
||||||
|
const {token:_, ...registryWithoutCredentials} = r;
|
||||||
|
return registryWithoutCredentials;
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
function isLocal(configPath: string): boolean {
|
function isLocal(configPath: string): boolean {
|
||||||
// If the path starts with ./, look locally
|
// If the path starts with ./, look locally
|
||||||
if (configPath.indexOf("./") === 0) {
|
if (configPath.indexOf("./") === 0) {
|
||||||
|
|
|
||||||
|
|
@ -93,6 +93,8 @@ interface InitWithConfigStatusReport extends InitStatusReport {
|
||||||
trap_cache_download_size_bytes: number;
|
trap_cache_download_size_bytes: number;
|
||||||
/** Time taken to download TRAP caches, in milliseconds. */
|
/** Time taken to download TRAP caches, in milliseconds. */
|
||||||
trap_cache_download_duration_ms: number;
|
trap_cache_download_duration_ms: number;
|
||||||
|
/** Stringified JSON array of registry configuration objects, from the 'registries' config field or workflow input. **/
|
||||||
|
registries: string;
|
||||||
/** Stringified JSON object representing a query-filters, from the 'query-filters' config field. **/
|
/** Stringified JSON object representing a query-filters, from the 'query-filters' config field. **/
|
||||||
query_filters: string;
|
query_filters: string;
|
||||||
}
|
}
|
||||||
|
|
@ -210,6 +212,7 @@ async function sendCompletedStatusReport(
|
||||||
),
|
),
|
||||||
trap_cache_download_duration_ms: Math.round(config.trapCacheDownloadTime),
|
trap_cache_download_duration_ms: Math.round(config.trapCacheDownloadTime),
|
||||||
query_filters: JSON.stringify(config.originalUserInput["query-filters"]),
|
query_filters: JSON.stringify(config.originalUserInput["query-filters"]),
|
||||||
|
registries: JSON.stringify(configUtils.parseRegistriesWithoutCredentials(getOptionalInput("registries"))),
|
||||||
};
|
};
|
||||||
await sendStatusReport({
|
await sendStatusReport({
|
||||||
...initWithConfigStatusReport,
|
...initWithConfigStatusReport,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue