@@ -31,7 +31,6 @@ import type { OverlayBaseDatabaseDownloadStats } from "./overlay/caching"; |
31 | 31 | import { getRepositoryNwo } from "./repository"; |
32 | 32 | import type { ToolsSource } from "./setup-codeql"; |
33 | 33 | import { registryBaseSchema } from "./start-proxy/types"; |
34 | | -import type { ToolsDownloadStatusReport } from "./tools-download"; |
35 | 34 | import { |
36 | 35 | ConfigurationError, |
37 | 36 | getRequiredEnvParam, |
@@ -625,64 +624,6 @@ export interface InitWithConfigStatusReport extends InitStatusReport { |
625 | 624 | config_file: string; |
626 | 625 | } |
627 | 626 |
|
628 | | -/** Fields of the init status report populated when the tools source is `download`. */ |
629 | | -export interface InitToolsDownloadFields { |
630 | | - /** |
631 | | - * Time taken to download the bundle, in milliseconds. Not populated when the bundle is downloaded |
632 | | - * and extracted concurrently. |
633 | | - */ |
634 | | - tools_download_duration_ms?: ToolsDownloadStatusReport["downloadDurationMs"]; |
635 | | - /** |
636 | | - * Time taken to extract the bundle, in milliseconds. Not populated when the bundle is downloaded |
637 | | - * and extracted concurrently. |
638 | | - */ |
639 | | - tools_extraction_duration_ms?: ToolsDownloadStatusReport["extractionDurationMs"]; |
640 | | - /** |
641 | | - * Total time taken to make the bundle available on disk, including failed download attempts |
642 | | - * before a fallback, in milliseconds. |
643 | | - */ |
644 | | - tools_total_duration_ms?: ToolsDownloadStatusReport["totalDurationMs"]; |
645 | | - /** |
646 | | - * Whether the relevant tools dotcom feature flags have been misconfigured. |
647 | | - * Only populated if we attempt to determine the default version based on the dotcom feature flags. */ |
648 | | - tools_feature_flags_valid?: boolean; |
649 | | - /** The language of the single-language bundle that was downloaded, if any. */ |
650 | | - tools_bundle_language?: ToolsDownloadStatusReport["bundleLanguage"]; |
651 | | - /** |
652 | | - * Whether we tried to download a single-language bundle, but it did not exist and we fell back to |
653 | | - * the combined bundle. |
654 | | - */ |
655 | | - tools_per_language_bundle_fallback?: ToolsDownloadStatusReport["perLanguageBundleFallback"]; |
656 | | -} |
657 | | - |
658 | | -/** Converts download results to telemetry fields shared by the init and setup-codeql Actions. */ |
659 | | -export function createInitToolsDownloadFields( |
660 | | - report: ToolsDownloadStatusReport | undefined, |
661 | | - toolsFeatureFlagsValid: boolean | undefined, |
662 | | -): InitToolsDownloadFields { |
663 | | - const fields: InitToolsDownloadFields = {}; |
664 | | - if (report?.downloadDurationMs !== undefined) { |
665 | | - fields.tools_download_duration_ms = report.downloadDurationMs; |
666 | | - } |
667 | | - if (report?.extractionDurationMs !== undefined) { |
668 | | - fields.tools_extraction_duration_ms = report.extractionDurationMs; |
669 | | - } |
670 | | - if (report?.totalDurationMs !== undefined) { |
671 | | - fields.tools_total_duration_ms = report.totalDurationMs; |
672 | | - } |
673 | | - if (report?.bundleLanguage !== undefined) { |
674 | | - fields.tools_bundle_language = report.bundleLanguage; |
675 | | - } |
676 | | - if (report?.perLanguageBundleFallback !== undefined) { |
677 | | - fields.tools_per_language_bundle_fallback = |
678 | | - report.perLanguageBundleFallback; |
679 | | - } |
680 | | - if (toolsFeatureFlagsValid !== undefined) { |
681 | | - fields.tools_feature_flags_valid = toolsFeatureFlagsValid; |
682 | | - } |
683 | | - return fields; |
684 | | -} |
685 | | - |
686 | 627 | /** |
687 | 628 | * Composes a `InitWithConfigStatusReport` from the given values. |
688 | 629 | * |
|