diff --git a/.github/actions/prepare-test/action.yml b/.github/actions/prepare-test/action.yml index 5e2b5028f7..e31ad9c961 100644 --- a/.github/actions/prepare-test/action.yml +++ b/.github/actions/prepare-test/action.yml @@ -12,6 +12,10 @@ inputs: description: "If true, we setup kotlin" default: 'true' required: true + test-directory: + description: "The directory containing the test project that should be moved to the workspace root" + required: false + default: "tests/multi-language-repo" outputs: tools-url: description: "The value that should be passed as the 'tools' input of the 'init' step." @@ -21,10 +25,12 @@ runs: steps: - name: Move codeql-action shell: bash + env: + TEST_DIR: ${{ inputs.test-directory }} run: | mkdir ../action mv * .github ../action/ - mv ../action/tests/multi-language-repo/{*,.github} . + mv ../action/$TEST_DIR/{*,.github} . mv ../action/.github/workflows .github - id: get-url name: Determine URL diff --git a/.github/workflows/__all-platform-bundle.yml b/.github/workflows/__all-platform-bundle.yml index 1547c37612..edb907d1c5 100644 --- a/.github/workflows/__all-platform-bundle.yml +++ b/.github/workflows/__all-platform-bundle.yml @@ -49,8 +49,8 @@ defaults: shell: bash concurrency: cancel-in-progress: ${{ github.event_name == 'pull_request' || false }} - group: - all-platform-bundle-${{github.ref}}-${{inputs.go-version}}-${{inputs.dotnet-version}} + group: |- + all-platform-bundle-${{ github.ref }}-${{ inputs.go-version }}-${{ inputs.dotnet-version }} jobs: all-platform-bundle: strategy: diff --git a/.github/workflows/__analyze-ref-input.yml b/.github/workflows/__analyze-ref-input.yml index 842cfcc081..91eb163847 100644 --- a/.github/workflows/__analyze-ref-input.yml +++ b/.github/workflows/__analyze-ref-input.yml @@ -59,8 +59,8 @@ defaults: shell: bash concurrency: cancel-in-progress: ${{ github.event_name == 'pull_request' || false }} - group: - analyze-ref-input-${{github.ref}}-${{inputs.go-version}}-${{inputs.python-version}}-${{inputs.dotnet-version}} + group: |- + analyze-ref-input-${{ github.ref }}-${{ inputs.go-version }}-${{ inputs.python-version }}-${{ inputs.dotnet-version }} jobs: analyze-ref-input: strategy: diff --git a/.github/workflows/__autobuild-action.yml b/.github/workflows/__autobuild-action.yml index 482d124560..d76aee8924 100644 --- a/.github/workflows/__autobuild-action.yml +++ b/.github/workflows/__autobuild-action.yml @@ -39,7 +39,8 @@ defaults: shell: bash concurrency: cancel-in-progress: ${{ github.event_name == 'pull_request' || false }} - group: autobuild-action-${{github.ref}}-${{inputs.dotnet-version}} + group: |- + autobuild-action-${{ github.ref }}-${{ inputs.dotnet-version }} jobs: autobuild-action: strategy: diff --git a/.github/workflows/__autobuild-direct-tracing-with-working-dir.yml b/.github/workflows/__autobuild-direct-tracing-with-working-dir.yml index 3c218ec265..718302ceb3 100644 --- a/.github/workflows/__autobuild-direct-tracing-with-working-dir.yml +++ b/.github/workflows/__autobuild-direct-tracing-with-working-dir.yml @@ -39,8 +39,8 @@ defaults: shell: bash concurrency: cancel-in-progress: ${{ github.event_name == 'pull_request' || false }} - group: - autobuild-direct-tracing-with-working-dir-${{github.ref}}-${{inputs.java-version}} + group: |- + autobuild-direct-tracing-with-working-dir-${{ github.ref }}-${{ inputs.java-version }} jobs: autobuild-direct-tracing-with-working-dir: strategy: diff --git a/.github/workflows/__autobuild-working-dir.yml b/.github/workflows/__autobuild-working-dir.yml index 77bb424e47..32b427aced 100644 --- a/.github/workflows/__autobuild-working-dir.yml +++ b/.github/workflows/__autobuild-working-dir.yml @@ -29,7 +29,8 @@ defaults: shell: bash concurrency: cancel-in-progress: ${{ github.event_name == 'pull_request' || false }} - group: autobuild-working-dir-${{github.ref}} + group: |- + autobuild-working-dir-${{ github.ref }} jobs: autobuild-working-dir: strategy: diff --git a/.github/workflows/__build-mode-autobuild.yml b/.github/workflows/__build-mode-autobuild.yml index 39ec213811..dd3d6ec9ca 100644 --- a/.github/workflows/__build-mode-autobuild.yml +++ b/.github/workflows/__build-mode-autobuild.yml @@ -39,7 +39,8 @@ defaults: shell: bash concurrency: cancel-in-progress: ${{ github.event_name == 'pull_request' || false }} - group: build-mode-autobuild-${{github.ref}}-${{inputs.java-version}} + group: |- + build-mode-autobuild-${{ github.ref }}-${{ inputs.java-version }} jobs: build-mode-autobuild: strategy: diff --git a/.github/workflows/__build-mode-manual.yml b/.github/workflows/__build-mode-manual.yml index f10e8e36ab..bdda4aff64 100644 --- a/.github/workflows/__build-mode-manual.yml +++ b/.github/workflows/__build-mode-manual.yml @@ -49,8 +49,8 @@ defaults: shell: bash concurrency: cancel-in-progress: ${{ github.event_name == 'pull_request' || false }} - group: - build-mode-manual-${{github.ref}}-${{inputs.go-version}}-${{inputs.dotnet-version}} + group: |- + build-mode-manual-${{ github.ref }}-${{ inputs.go-version }}-${{ inputs.dotnet-version }} jobs: build-mode-manual: strategy: diff --git a/.github/workflows/__build-mode-none.yml b/.github/workflows/__build-mode-none.yml index d4fc1c3da9..3bd0d804a3 100644 --- a/.github/workflows/__build-mode-none.yml +++ b/.github/workflows/__build-mode-none.yml @@ -29,7 +29,8 @@ defaults: shell: bash concurrency: cancel-in-progress: ${{ github.event_name == 'pull_request' || false }} - group: build-mode-none-${{github.ref}} + group: |- + build-mode-none-${{ github.ref }} jobs: build-mode-none: strategy: diff --git a/.github/workflows/__build-mode-rollback.yml b/.github/workflows/__build-mode-rollback.yml index d833e3ad8d..d027d08dfa 100644 --- a/.github/workflows/__build-mode-rollback.yml +++ b/.github/workflows/__build-mode-rollback.yml @@ -29,7 +29,8 @@ defaults: shell: bash concurrency: cancel-in-progress: ${{ github.event_name == 'pull_request' || false }} - group: build-mode-rollback-${{github.ref}} + group: |- + build-mode-rollback-${{ github.ref }} jobs: build-mode-rollback: strategy: diff --git a/.github/workflows/__bundle-from-toolcache.yml b/.github/workflows/__bundle-from-toolcache.yml index 1512c5f38d..d48cf32f02 100644 --- a/.github/workflows/__bundle-from-toolcache.yml +++ b/.github/workflows/__bundle-from-toolcache.yml @@ -29,7 +29,8 @@ defaults: shell: bash concurrency: cancel-in-progress: ${{ github.event_name == 'pull_request' || false }} - group: bundle-from-toolcache-${{github.ref}} + group: |- + bundle-from-toolcache-${{ github.ref }} jobs: bundle-from-toolcache: strategy: diff --git a/.github/workflows/__bundle-toolcache.yml b/.github/workflows/__bundle-toolcache.yml index 0fac371052..c93229f764 100644 --- a/.github/workflows/__bundle-toolcache.yml +++ b/.github/workflows/__bundle-toolcache.yml @@ -29,7 +29,8 @@ defaults: shell: bash concurrency: cancel-in-progress: ${{ github.event_name == 'pull_request' || false }} - group: bundle-toolcache-${{github.ref}} + group: |- + bundle-toolcache-${{ github.ref }} jobs: bundle-toolcache: strategy: diff --git a/.github/workflows/__bundle-zstd.yml b/.github/workflows/__bundle-zstd.yml index 026743c906..df6e5c6b1f 100644 --- a/.github/workflows/__bundle-zstd.yml +++ b/.github/workflows/__bundle-zstd.yml @@ -29,7 +29,8 @@ defaults: shell: bash concurrency: cancel-in-progress: ${{ github.event_name == 'pull_request' || false }} - group: bundle-zstd-${{github.ref}} + group: |- + bundle-zstd-${{ github.ref }} jobs: bundle-zstd: strategy: diff --git a/.github/workflows/__ccr.yml b/.github/workflows/__ccr.yml index d218e7bfc3..8e870b1350 100644 --- a/.github/workflows/__ccr.yml +++ b/.github/workflows/__ccr.yml @@ -29,31 +29,20 @@ defaults: shell: bash concurrency: cancel-in-progress: ${{ github.event_name == 'pull_request' || false }} - group: ccr-${{github.ref}} + group: |- + ccr-${{ github.ref }} jobs: ccr: strategy: fail-fast: false matrix: include: - - os: ubuntu-latest - version: stable-v2.17.6 - - os: ubuntu-latest - version: stable-v2.18.4 - - os: ubuntu-latest - version: stable-v2.19.4 - - os: ubuntu-latest - version: stable-v2.20.7 - - os: ubuntu-latest - version: stable-v2.21.4 - - os: ubuntu-latest - version: stable-v2.22.4 - - os: ubuntu-latest - version: default - os: ubuntu-latest version: linked + test-directory: tests/multi-language-repo - os: ubuntu-latest - version: nightly-latest + version: linked + test-directory: tests/empty-repo name: CCR if: github.triggering_actor != 'dependabot[bot]' permissions: @@ -71,6 +60,7 @@ jobs: version: ${{ matrix.version }} use-all-platform-bundle: 'false' setup-kotlin: 'true' + test-directory: ${{ matrix.test-directory }} - uses: ./../action/init id: init with: diff --git a/.github/workflows/__cleanup-db-cluster-dir.yml b/.github/workflows/__cleanup-db-cluster-dir.yml index 28e9e6fdd6..9fb158d6a6 100644 --- a/.github/workflows/__cleanup-db-cluster-dir.yml +++ b/.github/workflows/__cleanup-db-cluster-dir.yml @@ -29,7 +29,8 @@ defaults: shell: bash concurrency: cancel-in-progress: ${{ github.event_name == 'pull_request' || false }} - group: cleanup-db-cluster-dir-${{github.ref}} + group: |- + cleanup-db-cluster-dir-${{ github.ref }} jobs: cleanup-db-cluster-dir: strategy: diff --git a/.github/workflows/__config-export.yml b/.github/workflows/__config-export.yml index 42a3a1242a..b79ded3812 100644 --- a/.github/workflows/__config-export.yml +++ b/.github/workflows/__config-export.yml @@ -29,7 +29,8 @@ defaults: shell: bash concurrency: cancel-in-progress: ${{ github.event_name == 'pull_request' || false }} - group: config-export-${{github.ref}} + group: |- + config-export-${{ github.ref }} jobs: config-export: strategy: diff --git a/.github/workflows/__config-input.yml b/.github/workflows/__config-input.yml index 7b048ed186..0540ae83f7 100644 --- a/.github/workflows/__config-input.yml +++ b/.github/workflows/__config-input.yml @@ -29,7 +29,8 @@ defaults: shell: bash concurrency: cancel-in-progress: ${{ github.event_name == 'pull_request' || false }} - group: config-input-${{github.ref}} + group: |- + config-input-${{ github.ref }} jobs: config-input: strategy: diff --git a/.github/workflows/__cpp-deptrace-disabled.yml b/.github/workflows/__cpp-deptrace-disabled.yml index 578101d0e7..3fdd76f1c8 100644 --- a/.github/workflows/__cpp-deptrace-disabled.yml +++ b/.github/workflows/__cpp-deptrace-disabled.yml @@ -29,7 +29,8 @@ defaults: shell: bash concurrency: cancel-in-progress: ${{ github.event_name == 'pull_request' || false }} - group: cpp-deptrace-disabled-${{github.ref}} + group: |- + cpp-deptrace-disabled-${{ github.ref }} jobs: cpp-deptrace-disabled: strategy: diff --git a/.github/workflows/__cpp-deptrace-enabled-on-macos.yml b/.github/workflows/__cpp-deptrace-enabled-on-macos.yml index aacbdf8549..88e15311af 100644 --- a/.github/workflows/__cpp-deptrace-enabled-on-macos.yml +++ b/.github/workflows/__cpp-deptrace-enabled-on-macos.yml @@ -29,7 +29,8 @@ defaults: shell: bash concurrency: cancel-in-progress: ${{ github.event_name == 'pull_request' || false }} - group: cpp-deptrace-enabled-on-macos-${{github.ref}} + group: |- + cpp-deptrace-enabled-on-macos-${{ github.ref }} jobs: cpp-deptrace-enabled-on-macos: strategy: diff --git a/.github/workflows/__cpp-deptrace-enabled.yml b/.github/workflows/__cpp-deptrace-enabled.yml index c08e66ff77..6534527dab 100644 --- a/.github/workflows/__cpp-deptrace-enabled.yml +++ b/.github/workflows/__cpp-deptrace-enabled.yml @@ -29,7 +29,8 @@ defaults: shell: bash concurrency: cancel-in-progress: ${{ github.event_name == 'pull_request' || false }} - group: cpp-deptrace-enabled-${{github.ref}} + group: |- + cpp-deptrace-enabled-${{ github.ref }} jobs: cpp-deptrace-enabled: strategy: diff --git a/.github/workflows/__diagnostics-export.yml b/.github/workflows/__diagnostics-export.yml index c39524a97c..b968201d39 100644 --- a/.github/workflows/__diagnostics-export.yml +++ b/.github/workflows/__diagnostics-export.yml @@ -29,7 +29,8 @@ defaults: shell: bash concurrency: cancel-in-progress: ${{ github.event_name == 'pull_request' || false }} - group: diagnostics-export-${{github.ref}} + group: |- + diagnostics-export-${{ github.ref }} jobs: diagnostics-export: strategy: diff --git a/.github/workflows/__export-file-baseline-information.yml b/.github/workflows/__export-file-baseline-information.yml index f157c23f75..8df7502da6 100644 --- a/.github/workflows/__export-file-baseline-information.yml +++ b/.github/workflows/__export-file-baseline-information.yml @@ -49,8 +49,8 @@ defaults: shell: bash concurrency: cancel-in-progress: ${{ github.event_name == 'pull_request' || false }} - group: - export-file-baseline-information-${{github.ref}}-${{inputs.go-version}}-${{inputs.dotnet-version}} + group: |- + export-file-baseline-information-${{ github.ref }}-${{ inputs.go-version }}-${{ inputs.dotnet-version }} jobs: export-file-baseline-information: strategy: diff --git a/.github/workflows/__extractor-ram-threads.yml b/.github/workflows/__extractor-ram-threads.yml index 7c3c6e0b0d..c39644fcf9 100644 --- a/.github/workflows/__extractor-ram-threads.yml +++ b/.github/workflows/__extractor-ram-threads.yml @@ -29,7 +29,8 @@ defaults: shell: bash concurrency: cancel-in-progress: ${{ github.event_name == 'pull_request' || false }} - group: extractor-ram-threads-${{github.ref}} + group: |- + extractor-ram-threads-${{ github.ref }} jobs: extractor-ram-threads: strategy: diff --git a/.github/workflows/__global-proxy.yml b/.github/workflows/__global-proxy.yml index 1c230db094..12af64cecb 100644 --- a/.github/workflows/__global-proxy.yml +++ b/.github/workflows/__global-proxy.yml @@ -29,7 +29,8 @@ defaults: shell: bash concurrency: cancel-in-progress: ${{ github.event_name == 'pull_request' || false }} - group: global-proxy-${{github.ref}} + group: |- + global-proxy-${{ github.ref }} jobs: global-proxy: strategy: diff --git a/.github/workflows/__go-custom-queries.yml b/.github/workflows/__go-custom-queries.yml index 715a1758a7..e1b6ea5d34 100644 --- a/.github/workflows/__go-custom-queries.yml +++ b/.github/workflows/__go-custom-queries.yml @@ -49,8 +49,8 @@ defaults: shell: bash concurrency: cancel-in-progress: ${{ github.event_name == 'pull_request' || false }} - group: - go-custom-queries-${{github.ref}}-${{inputs.go-version}}-${{inputs.dotnet-version}} + group: |- + go-custom-queries-${{ github.ref }}-${{ inputs.go-version }}-${{ inputs.dotnet-version }} jobs: go-custom-queries: strategy: diff --git a/.github/workflows/__go-indirect-tracing-workaround-diagnostic.yml b/.github/workflows/__go-indirect-tracing-workaround-diagnostic.yml index b869d3ebc0..9c65024264 100644 --- a/.github/workflows/__go-indirect-tracing-workaround-diagnostic.yml +++ b/.github/workflows/__go-indirect-tracing-workaround-diagnostic.yml @@ -39,7 +39,8 @@ defaults: shell: bash concurrency: cancel-in-progress: ${{ github.event_name == 'pull_request' || false }} - group: go-indirect-tracing-workaround-diagnostic-${{github.ref}}-${{inputs.go-version}} + group: |- + go-indirect-tracing-workaround-diagnostic-${{ github.ref }}-${{ inputs.go-version }} jobs: go-indirect-tracing-workaround-diagnostic: strategy: diff --git a/.github/workflows/__go-indirect-tracing-workaround-no-file-program.yml b/.github/workflows/__go-indirect-tracing-workaround-no-file-program.yml index 33bde34146..424d3b84a9 100644 --- a/.github/workflows/__go-indirect-tracing-workaround-no-file-program.yml +++ b/.github/workflows/__go-indirect-tracing-workaround-no-file-program.yml @@ -39,8 +39,8 @@ defaults: shell: bash concurrency: cancel-in-progress: ${{ github.event_name == 'pull_request' || false }} - group: - go-indirect-tracing-workaround-no-file-program-${{github.ref}}-${{inputs.go-version}} + group: |- + go-indirect-tracing-workaround-no-file-program-${{ github.ref }}-${{ inputs.go-version }} jobs: go-indirect-tracing-workaround-no-file-program: strategy: diff --git a/.github/workflows/__go-indirect-tracing-workaround.yml b/.github/workflows/__go-indirect-tracing-workaround.yml index 848dc7a98a..605dc0f318 100644 --- a/.github/workflows/__go-indirect-tracing-workaround.yml +++ b/.github/workflows/__go-indirect-tracing-workaround.yml @@ -39,7 +39,8 @@ defaults: shell: bash concurrency: cancel-in-progress: ${{ github.event_name == 'pull_request' || false }} - group: go-indirect-tracing-workaround-${{github.ref}}-${{inputs.go-version}} + group: |- + go-indirect-tracing-workaround-${{ github.ref }}-${{ inputs.go-version }} jobs: go-indirect-tracing-workaround: strategy: diff --git a/.github/workflows/__go-tracing-autobuilder.yml b/.github/workflows/__go-tracing-autobuilder.yml index 2c33de351e..dea294d851 100644 --- a/.github/workflows/__go-tracing-autobuilder.yml +++ b/.github/workflows/__go-tracing-autobuilder.yml @@ -39,7 +39,8 @@ defaults: shell: bash concurrency: cancel-in-progress: ${{ github.event_name == 'pull_request' || false }} - group: go-tracing-autobuilder-${{github.ref}}-${{inputs.go-version}} + group: |- + go-tracing-autobuilder-${{ github.ref }}-${{ inputs.go-version }} jobs: go-tracing-autobuilder: strategy: diff --git a/.github/workflows/__go-tracing-custom-build-steps.yml b/.github/workflows/__go-tracing-custom-build-steps.yml index 0f0ca6e503..0315d8efd0 100644 --- a/.github/workflows/__go-tracing-custom-build-steps.yml +++ b/.github/workflows/__go-tracing-custom-build-steps.yml @@ -39,7 +39,8 @@ defaults: shell: bash concurrency: cancel-in-progress: ${{ github.event_name == 'pull_request' || false }} - group: go-tracing-custom-build-steps-${{github.ref}}-${{inputs.go-version}} + group: |- + go-tracing-custom-build-steps-${{ github.ref }}-${{ inputs.go-version }} jobs: go-tracing-custom-build-steps: strategy: diff --git a/.github/workflows/__go-tracing-legacy-workflow.yml b/.github/workflows/__go-tracing-legacy-workflow.yml index 136deca855..3c605baa6b 100644 --- a/.github/workflows/__go-tracing-legacy-workflow.yml +++ b/.github/workflows/__go-tracing-legacy-workflow.yml @@ -39,7 +39,8 @@ defaults: shell: bash concurrency: cancel-in-progress: ${{ github.event_name == 'pull_request' || false }} - group: go-tracing-legacy-workflow-${{github.ref}}-${{inputs.go-version}} + group: |- + go-tracing-legacy-workflow-${{ github.ref }}-${{ inputs.go-version }} jobs: go-tracing-legacy-workflow: strategy: diff --git a/.github/workflows/__init-with-registries.yml b/.github/workflows/__init-with-registries.yml index bd088572c8..7baeab21ec 100644 --- a/.github/workflows/__init-with-registries.yml +++ b/.github/workflows/__init-with-registries.yml @@ -29,7 +29,8 @@ defaults: shell: bash concurrency: cancel-in-progress: ${{ github.event_name == 'pull_request' || false }} - group: init-with-registries-${{github.ref}} + group: |- + init-with-registries-${{ github.ref }} jobs: init-with-registries: strategy: diff --git a/.github/workflows/__javascript-source-root.yml b/.github/workflows/__javascript-source-root.yml index a39db258cd..bd830b213c 100644 --- a/.github/workflows/__javascript-source-root.yml +++ b/.github/workflows/__javascript-source-root.yml @@ -29,7 +29,8 @@ defaults: shell: bash concurrency: cancel-in-progress: ${{ github.event_name == 'pull_request' || false }} - group: javascript-source-root-${{github.ref}} + group: |- + javascript-source-root-${{ github.ref }} jobs: javascript-source-root: strategy: diff --git a/.github/workflows/__job-run-uuid-sarif.yml b/.github/workflows/__job-run-uuid-sarif.yml index cecb2bf461..b6a5e26ee1 100644 --- a/.github/workflows/__job-run-uuid-sarif.yml +++ b/.github/workflows/__job-run-uuid-sarif.yml @@ -29,7 +29,8 @@ defaults: shell: bash concurrency: cancel-in-progress: ${{ github.event_name == 'pull_request' || false }} - group: job-run-uuid-sarif-${{github.ref}} + group: |- + job-run-uuid-sarif-${{ github.ref }} jobs: job-run-uuid-sarif: strategy: diff --git a/.github/workflows/__language-aliases.yml b/.github/workflows/__language-aliases.yml index b7f9691f6a..2095b079f1 100644 --- a/.github/workflows/__language-aliases.yml +++ b/.github/workflows/__language-aliases.yml @@ -29,7 +29,8 @@ defaults: shell: bash concurrency: cancel-in-progress: ${{ github.event_name == 'pull_request' || false }} - group: language-aliases-${{github.ref}} + group: |- + language-aliases-${{ github.ref }} jobs: language-aliases: strategy: diff --git a/.github/workflows/__local-bundle.yml b/.github/workflows/__local-bundle.yml index 420be84b84..ad69cbbb3a 100644 --- a/.github/workflows/__local-bundle.yml +++ b/.github/workflows/__local-bundle.yml @@ -59,8 +59,8 @@ defaults: shell: bash concurrency: cancel-in-progress: ${{ github.event_name == 'pull_request' || false }} - group: - local-bundle-${{github.ref}}-${{inputs.go-version}}-${{inputs.python-version}}-${{inputs.dotnet-version}} + group: |- + local-bundle-${{ github.ref }}-${{ inputs.go-version }}-${{ inputs.python-version }}-${{ inputs.dotnet-version }} jobs: local-bundle: strategy: diff --git a/.github/workflows/__multi-language-autodetect.yml b/.github/workflows/__multi-language-autodetect.yml index d34d5829a4..c7296144f4 100644 --- a/.github/workflows/__multi-language-autodetect.yml +++ b/.github/workflows/__multi-language-autodetect.yml @@ -59,8 +59,8 @@ defaults: shell: bash concurrency: cancel-in-progress: ${{ github.event_name == 'pull_request' || false }} - group: - multi-language-autodetect-${{github.ref}}-${{inputs.go-version}}-${{inputs.python-version}}-${{inputs.dotnet-version}} + group: |- + multi-language-autodetect-${{ github.ref }}-${{ inputs.go-version }}-${{ inputs.python-version }}-${{ inputs.dotnet-version }} jobs: multi-language-autodetect: strategy: diff --git a/.github/workflows/__overlay-init-fallback.yml b/.github/workflows/__overlay-init-fallback.yml index cc2a189841..9a5f2ecc5f 100644 --- a/.github/workflows/__overlay-init-fallback.yml +++ b/.github/workflows/__overlay-init-fallback.yml @@ -29,7 +29,8 @@ defaults: shell: bash concurrency: cancel-in-progress: ${{ github.event_name == 'pull_request' || false }} - group: overlay-init-fallback-${{github.ref}} + group: |- + overlay-init-fallback-${{ github.ref }} jobs: overlay-init-fallback: strategy: diff --git a/.github/workflows/__packaging-codescanning-config-inputs-js.yml b/.github/workflows/__packaging-codescanning-config-inputs-js.yml index 5c846d32c8..baee50b35e 100644 --- a/.github/workflows/__packaging-codescanning-config-inputs-js.yml +++ b/.github/workflows/__packaging-codescanning-config-inputs-js.yml @@ -59,8 +59,8 @@ defaults: shell: bash concurrency: cancel-in-progress: ${{ github.event_name == 'pull_request' || false }} - group: - packaging-codescanning-config-inputs-js-${{github.ref}}-${{inputs.go-version}}-${{inputs.python-version}}-${{inputs.dotnet-version}} + group: |- + packaging-codescanning-config-inputs-js-${{ github.ref }}-${{ inputs.go-version }}-${{ inputs.python-version }}-${{ inputs.dotnet-version }} jobs: packaging-codescanning-config-inputs-js: strategy: diff --git a/.github/workflows/__packaging-config-inputs-js.yml b/.github/workflows/__packaging-config-inputs-js.yml index 42c5fb38af..317d3e12fd 100644 --- a/.github/workflows/__packaging-config-inputs-js.yml +++ b/.github/workflows/__packaging-config-inputs-js.yml @@ -49,8 +49,8 @@ defaults: shell: bash concurrency: cancel-in-progress: ${{ github.event_name == 'pull_request' || false }} - group: - packaging-config-inputs-js-${{github.ref}}-${{inputs.go-version}}-${{inputs.dotnet-version}} + group: |- + packaging-config-inputs-js-${{ github.ref }}-${{ inputs.go-version }}-${{ inputs.dotnet-version }} jobs: packaging-config-inputs-js: strategy: diff --git a/.github/workflows/__packaging-config-js.yml b/.github/workflows/__packaging-config-js.yml index 8dfa834c3d..aa219d9d04 100644 --- a/.github/workflows/__packaging-config-js.yml +++ b/.github/workflows/__packaging-config-js.yml @@ -49,8 +49,8 @@ defaults: shell: bash concurrency: cancel-in-progress: ${{ github.event_name == 'pull_request' || false }} - group: - packaging-config-js-${{github.ref}}-${{inputs.go-version}}-${{inputs.dotnet-version}} + group: |- + packaging-config-js-${{ github.ref }}-${{ inputs.go-version }}-${{ inputs.dotnet-version }} jobs: packaging-config-js: strategy: diff --git a/.github/workflows/__packaging-inputs-js.yml b/.github/workflows/__packaging-inputs-js.yml index 883b0d47ac..9903108188 100644 --- a/.github/workflows/__packaging-inputs-js.yml +++ b/.github/workflows/__packaging-inputs-js.yml @@ -49,8 +49,8 @@ defaults: shell: bash concurrency: cancel-in-progress: ${{ github.event_name == 'pull_request' || false }} - group: - packaging-inputs-js-${{github.ref}}-${{inputs.go-version}}-${{inputs.dotnet-version}} + group: |- + packaging-inputs-js-${{ github.ref }}-${{ inputs.go-version }}-${{ inputs.dotnet-version }} jobs: packaging-inputs-js: strategy: diff --git a/.github/workflows/__quality-queries.yml b/.github/workflows/__quality-queries.yml index fdbe0e812a..0621b6a909 100644 --- a/.github/workflows/__quality-queries.yml +++ b/.github/workflows/__quality-queries.yml @@ -29,7 +29,8 @@ defaults: shell: bash concurrency: cancel-in-progress: ${{ github.event_name == 'pull_request' || false }} - group: quality-queries-${{github.ref}} + group: |- + quality-queries-${{ github.ref }} jobs: quality-queries: strategy: diff --git a/.github/workflows/__remote-config.yml b/.github/workflows/__remote-config.yml index 2164a41b89..770fe134b0 100644 --- a/.github/workflows/__remote-config.yml +++ b/.github/workflows/__remote-config.yml @@ -59,8 +59,8 @@ defaults: shell: bash concurrency: cancel-in-progress: ${{ github.event_name == 'pull_request' || false }} - group: - remote-config-${{github.ref}}-${{inputs.go-version}}-${{inputs.python-version}}-${{inputs.dotnet-version}} + group: |- + remote-config-${{ github.ref }}-${{ inputs.go-version }}-${{ inputs.python-version }}-${{ inputs.dotnet-version }} jobs: remote-config: strategy: diff --git a/.github/workflows/__resolve-environment-action.yml b/.github/workflows/__resolve-environment-action.yml index b9deb5fadb..9e4a0cd5ac 100644 --- a/.github/workflows/__resolve-environment-action.yml +++ b/.github/workflows/__resolve-environment-action.yml @@ -29,7 +29,8 @@ defaults: shell: bash concurrency: cancel-in-progress: ${{ github.event_name == 'pull_request' || false }} - group: resolve-environment-action-${{github.ref}} + group: |- + resolve-environment-action-${{ github.ref }} jobs: resolve-environment-action: strategy: diff --git a/.github/workflows/__rubocop-multi-language.yml b/.github/workflows/__rubocop-multi-language.yml index b294d9f24e..acdbdd4358 100644 --- a/.github/workflows/__rubocop-multi-language.yml +++ b/.github/workflows/__rubocop-multi-language.yml @@ -29,7 +29,8 @@ defaults: shell: bash concurrency: cancel-in-progress: ${{ github.event_name == 'pull_request' || false }} - group: rubocop-multi-language-${{github.ref}} + group: |- + rubocop-multi-language-${{ github.ref }} jobs: rubocop-multi-language: strategy: diff --git a/.github/workflows/__ruby.yml b/.github/workflows/__ruby.yml index 97331fd10a..3b52950cfc 100644 --- a/.github/workflows/__ruby.yml +++ b/.github/workflows/__ruby.yml @@ -29,7 +29,8 @@ defaults: shell: bash concurrency: cancel-in-progress: ${{ github.event_name == 'pull_request' || false }} - group: ruby-${{github.ref}} + group: |- + ruby-${{ github.ref }} jobs: ruby: strategy: diff --git a/.github/workflows/__rust.yml b/.github/workflows/__rust.yml index 24744c4a5c..7b16551e89 100644 --- a/.github/workflows/__rust.yml +++ b/.github/workflows/__rust.yml @@ -29,7 +29,8 @@ defaults: shell: bash concurrency: cancel-in-progress: ${{ github.event_name == 'pull_request' || false }} - group: rust-${{github.ref}} + group: |- + rust-${{ github.ref }} jobs: rust: strategy: diff --git a/.github/workflows/__split-workflow.yml b/.github/workflows/__split-workflow.yml index c37899e609..25a623c1f1 100644 --- a/.github/workflows/__split-workflow.yml +++ b/.github/workflows/__split-workflow.yml @@ -49,7 +49,8 @@ defaults: shell: bash concurrency: cancel-in-progress: ${{ github.event_name == 'pull_request' || false }} - group: split-workflow-${{github.ref}}-${{inputs.go-version}}-${{inputs.dotnet-version}} + group: |- + split-workflow-${{ github.ref }}-${{ inputs.go-version }}-${{ inputs.dotnet-version }} jobs: split-workflow: strategy: diff --git a/.github/workflows/__start-proxy.yml b/.github/workflows/__start-proxy.yml index 5d2019b49e..b349fdfe1f 100644 --- a/.github/workflows/__start-proxy.yml +++ b/.github/workflows/__start-proxy.yml @@ -29,7 +29,8 @@ defaults: shell: bash concurrency: cancel-in-progress: ${{ github.event_name == 'pull_request' || false }} - group: start-proxy-${{github.ref}} + group: |- + start-proxy-${{ github.ref }} jobs: start-proxy: strategy: diff --git a/.github/workflows/__submit-sarif-failure.yml b/.github/workflows/__submit-sarif-failure.yml index 7b9b6bc050..3e8cdbeea6 100644 --- a/.github/workflows/__submit-sarif-failure.yml +++ b/.github/workflows/__submit-sarif-failure.yml @@ -29,7 +29,8 @@ defaults: shell: bash concurrency: cancel-in-progress: ${{ github.event_name == 'pull_request' || false }} - group: submit-sarif-failure-${{github.ref}} + group: |- + submit-sarif-failure-${{ github.ref }} jobs: submit-sarif-failure: strategy: diff --git a/.github/workflows/__swift-autobuild.yml b/.github/workflows/__swift-autobuild.yml index 0c51a28ff9..e1e96cf75e 100644 --- a/.github/workflows/__swift-autobuild.yml +++ b/.github/workflows/__swift-autobuild.yml @@ -29,7 +29,8 @@ defaults: shell: bash concurrency: cancel-in-progress: ${{ github.event_name == 'pull_request' || false }} - group: swift-autobuild-${{github.ref}} + group: |- + swift-autobuild-${{ github.ref }} jobs: swift-autobuild: strategy: diff --git a/.github/workflows/__swift-custom-build.yml b/.github/workflows/__swift-custom-build.yml index d5862cc5d7..24798aa737 100644 --- a/.github/workflows/__swift-custom-build.yml +++ b/.github/workflows/__swift-custom-build.yml @@ -49,8 +49,8 @@ defaults: shell: bash concurrency: cancel-in-progress: ${{ github.event_name == 'pull_request' || false }} - group: - swift-custom-build-${{github.ref}}-${{inputs.go-version}}-${{inputs.dotnet-version}} + group: |- + swift-custom-build-${{ github.ref }}-${{ inputs.go-version }}-${{ inputs.dotnet-version }} jobs: swift-custom-build: strategy: diff --git a/.github/workflows/__unset-environment.yml b/.github/workflows/__unset-environment.yml index b823bcf113..4e13d8f2c1 100644 --- a/.github/workflows/__unset-environment.yml +++ b/.github/workflows/__unset-environment.yml @@ -59,8 +59,8 @@ defaults: shell: bash concurrency: cancel-in-progress: ${{ github.event_name == 'pull_request' || false }} - group: - unset-environment-${{github.ref}}-${{inputs.go-version}}-${{inputs.python-version}}-${{inputs.dotnet-version}} + group: |- + unset-environment-${{ github.ref }}-${{ inputs.go-version }}-${{ inputs.python-version }}-${{ inputs.dotnet-version }} jobs: unset-environment: strategy: diff --git a/.github/workflows/__upload-ref-sha-input.yml b/.github/workflows/__upload-ref-sha-input.yml index cba2702f04..6e4d60d9d1 100644 --- a/.github/workflows/__upload-ref-sha-input.yml +++ b/.github/workflows/__upload-ref-sha-input.yml @@ -59,8 +59,8 @@ defaults: shell: bash concurrency: cancel-in-progress: ${{ github.event_name == 'pull_request' || false }} - group: - upload-ref-sha-input-${{github.ref}}-${{inputs.go-version}}-${{inputs.python-version}}-${{inputs.dotnet-version}} + group: |- + upload-ref-sha-input-${{ github.ref }}-${{ inputs.go-version }}-${{ inputs.python-version }}-${{ inputs.dotnet-version }} jobs: upload-ref-sha-input: strategy: diff --git a/.github/workflows/__upload-sarif.yml b/.github/workflows/__upload-sarif.yml index 0ab7c03087..7b64e29f04 100644 --- a/.github/workflows/__upload-sarif.yml +++ b/.github/workflows/__upload-sarif.yml @@ -59,8 +59,8 @@ defaults: shell: bash concurrency: cancel-in-progress: ${{ github.event_name == 'pull_request' || false }} - group: - upload-sarif-${{github.ref}}-${{inputs.go-version}}-${{inputs.python-version}}-${{inputs.dotnet-version}} + group: |- + upload-sarif-${{ github.ref }}-${{ inputs.go-version }}-${{ inputs.python-version }}-${{ inputs.dotnet-version }} jobs: upload-sarif: strategy: diff --git a/.github/workflows/__with-checkout-path.yml b/.github/workflows/__with-checkout-path.yml index 00ddb28c04..9ea37d6cf2 100644 --- a/.github/workflows/__with-checkout-path.yml +++ b/.github/workflows/__with-checkout-path.yml @@ -59,8 +59,8 @@ defaults: shell: bash concurrency: cancel-in-progress: ${{ github.event_name == 'pull_request' || false }} - group: - with-checkout-path-${{github.ref}}-${{inputs.go-version}}-${{inputs.python-version}}-${{inputs.dotnet-version}} + group: |- + with-checkout-path-${{ github.ref }}-${{ inputs.go-version }}-${{ inputs.python-version }}-${{ inputs.dotnet-version }} jobs: with-checkout-path: strategy: diff --git a/lib/analyze-action-post.js b/lib/analyze-action-post.js index beab5657dc..f603171a5b 100644 --- a/lib/analyze-action-post.js +++ b/lib/analyze-action-post.js @@ -124149,6 +124149,7 @@ var cliErrorsConfig = { // was unintended to have CodeQL analysis run on it. ["NoSourceCodeSeen" /* NoSourceCodeSeen */]: { exitCode: 32, + toleratedByCCR: true, cliErrorMessageCandidates: [ new RegExp( "CodeQL detected code written in .* but could not process any of it" @@ -124237,6 +124238,15 @@ function getUnsupportedPlatformError(cliError) { `The CodeQL CLI does not support the platform/architecture combination of ${process.platform}/${process.arch} (see ${"https://codeql.github.com/docs/codeql-overview/system-requirements/" /* SYSTEM_REQUIREMENTS */}). The underlying error was: ${cliError.message}` ); } +var ToleratedConfigurationError = class extends ConfigurationError { + constructor(category, message) { + super(message); + this.category = category; + } + getCategory() { + return this.category; + } +}; function wrapCliConfigurationError(cliError) { if (isUnsupportedPlatform()) { return getUnsupportedPlatformError(cliError); @@ -124250,6 +124260,12 @@ function wrapCliConfigurationError(cliError) { if (additionalErrorMessageToAppend !== void 0) { errorMessageBuilder = `${errorMessageBuilder} ${additionalErrorMessageToAppend}`; } + if (cliErrorsConfig[cliConfigErrorCategory].toleratedByCCR) { + return new ToleratedConfigurationError( + cliConfigErrorCategory, + errorMessageBuilder + ); + } return new ConfigurationError(errorMessageBuilder); } diff --git a/lib/analyze-action.js b/lib/analyze-action.js index 1ac83ed0a6..6f47a9c155 100644 --- a/lib/analyze-action.js +++ b/lib/analyze-action.js @@ -90469,6 +90469,7 @@ var cliErrorsConfig = { // was unintended to have CodeQL analysis run on it. ["NoSourceCodeSeen" /* NoSourceCodeSeen */]: { exitCode: 32, + toleratedByCCR: true, cliErrorMessageCandidates: [ new RegExp( "CodeQL detected code written in .* but could not process any of it" @@ -90557,6 +90558,15 @@ function getUnsupportedPlatformError(cliError) { `The CodeQL CLI does not support the platform/architecture combination of ${process.platform}/${process.arch} (see ${"https://codeql.github.com/docs/codeql-overview/system-requirements/" /* SYSTEM_REQUIREMENTS */}). The underlying error was: ${cliError.message}` ); } +var ToleratedConfigurationError = class extends ConfigurationError { + constructor(category, message) { + super(message); + this.category = category; + } + getCategory() { + return this.category; + } +}; function wrapCliConfigurationError(cliError) { if (isUnsupportedPlatform()) { return getUnsupportedPlatformError(cliError); @@ -90570,6 +90580,12 @@ function wrapCliConfigurationError(cliError) { if (additionalErrorMessageToAppend !== void 0) { errorMessageBuilder = `${errorMessageBuilder} ${additionalErrorMessageToAppend}`; } + if (cliErrorsConfig[cliConfigErrorCategory].toleratedByCCR) { + return new ToleratedConfigurationError( + cliConfigErrorCategory, + errorMessageBuilder + ); + } return new ConfigurationError(errorMessageBuilder); } @@ -96513,7 +96529,8 @@ async function run() { core14.exportVariable("CODEQL_ACTION_ANALYZE_DID_COMPLETE_SUCCESSFULLY" /* ANALYZE_DID_COMPLETE_SUCCESSFULLY */, "true"); } catch (unwrappedError) { const error3 = wrapError(unwrappedError); - if (getOptionalInput("expect-error") !== "true" || hasBadExpectErrorInput()) { + const tolerateErrorForCCR = isCCR() && error3 instanceof ToleratedConfigurationError; + if (!tolerateErrorForCCR && (getOptionalInput("expect-error") !== "true" || hasBadExpectErrorInput())) { core14.setFailed(error3.message); } await sendStatusReport2( diff --git a/lib/autobuild-action.js b/lib/autobuild-action.js index 5445cc0f96..e78083a1d0 100644 --- a/lib/autobuild-action.js +++ b/lib/autobuild-action.js @@ -87049,6 +87049,7 @@ var cliErrorsConfig = { // was unintended to have CodeQL analysis run on it. ["NoSourceCodeSeen" /* NoSourceCodeSeen */]: { exitCode: 32, + toleratedByCCR: true, cliErrorMessageCandidates: [ new RegExp( "CodeQL detected code written in .* but could not process any of it" @@ -87137,6 +87138,15 @@ function getUnsupportedPlatformError(cliError) { `The CodeQL CLI does not support the platform/architecture combination of ${process.platform}/${process.arch} (see ${"https://codeql.github.com/docs/codeql-overview/system-requirements/" /* SYSTEM_REQUIREMENTS */}). The underlying error was: ${cliError.message}` ); } +var ToleratedConfigurationError = class extends ConfigurationError { + constructor(category, message) { + super(message); + this.category = category; + } + getCategory() { + return this.category; + } +}; function wrapCliConfigurationError(cliError) { if (isUnsupportedPlatform()) { return getUnsupportedPlatformError(cliError); @@ -87150,6 +87160,12 @@ function wrapCliConfigurationError(cliError) { if (additionalErrorMessageToAppend !== void 0) { errorMessageBuilder = `${errorMessageBuilder} ${additionalErrorMessageToAppend}`; } + if (cliErrorsConfig[cliConfigErrorCategory].toleratedByCCR) { + return new ToleratedConfigurationError( + cliConfigErrorCategory, + errorMessageBuilder + ); + } return new ConfigurationError(errorMessageBuilder); } diff --git a/lib/init-action-post.js b/lib/init-action-post.js index 4b0e498104..78628c5ad2 100644 --- a/lib/init-action-post.js +++ b/lib/init-action-post.js @@ -127471,6 +127471,7 @@ var cliErrorsConfig = { // was unintended to have CodeQL analysis run on it. ["NoSourceCodeSeen" /* NoSourceCodeSeen */]: { exitCode: 32, + toleratedByCCR: true, cliErrorMessageCandidates: [ new RegExp( "CodeQL detected code written in .* but could not process any of it" @@ -127559,6 +127560,15 @@ function getUnsupportedPlatformError(cliError) { `The CodeQL CLI does not support the platform/architecture combination of ${process.platform}/${process.arch} (see ${"https://codeql.github.com/docs/codeql-overview/system-requirements/" /* SYSTEM_REQUIREMENTS */}). The underlying error was: ${cliError.message}` ); } +var ToleratedConfigurationError = class extends ConfigurationError { + constructor(category, message) { + super(message); + this.category = category; + } + getCategory() { + return this.category; + } +}; function wrapCliConfigurationError(cliError) { if (isUnsupportedPlatform()) { return getUnsupportedPlatformError(cliError); @@ -127572,6 +127582,12 @@ function wrapCliConfigurationError(cliError) { if (additionalErrorMessageToAppend !== void 0) { errorMessageBuilder = `${errorMessageBuilder} ${additionalErrorMessageToAppend}`; } + if (cliErrorsConfig[cliConfigErrorCategory].toleratedByCCR) { + return new ToleratedConfigurationError( + cliConfigErrorCategory, + errorMessageBuilder + ); + } return new ConfigurationError(errorMessageBuilder); } diff --git a/lib/init-action.js b/lib/init-action.js index 37656350c6..02bce04dbc 100644 --- a/lib/init-action.js +++ b/lib/init-action.js @@ -90250,6 +90250,7 @@ var cliErrorsConfig = { // was unintended to have CodeQL analysis run on it. ["NoSourceCodeSeen" /* NoSourceCodeSeen */]: { exitCode: 32, + toleratedByCCR: true, cliErrorMessageCandidates: [ new RegExp( "CodeQL detected code written in .* but could not process any of it" @@ -90338,6 +90339,15 @@ function getUnsupportedPlatformError(cliError) { `The CodeQL CLI does not support the platform/architecture combination of ${process.platform}/${process.arch} (see ${"https://codeql.github.com/docs/codeql-overview/system-requirements/" /* SYSTEM_REQUIREMENTS */}). The underlying error was: ${cliError.message}` ); } +var ToleratedConfigurationError = class extends ConfigurationError { + constructor(category, message) { + super(message); + this.category = category; + } + getCategory() { + return this.category; + } +}; function wrapCliConfigurationError(cliError) { if (isUnsupportedPlatform()) { return getUnsupportedPlatformError(cliError); @@ -90351,6 +90361,12 @@ function wrapCliConfigurationError(cliError) { if (additionalErrorMessageToAppend !== void 0) { errorMessageBuilder = `${errorMessageBuilder} ${additionalErrorMessageToAppend}`; } + if (cliErrorsConfig[cliConfigErrorCategory].toleratedByCCR) { + return new ToleratedConfigurationError( + cliConfigErrorCategory, + errorMessageBuilder + ); + } return new ConfigurationError(errorMessageBuilder); } diff --git a/lib/resolve-environment-action.js b/lib/resolve-environment-action.js index 0a1774f2aa..99ed234a96 100644 --- a/lib/resolve-environment-action.js +++ b/lib/resolve-environment-action.js @@ -87048,6 +87048,7 @@ var cliErrorsConfig = { // was unintended to have CodeQL analysis run on it. ["NoSourceCodeSeen" /* NoSourceCodeSeen */]: { exitCode: 32, + toleratedByCCR: true, cliErrorMessageCandidates: [ new RegExp( "CodeQL detected code written in .* but could not process any of it" @@ -87136,6 +87137,15 @@ function getUnsupportedPlatformError(cliError) { `The CodeQL CLI does not support the platform/architecture combination of ${process.platform}/${process.arch} (see ${"https://codeql.github.com/docs/codeql-overview/system-requirements/" /* SYSTEM_REQUIREMENTS */}). The underlying error was: ${cliError.message}` ); } +var ToleratedConfigurationError = class extends ConfigurationError { + constructor(category, message) { + super(message); + this.category = category; + } + getCategory() { + return this.category; + } +}; function wrapCliConfigurationError(cliError) { if (isUnsupportedPlatform()) { return getUnsupportedPlatformError(cliError); @@ -87149,6 +87159,12 @@ function wrapCliConfigurationError(cliError) { if (additionalErrorMessageToAppend !== void 0) { errorMessageBuilder = `${errorMessageBuilder} ${additionalErrorMessageToAppend}`; } + if (cliErrorsConfig[cliConfigErrorCategory].toleratedByCCR) { + return new ToleratedConfigurationError( + cliConfigErrorCategory, + errorMessageBuilder + ); + } return new ConfigurationError(errorMessageBuilder); } diff --git a/lib/setup-codeql-action.js b/lib/setup-codeql-action.js index 0a9b97198a..f5bd4cd3f3 100644 --- a/lib/setup-codeql-action.js +++ b/lib/setup-codeql-action.js @@ -87958,6 +87958,7 @@ var cliErrorsConfig = { // was unintended to have CodeQL analysis run on it. ["NoSourceCodeSeen" /* NoSourceCodeSeen */]: { exitCode: 32, + toleratedByCCR: true, cliErrorMessageCandidates: [ new RegExp( "CodeQL detected code written in .* but could not process any of it" @@ -88046,6 +88047,15 @@ function getUnsupportedPlatformError(cliError) { `The CodeQL CLI does not support the platform/architecture combination of ${process.platform}/${process.arch} (see ${"https://codeql.github.com/docs/codeql-overview/system-requirements/" /* SYSTEM_REQUIREMENTS */}). The underlying error was: ${cliError.message}` ); } +var ToleratedConfigurationError = class extends ConfigurationError { + constructor(category, message) { + super(message); + this.category = category; + } + getCategory() { + return this.category; + } +}; function wrapCliConfigurationError(cliError) { if (isUnsupportedPlatform()) { return getUnsupportedPlatformError(cliError); @@ -88059,6 +88069,12 @@ function wrapCliConfigurationError(cliError) { if (additionalErrorMessageToAppend !== void 0) { errorMessageBuilder = `${errorMessageBuilder} ${additionalErrorMessageToAppend}`; } + if (cliErrorsConfig[cliConfigErrorCategory].toleratedByCCR) { + return new ToleratedConfigurationError( + cliConfigErrorCategory, + errorMessageBuilder + ); + } return new ConfigurationError(errorMessageBuilder); } diff --git a/lib/start-proxy-action-post.js b/lib/start-proxy-action-post.js index 87fd6605d7..63967be82a 100644 --- a/lib/start-proxy-action-post.js +++ b/lib/start-proxy-action-post.js @@ -124293,6 +124293,7 @@ var cliErrorsConfig = { // was unintended to have CodeQL analysis run on it. ["NoSourceCodeSeen" /* NoSourceCodeSeen */]: { exitCode: 32, + toleratedByCCR: true, cliErrorMessageCandidates: [ new RegExp( "CodeQL detected code written in .* but could not process any of it" diff --git a/lib/upload-lib.js b/lib/upload-lib.js index 480b83cd56..b020fab048 100644 --- a/lib/upload-lib.js +++ b/lib/upload-lib.js @@ -90082,6 +90082,7 @@ var cliErrorsConfig = { // was unintended to have CodeQL analysis run on it. ["NoSourceCodeSeen" /* NoSourceCodeSeen */]: { exitCode: 32, + toleratedByCCR: true, cliErrorMessageCandidates: [ new RegExp( "CodeQL detected code written in .* but could not process any of it" @@ -90170,6 +90171,15 @@ function getUnsupportedPlatformError(cliError) { `The CodeQL CLI does not support the platform/architecture combination of ${process.platform}/${process.arch} (see ${"https://codeql.github.com/docs/codeql-overview/system-requirements/" /* SYSTEM_REQUIREMENTS */}). The underlying error was: ${cliError.message}` ); } +var ToleratedConfigurationError = class extends ConfigurationError { + constructor(category, message) { + super(message); + this.category = category; + } + getCategory() { + return this.category; + } +}; function wrapCliConfigurationError(cliError) { if (isUnsupportedPlatform()) { return getUnsupportedPlatformError(cliError); @@ -90183,6 +90193,12 @@ function wrapCliConfigurationError(cliError) { if (additionalErrorMessageToAppend !== void 0) { errorMessageBuilder = `${errorMessageBuilder} ${additionalErrorMessageToAppend}`; } + if (cliErrorsConfig[cliConfigErrorCategory].toleratedByCCR) { + return new ToleratedConfigurationError( + cliConfigErrorCategory, + errorMessageBuilder + ); + } return new ConfigurationError(errorMessageBuilder); } diff --git a/lib/upload-sarif-action-post.js b/lib/upload-sarif-action-post.js index ba1e4ac450..c4786074fe 100644 --- a/lib/upload-sarif-action-post.js +++ b/lib/upload-sarif-action-post.js @@ -123986,6 +123986,7 @@ var cliErrorsConfig = { // was unintended to have CodeQL analysis run on it. ["NoSourceCodeSeen" /* NoSourceCodeSeen */]: { exitCode: 32, + toleratedByCCR: true, cliErrorMessageCandidates: [ new RegExp( "CodeQL detected code written in .* but could not process any of it" diff --git a/lib/upload-sarif-action.js b/lib/upload-sarif-action.js index 3d278c11c0..f55ab96c73 100644 --- a/lib/upload-sarif-action.js +++ b/lib/upload-sarif-action.js @@ -91210,6 +91210,7 @@ var cliErrorsConfig = { // was unintended to have CodeQL analysis run on it. ["NoSourceCodeSeen" /* NoSourceCodeSeen */]: { exitCode: 32, + toleratedByCCR: true, cliErrorMessageCandidates: [ new RegExp( "CodeQL detected code written in .* but could not process any of it" @@ -91298,6 +91299,15 @@ function getUnsupportedPlatformError(cliError) { `The CodeQL CLI does not support the platform/architecture combination of ${process.platform}/${process.arch} (see ${"https://codeql.github.com/docs/codeql-overview/system-requirements/" /* SYSTEM_REQUIREMENTS */}). The underlying error was: ${cliError.message}` ); } +var ToleratedConfigurationError = class extends ConfigurationError { + constructor(category, message) { + super(message); + this.category = category; + } + getCategory() { + return this.category; + } +}; function wrapCliConfigurationError(cliError) { if (isUnsupportedPlatform()) { return getUnsupportedPlatformError(cliError); @@ -91311,6 +91321,12 @@ function wrapCliConfigurationError(cliError) { if (additionalErrorMessageToAppend !== void 0) { errorMessageBuilder = `${errorMessageBuilder} ${additionalErrorMessageToAppend}`; } + if (cliErrorsConfig[cliConfigErrorCategory].toleratedByCCR) { + return new ToleratedConfigurationError( + cliConfigErrorCategory, + errorMessageBuilder + ); + } return new ConfigurationError(errorMessageBuilder); } diff --git a/pr-checks/checks/ccr.yml b/pr-checks/checks/ccr.yml index f4140508e8..6a4f75ff1e 100644 --- a/pr-checks/checks/ccr.yml +++ b/pr-checks/checks/ccr.yml @@ -1,5 +1,7 @@ name: "CCR" description: "A standard analysis in CCR mode" +testDirectories: ["tests/multi-language-repo", "tests/empty-repo"] +versions: ["linked"] env: CODEQL_ACTION_ANALYSIS_KEY: "dynamic/copilot-pull-request-reviewer/codeql-action-test" steps: diff --git a/pr-checks/sync.py b/pr-checks/sync.py index 9d1296a549..b5ed4d69e9 100755 --- a/pr-checks/sync.py +++ b/pr-checks/sync.py @@ -1,7 +1,7 @@ #!/usr/bin/env python import ruamel.yaml -from ruamel.yaml.scalarstring import SingleQuotedScalarString +from ruamel.yaml.scalarstring import SingleQuotedScalarString, FoldedScalarString, LiteralScalarString import pathlib import os @@ -83,10 +83,18 @@ def writeHeader(checkStream): runnerImagesForOs = [image for image in runnerImages if image.startswith(operatingSystem)] for runnerImage in runnerImagesForOs: - matrix.append({ - 'os': runnerImage, - 'version': version - }) + if 'testDirectories' in checkSpecification: + for testDirectory in checkSpecification.get('testDirectories'): + matrix.append({ + 'os': runnerImage, + 'version': version, + 'test-directory': testDirectory + }) + else: + matrix.append({ + 'os': runnerImage, + 'version': version + }) useAllPlatformBundle = "false" # Default to false if checkSpecification.get('useAllPlatformBundle'): @@ -129,17 +137,22 @@ def writeHeader(checkStream): }, ]) + prepareWith = { + 'version': '${{ matrix.version }}', + 'use-all-platform-bundle': useAllPlatformBundle, + # If the action is being run from a container, then do not setup kotlin. + # This is because the kotlin binaries cannot be downloaded from the container. + 'setup-kotlin': str(not 'container' in checkSpecification).lower(), + } + + if 'testDirectories' in checkSpecification: + prepareWith['test-directory'] = '${{ matrix.test-directory }}' + steps.append({ 'name': 'Prepare test', 'id': 'prepare-test', 'uses': './.github/actions/prepare-test', - 'with': { - 'version': '${{ matrix.version }}', - 'use-all-platform-bundle': useAllPlatformBundle, - # If the action is being run from a container, then do not setup kotlin. - # This is because the kotlin binaries cannot be downloaded from the container. - 'setup-kotlin': str(not 'container' in checkSpecification).lower(), - } + 'with': prepareWith, }) installGo = is_truthy(checkSpecification.get('installGo', '')) @@ -273,7 +286,7 @@ def writeHeader(checkStream): with open(raw_file, 'w', newline='\n') as output_stream: extraGroupName = "" for inputName in workflowInputs.keys(): - extraGroupName += "-${{inputs." + inputName + "}}" + extraGroupName += "-${{ inputs." + inputName + " }}" writeHeader(output_stream) yaml.dump({ @@ -317,7 +330,7 @@ def writeHeader(checkStream): # a `workflow_call` event (where `github.workflow` would be the name of the caller). # The input values are added, since they may result in different behaviour for a # given workflow on the same ref. - 'group': checkName + "-${{github.ref}}" + extraGroupName + 'group': LiteralScalarString(checkName + "-${{ github.ref }}" + extraGroupName) }, 'jobs': { checkName: checkJob diff --git a/src/analyze-action.ts b/src/analyze-action.ts index 6f45ee5f17..8095d8b031 100644 --- a/src/analyze-action.ts +++ b/src/analyze-action.ts @@ -18,6 +18,7 @@ import { import { getApiDetails, getGitHubVersion } from "./api-client"; import { runAutobuild } from "./autobuild"; import { getTotalCacheSize, shouldStoreCache } from "./caching-utils"; +import { ToleratedConfigurationError } from "./cli-errors"; import { getCodeQL } from "./codeql"; import { Config, getConfig } from "./config-utils"; import { @@ -446,9 +447,16 @@ async function run() { core.exportVariable(EnvVar.ANALYZE_DID_COMPLETE_SUCCESSFULLY, "true"); } catch (unwrappedError) { const error = util.wrapError(unwrappedError); + + const tolerateErrorForCCR = + actionsUtil.isCCR() && error instanceof ToleratedConfigurationError; + + // Set the outcome of the action as failed if we are not expecting an error, + // or the `expect-error` value is invalid. if ( - actionsUtil.getOptionalInput("expect-error") !== "true" || - hasBadExpectErrorInput() + !tolerateErrorForCCR && + (actionsUtil.getOptionalInput("expect-error") !== "true" || + hasBadExpectErrorInput()) ) { core.setFailed(error.message); } diff --git a/src/cli-errors.ts b/src/cli-errors.ts index 5aba268cab..35ddfadc55 100644 --- a/src/cli-errors.ts +++ b/src/cli-errors.ts @@ -153,6 +153,7 @@ type CliErrorConfiguration = { cliErrorMessageCandidates: RegExp[]; exitCode?: number; additionalErrorMessageToAppend?: string; + toleratedByCCR?: boolean; }; /** @@ -228,6 +229,7 @@ const cliErrorsConfig: Record = { // was unintended to have CodeQL analysis run on it. [CliConfigErrorCategory.NoSourceCodeSeen]: { exitCode: 32, + toleratedByCCR: true, cliErrorMessageCandidates: [ new RegExp( "CodeQL detected code written in .* but could not process any of it", @@ -345,6 +347,20 @@ function getUnsupportedPlatformError(cliError: CliError): ConfigurationError { ); } +export class ToleratedConfigurationError extends ConfigurationError { + private category: CliConfigErrorCategory; + + constructor(category: CliConfigErrorCategory, message: string) { + super(message); + + this.category = category; + } + + public getCategory(): CliConfigErrorCategory { + return this.category; + } +} + /** * Changes an error received from the CLI to a ConfigurationError with the message * optionally being transformed, if it is a known configuration error. Otherwise, @@ -368,5 +384,11 @@ export function wrapCliConfigurationError(cliError: CliError): Error { errorMessageBuilder = `${errorMessageBuilder} ${additionalErrorMessageToAppend}`; } + if (cliErrorsConfig[cliConfigErrorCategory].toleratedByCCR) { + return new ToleratedConfigurationError( + cliConfigErrorCategory, + errorMessageBuilder, + ); + } return new ConfigurationError(errorMessageBuilder); } diff --git a/tests/empty-repo/.github/.gitkeep b/tests/empty-repo/.github/.gitkeep new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tests/empty-repo/.gitkeep b/tests/empty-repo/.gitkeep new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tests/empty-repo/README.md b/tests/empty-repo/README.md new file mode 100644 index 0000000000..efe0149bde --- /dev/null +++ b/tests/empty-repo/README.md @@ -0,0 +1 @@ +This test folder is intentionally left (almost) empty.