Merge branch 'main' into aeisenberg/checkout-path-commitoid

This commit is contained in:
Andrew Eisenberg 2022-03-01 13:15:40 -08:00
commit 5c2600e559
31 changed files with 405 additions and 122 deletions

View file

@ -23,14 +23,47 @@ jobs:
analyze-ref-input: analyze-ref-input:
strategy: strategy:
matrix: matrix:
version: include:
- stable-20210308 - os: ubuntu-latest
- stable-20210319 version: stable-20210308
- stable-20210809 - os: macos-latest
- cached version: stable-20210308
- latest - os: windows-2019
- nightly-latest version: stable-20210308
os: [ubuntu-latest, macos-latest, windows-2019] - os: ubuntu-latest
version: stable-20210319
- os: macos-latest
version: stable-20210319
- os: windows-2019
version: stable-20210319
- os: ubuntu-latest
version: stable-20210809
- os: macos-latest
version: stable-20210809
- os: windows-2019
version: stable-20210809
- os: ubuntu-latest
version: cached
- os: macos-latest
version: cached
- os: windows-2019
version: cached
- os: ubuntu-latest
version: latest
- os: macos-latest
version: latest
- os: windows-2019
version: latest
- os: windows-2022
version: latest
- os: ubuntu-latest
version: nightly-latest
- os: macos-latest
version: nightly-latest
- os: windows-2019
version: nightly-latest
- os: windows-2022
version: nightly-latest
name: "Analyze: 'ref' and 'sha' from inputs" name: "Analyze: 'ref' and 'sha' from inputs"
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
steps: steps:

View file

@ -23,14 +23,31 @@ jobs:
debug-artifacts: debug-artifacts:
strategy: strategy:
matrix: matrix:
version: include:
- stable-20210308 - os: ubuntu-latest
- stable-20210319 version: stable-20210308
- stable-20210809 - os: macos-latest
- cached version: stable-20210308
- latest - os: ubuntu-latest
- nightly-latest version: stable-20210319
os: [ubuntu-latest, macos-latest] - os: macos-latest
version: stable-20210319
- os: ubuntu-latest
version: stable-20210809
- os: macos-latest
version: stable-20210809
- os: ubuntu-latest
version: cached
- os: macos-latest
version: cached
- os: ubuntu-latest
version: latest
- os: macos-latest
version: latest
- os: ubuntu-latest
version: nightly-latest
- os: macos-latest
version: nightly-latest
name: Debug artifact upload name: Debug artifact upload
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
steps: steps:

View file

@ -23,8 +23,9 @@ jobs:
extractor-ram-threads: extractor-ram-threads:
strategy: strategy:
matrix: matrix:
version: [latest] include:
os: [ubuntu-latest] - os: ubuntu-latest
version: latest
name: Extractor ram and threads options test name: Extractor ram and threads options test
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
steps: steps:

View file

@ -23,14 +23,47 @@ jobs:
go-custom-queries: go-custom-queries:
strategy: strategy:
matrix: matrix:
version: include:
- stable-20210308 - os: ubuntu-latest
- stable-20210319 version: stable-20210308
- stable-20210809 - os: macos-latest
- cached version: stable-20210308
- latest - os: windows-2019
- nightly-latest version: stable-20210308
os: [ubuntu-latest, macos-latest, windows-2019] - os: ubuntu-latest
version: stable-20210319
- os: macos-latest
version: stable-20210319
- os: windows-2019
version: stable-20210319
- os: ubuntu-latest
version: stable-20210809
- os: macos-latest
version: stable-20210809
- os: windows-2019
version: stable-20210809
- os: ubuntu-latest
version: cached
- os: macos-latest
version: cached
- os: windows-2019
version: cached
- os: ubuntu-latest
version: latest
- os: macos-latest
version: latest
- os: windows-2019
version: latest
- os: windows-2022
version: latest
- os: ubuntu-latest
version: nightly-latest
- os: macos-latest
version: nightly-latest
- os: windows-2019
version: nightly-latest
- os: windows-2022
version: nightly-latest
name: 'Go: Custom queries' name: 'Go: Custom queries'
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
steps: steps:

View file

@ -23,14 +23,31 @@ jobs:
go-custom-tracing-autobuild: go-custom-tracing-autobuild:
strategy: strategy:
matrix: matrix:
version: include:
- stable-20210308 - os: ubuntu-latest
- stable-20210319 version: stable-20210308
- stable-20210809 - os: macos-latest
- cached version: stable-20210308
- latest - os: ubuntu-latest
- nightly-latest version: stable-20210319
os: [ubuntu-latest, macos-latest] - os: macos-latest
version: stable-20210319
- os: ubuntu-latest
version: stable-20210809
- os: macos-latest
version: stable-20210809
- os: ubuntu-latest
version: cached
- os: macos-latest
version: cached
- os: ubuntu-latest
version: latest
- os: macos-latest
version: latest
- os: ubuntu-latest
version: nightly-latest
- os: macos-latest
version: nightly-latest
name: 'Go: Autobuild custom tracing' name: 'Go: Autobuild custom tracing'
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
steps: steps:

View file

@ -23,14 +23,47 @@ jobs:
go-custom-tracing: go-custom-tracing:
strategy: strategy:
matrix: matrix:
version: include:
- stable-20210308 - os: ubuntu-latest
- stable-20210319 version: stable-20210308
- stable-20210809 - os: macos-latest
- cached version: stable-20210308
- latest - os: windows-2019
- nightly-latest version: stable-20210308
os: [ubuntu-latest, macos-latest, windows-2019] - os: ubuntu-latest
version: stable-20210319
- os: macos-latest
version: stable-20210319
- os: windows-2019
version: stable-20210319
- os: ubuntu-latest
version: stable-20210809
- os: macos-latest
version: stable-20210809
- os: windows-2019
version: stable-20210809
- os: ubuntu-latest
version: cached
- os: macos-latest
version: cached
- os: windows-2019
version: cached
- os: ubuntu-latest
version: latest
- os: macos-latest
version: latest
- os: windows-2019
version: latest
- os: windows-2022
version: latest
- os: ubuntu-latest
version: nightly-latest
- os: macos-latest
version: nightly-latest
- os: windows-2019
version: nightly-latest
- os: windows-2022
version: nightly-latest
name: 'Go: Custom tracing' name: 'Go: Custom tracing'
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
steps: steps:

View file

@ -23,8 +23,13 @@ jobs:
javascript-source-root: javascript-source-root:
strategy: strategy:
matrix: matrix:
version: [latest, cached, nightly-latest] # This feature is not compatible with old CLIs include:
os: [ubuntu-latest] - os: ubuntu-latest
version: latest
- os: ubuntu-latest
version: cached
- os: ubuntu-latest
version: nightly-latest
name: Custom source root name: Custom source root
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
steps: steps:

View file

@ -23,14 +23,31 @@ jobs:
multi-language-autodetect: multi-language-autodetect:
strategy: strategy:
matrix: matrix:
version: include:
- stable-20210308 - os: ubuntu-latest
- stable-20210319 version: stable-20210308
- stable-20210809 - os: macos-latest
- cached version: stable-20210308
- latest - os: ubuntu-latest
- nightly-latest version: stable-20210319
os: [ubuntu-latest, macos-latest] - os: macos-latest
version: stable-20210319
- os: ubuntu-latest
version: stable-20210809
- os: macos-latest
version: stable-20210809
- os: ubuntu-latest
version: cached
- os: macos-latest
version: cached
- os: ubuntu-latest
version: latest
- os: macos-latest
version: latest
- os: ubuntu-latest
version: nightly-latest
- os: macos-latest
version: nightly-latest
name: Multi-language repository name: Multi-language repository
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
steps: steps:

View file

@ -23,8 +23,11 @@ jobs:
packaging-config-inputs-js: packaging-config-inputs-js:
strategy: strategy:
matrix: matrix:
version: [nightly-20210831] # This CLI version is known to work with package used in this test include:
os: [ubuntu-latest, macos-latest] - os: ubuntu-latest
version: nightly-20210831
- os: macos-latest
version: nightly-20210831
name: 'Packaging: Config and input' name: 'Packaging: Config and input'
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
steps: steps:

View file

@ -23,8 +23,11 @@ jobs:
packaging-config-js: packaging-config-js:
strategy: strategy:
matrix: matrix:
version: [nightly-20210831] # This CLI version is known to work with package used in this test include:
os: [ubuntu-latest, macos-latest] - os: ubuntu-latest
version: nightly-20210831
- os: macos-latest
version: nightly-20210831
name: 'Packaging: Config file' name: 'Packaging: Config file'
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
steps: steps:

View file

@ -23,8 +23,11 @@ jobs:
packaging-inputs-js: packaging-inputs-js:
strategy: strategy:
matrix: matrix:
version: [nightly-20210831] # This CLI version is known to work with package used in this test include:
os: [ubuntu-latest, macos-latest] - os: ubuntu-latest
version: nightly-20210831
- os: macos-latest
version: nightly-20210831
name: 'Packaging: Action input' name: 'Packaging: Action input'
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
steps: steps:

View file

@ -23,14 +23,47 @@ jobs:
remote-config: remote-config:
strategy: strategy:
matrix: matrix:
version: include:
- stable-20210308 - os: ubuntu-latest
- stable-20210319 version: stable-20210308
- stable-20210809 - os: macos-latest
- cached version: stable-20210308
- latest - os: windows-2019
- nightly-latest version: stable-20210308
os: [ubuntu-latest, macos-latest, windows-2019] - os: ubuntu-latest
version: stable-20210319
- os: macos-latest
version: stable-20210319
- os: windows-2019
version: stable-20210319
- os: ubuntu-latest
version: stable-20210809
- os: macos-latest
version: stable-20210809
- os: windows-2019
version: stable-20210809
- os: ubuntu-latest
version: cached
- os: macos-latest
version: cached
- os: windows-2019
version: cached
- os: ubuntu-latest
version: latest
- os: macos-latest
version: latest
- os: windows-2019
version: latest
- os: windows-2022
version: latest
- os: ubuntu-latest
version: nightly-latest
- os: macos-latest
version: nightly-latest
- os: windows-2019
version: nightly-latest
- os: windows-2022
version: nightly-latest
name: Remote config file name: Remote config file
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
steps: steps:

View file

@ -23,14 +23,19 @@ jobs:
rubocop-multi-language: rubocop-multi-language:
strategy: strategy:
matrix: matrix:
version: include:
- stable-20210308 - os: ubuntu-latest
- stable-20210319 version: stable-20210308
- stable-20210809 - os: ubuntu-latest
- cached version: stable-20210319
- latest - os: ubuntu-latest
- nightly-latest version: stable-20210809
os: [ubuntu-latest] - os: ubuntu-latest
version: cached
- os: ubuntu-latest
version: latest
- os: ubuntu-latest
version: nightly-latest
name: RuboCop multi-language name: RuboCop multi-language
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
steps: steps:

View file

@ -23,8 +23,11 @@ jobs:
split-workflow: split-workflow:
strategy: strategy:
matrix: matrix:
version: [nightly-20210831] # This CLI version is known to work with package used in this test include:
os: [ubuntu-latest, macos-latest] - os: ubuntu-latest
version: nightly-20210831
- os: macos-latest
version: nightly-20210831
name: Split workflow name: Split workflow
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
steps: steps:

View file

@ -23,8 +23,9 @@ jobs:
test-local-codeql: test-local-codeql:
strategy: strategy:
matrix: matrix:
version: [nightly-latest] include:
os: [ubuntu-latest] - os: ubuntu-latest
version: nightly-latest
name: Local CodeQL bundle name: Local CodeQL bundle
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
steps: steps:

5
.github/workflows/__test-proxy.yml generated vendored
View file

@ -23,8 +23,9 @@ jobs:
test-proxy: test-proxy:
strategy: strategy:
matrix: matrix:
version: [latest] include:
os: [ubuntu-latest] - os: ubuntu-latest
version: latest
name: Proxy test name: Proxy test
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
steps: steps:

15
.github/workflows/__test-ruby.yml generated vendored
View file

@ -23,8 +23,19 @@ jobs:
test-ruby: test-ruby:
strategy: strategy:
matrix: matrix:
version: [latest, cached, nightly-latest] include:
os: [ubuntu-latest, macos-latest] - os: ubuntu-latest
version: latest
- os: macos-latest
version: latest
- os: ubuntu-latest
version: cached
- os: macos-latest
version: cached
- os: ubuntu-latest
version: nightly-latest
- os: macos-latest
version: nightly-latest
name: Ruby analysis name: Ruby analysis
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
steps: steps:

View file

@ -23,14 +23,19 @@ jobs:
unset-environment: unset-environment:
strategy: strategy:
matrix: matrix:
version: include:
- stable-20210308 - os: ubuntu-latest
- stable-20210319 version: stable-20210308
- stable-20210809 - os: ubuntu-latest
- cached version: stable-20210319
- latest - os: ubuntu-latest
- nightly-latest version: stable-20210809
os: [ubuntu-latest] - os: ubuntu-latest
version: cached
- os: ubuntu-latest
version: latest
- os: ubuntu-latest
version: nightly-latest
name: Test unsetting environment variables name: Test unsetting environment variables
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
steps: steps:

View file

@ -23,14 +23,47 @@ jobs:
upload-ref-sha-input: upload-ref-sha-input:
strategy: strategy:
matrix: matrix:
version: include:
- stable-20210308 - os: ubuntu-latest
- stable-20210319 version: stable-20210308
- stable-20210809 - os: macos-latest
- cached version: stable-20210308
- latest - os: windows-2019
- nightly-latest version: stable-20210308
os: [ubuntu-latest, macos-latest, windows-2019] - os: ubuntu-latest
version: stable-20210319
- os: macos-latest
version: stable-20210319
- os: windows-2019
version: stable-20210319
- os: ubuntu-latest
version: stable-20210809
- os: macos-latest
version: stable-20210809
- os: windows-2019
version: stable-20210809
- os: ubuntu-latest
version: cached
- os: macos-latest
version: cached
- os: windows-2019
version: cached
- os: ubuntu-latest
version: latest
- os: macos-latest
version: latest
- os: windows-2019
version: latest
- os: windows-2022
version: latest
- os: ubuntu-latest
version: nightly-latest
- os: macos-latest
version: nightly-latest
- os: windows-2019
version: nightly-latest
- os: windows-2022
version: nightly-latest
name: "Upload-sarif: 'ref' and 'sha' from inputs" name: "Upload-sarif: 'ref' and 'sha' from inputs"
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
steps: steps:

View file

@ -2,7 +2,8 @@
## [UNRELEASED] ## [UNRELEASED]
No user facing changes. - Update default CodeQL bundle version to 2.8.2.
- Fix a bug where old results can be uploaded if the languages in a repository change when using a non-ephemeral self-hosted runner.
## 1.1.3 - 23 Feb 2022 ## 1.1.3 - 23 Feb 2022

15
lib/analyze.js generated
View file

@ -242,7 +242,20 @@ async function runFinalize(outputDir, threadsFlag, memoryFlag, config, logger) {
// Delete the tracer config env var to avoid tracing ourselves // Delete the tracer config env var to avoid tracing ourselves
delete process.env[sharedEnv.ODASA_TRACER_CONFIGURATION]; delete process.env[sharedEnv.ODASA_TRACER_CONFIGURATION];
} }
fs.mkdirSync(outputDir, { recursive: true }); // After switching to Node16, this entire block can be replaced with `await fs.promises.rm(outputDir, { recursive: true, force: true });`.
try {
await fs.promises.rmdir(outputDir, {
recursive: true,
maxRetries: 5,
retryDelay: 2000,
});
}
catch (error) {
if ((error === null || error === void 0 ? void 0 : error.code) !== "ENOENT") {
throw error;
}
}
await fs.promises.mkdir(outputDir, { recursive: true });
await finalizeDatabaseCreation(config, threadsFlag, memoryFlag, logger); await finalizeDatabaseCreation(config, threadsFlag, memoryFlag, logger);
} }
exports.runFinalize = runFinalize; exports.runFinalize = runFinalize;

File diff suppressed because one or more lines are too long

View file

@ -1,3 +1,3 @@
{ {
"bundleVersion": "codeql-bundle-20220214" "bundleVersion": "codeql-bundle-20220224"
} }

View file

@ -1,8 +1,5 @@
name: "Analyze: 'ref' and 'sha' from inputs" name: "Analyze: 'ref' and 'sha' from inputs"
description: "Checks that specifying 'ref' and 'sha' as inputs works" description: "Checks that specifying 'ref' and 'sha' as inputs works"
# Build tracing currently does not support Windows 2022, so use `windows-2019` instead of
# `windows-latest`.
os: [ubuntu-latest, macos-latest, windows-2019]
steps: steps:
- uses: ./../action/init - uses: ./../action/init
with: with:

View file

@ -1,8 +1,5 @@
name: "Go: Custom queries" name: "Go: Custom queries"
description: "Checks that Go works in conjunction with a config file specifying custom queries" description: "Checks that Go works in conjunction with a config file specifying custom queries"
# Build tracing currently does not support Windows 2022, so use `windows-2019` instead of
# `windows-latest`.
os: [ubuntu-latest, macos-latest, windows-2019]
steps: steps:
- uses: actions/setup-go@v2 - uses: actions/setup-go@v2
with: with:

View file

@ -1,8 +1,5 @@
name: "Go: Custom tracing" name: "Go: Custom tracing"
description: "Checks that Go tracing works" description: "Checks that Go tracing works"
# Build tracing currently does not support Windows 2022, so use `windows-2019` instead of
# `windows-latest`.
os: [ubuntu-latest, macos-latest, windows-2019]
env: env:
CODEQL_EXTRACTOR_GO_BUILD_TRACING: "true" CODEQL_EXTRACTOR_GO_BUILD_TRACING: "true"
steps: steps:

View file

@ -1,8 +1,5 @@
name: "Remote config file" name: "Remote config file"
description: "Checks that specifying packages using only a config file works" description: "Checks that specifying packages using only a config file works"
# Build tracing currently does not support Windows 2022, so use `windows-2019` instead of
# `windows-latest`.
os: [ubuntu-latest, macos-latest, windows-2019]
steps: steps:
- uses: ./../action/init - uses: ./../action/init
with: with:

View file

@ -1,8 +1,5 @@
name: "Upload-sarif: 'ref' and 'sha' from inputs" name: "Upload-sarif: 'ref' and 'sha' from inputs"
description: "Checks that specifying 'ref' and 'sha' as inputs works" description: "Checks that specifying 'ref' and 'sha' as inputs works"
# Build tracing currently does not support Windows 2022, so use `windows-2019` instead of
# `windows-latest`.
os: [ubuntu-latest, macos-latest, windows-2019]
steps: steps:
- uses: ./../action/init - uses: ./../action/init
with: with:

View file

@ -15,7 +15,7 @@ defaultTestVersions = [
# A nightly build directly from the our private repo, built in the last 24 hours. # A nightly build directly from the our private repo, built in the last 24 hours.
"nightly-latest" "nightly-latest"
] ]
defaultOperatingSystems = ["ubuntu-latest", "macos-latest", "windows-latest"] defaultOperatingSystems = ["ubuntu-latest", "macos-latest", "windows-2019"]
header = """# Warning: This file is generated automatically, and should not be modified. header = """# Warning: This file is generated automatically, and should not be modified.
# Instead, please modify the template in the pr-checks directory and run: # Instead, please modify the template in the pr-checks directory and run:
# pip install ruamel.yaml && python3 sync.py # pip install ruamel.yaml && python3 sync.py
@ -62,11 +62,26 @@ for file in os.listdir('checks'):
] ]
steps.extend(checkSpecification['steps']) steps.extend(checkSpecification['steps'])
matrix = []
for version in versions:
for os in operatingSystems:
matrix.append({
'os': os,
'version': version
})
if (version == 'latest' or version == 'nightly-latest') and os == 'windows-2019':
# New versions of the CLI should also work with Windows Server 2022.
# Once all versions of the CLI that we test against work with Windows Server 2022,
# we should remove this logic and instead just add windows-2022 to the test matrix.
matrix.append({
'os': 'windows-2022',
'version': version
})
checkJob = { checkJob = {
'strategy': { 'strategy': {
'matrix': { 'matrix': {
'version': versions, 'include': matrix
'os': operatingSystems
} }
}, },
'name': checkSpecification['name'], 'name': checkSpecification['name'],

View file

@ -423,7 +423,19 @@ export async function runFinalize(
delete process.env[sharedEnv.ODASA_TRACER_CONFIGURATION]; delete process.env[sharedEnv.ODASA_TRACER_CONFIGURATION];
} }
fs.mkdirSync(outputDir, { recursive: true }); // After switching to Node16, this entire block can be replaced with `await fs.promises.rm(outputDir, { recursive: true, force: true });`.
try {
await fs.promises.rmdir(outputDir, {
recursive: true,
maxRetries: 5,
retryDelay: 2000,
} as any);
} catch (error: any) {
if (error?.code !== "ENOENT") {
throw error;
}
}
await fs.promises.mkdir(outputDir, { recursive: true });
await finalizeDatabaseCreation(config, threadsFlag, memoryFlag, logger); await finalizeDatabaseCreation(config, threadsFlag, memoryFlag, logger);
} }

View file

@ -1,3 +1,3 @@
{ {
"bundleVersion": "codeql-bundle-20220214" "bundleVersion": "codeql-bundle-20220224"
} }