Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 39 additions & 8 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@
"skipFiles": [
"<node_internals>/**"
],
"type": "node"
"type": "node",
"outFiles": [
"${workspaceFolder}/dist/**/*.js"
],
},
{
"type": "node",
Expand Down Expand Up @@ -54,11 +57,11 @@
{
"type": "node",
"request": "launch",
"name": "Launch checkGithubRepos",
"name": "Launch checkReposScheduled",
"skipFiles": [
"<node_internals>/**"
],
"program": "${workspaceFolder}/dist/checkGithubRepos.js",
"program": "${workspaceFolder}/dist/checkReposScheduled.js",
"sourceMaps": true,
"outFiles": [
"${workspaceFolder}/dist/**/*.js"
Expand All @@ -79,11 +82,11 @@
{
"type": "node",
"request": "launch",
"name": "Launch checkUserTestRepos",
"name": "Launch checkReposTriggered",
"skipFiles": [
"<node_internals>/**"
],
"program": "${workspaceFolder}/dist/checkUserTestRepos.js",
"program": "${workspaceFolder}/dist/checkReposTriggered.js",
"sourceMaps": true,
"outFiles": [
"${workspaceFolder}/dist/**/*.js"
Expand Down Expand Up @@ -125,14 +128,14 @@
"false"
]
},
{
{
"type": "node",
"request": "launch",
"name": "Launch LSP checkGithubRepos",
"name": "Launch LSP checkReposScheduled",
"skipFiles": [
"<node_internals>/**"
],
"program": "${workspaceFolder}/dist/checkGithubRepos.js",
"program": "${workspaceFolder}/dist/checkReposScheduled.js",
"sourceMaps": true,
"outFiles": [
"${workspaceFolder}/dist/**/*.js"
Expand All @@ -151,5 +154,33 @@
],
"preLaunchTask": "npm: build"
},
{
"type": "node",
"request": "launch",
"name": "Launch Go checkReposTriggered",
"skipFiles": [
"<node_internals>/**"
],
"program": "${workspaceFolder}/dist/checkReposTriggered.js",
"sourceMaps": true,
"outFiles": [
"${workspaceFolder}/dist/**/*.js"
],
"args": [
"tsserver",
"https://github.com/microsoft/typescript-go.git",
"main",
"3176",
"false",
"./artifacts/repos.json",
"1",
"1",
"RepoResults",
"true",
"n/a",
"false"
],
"preLaunchTask": "npm: build"
},
]
}
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ To run online, you can
These commands can also be run locally.

```sh
# New Error Detector (a.k.a. "git tests")
node dist/checkGithubRepos.js [post-results] [repo-count] [repo-start-index] [old-ts-version-on-npm] [old-ts-version-on-npm]
# New Error Detector (a.k.a. "scheduled tests")
node dist/checkReposScheduled.js [post-results] [repo-count] [repo-start-index] [old-ts-version-on-npm] [old-ts-version-on-npm]

# Inline User Test Reporter (a.k.a. "user tests")
node dist/checkUserTestRepos.js [post-results] [ts-repo-url] [head-ref] [requesting-user] [source-issue] [github-comment-id-for-updates] [query-repos-by-stars]
# Inline User Test Reporter (a.k.a. "triggered tests")
node dist/checkReposTriggered.js [post-results] [ts-repo-url] [head-ref] [requesting-user] [source-issue] [github-comment-id-for-updates] [query-repos-by-stars]

```

Expand Down
3 changes: 2 additions & 1 deletion azure-pipelines-gitTests-lsp-js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ pool:
extends:
template: azure-pipelines-gitTests-template.yml
parameters:
ENTRYPOINT: lsp
ENTRYPOINT: fuzzer
OLD_VERSION: '0'
NEW_VERSION: main
LANGUAGE: JavaScript
REPO_IS_TSGO: true
3 changes: 2 additions & 1 deletion azure-pipelines-gitTests-lsp-ts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@ pool:
extends:
template: azure-pipelines-gitTests-template.yml
parameters:
ENTRYPOINT: lsp
ENTRYPOINT: fuzzer
OLD_VERSION: '0'
NEW_VERSION: main
LANGUAGE: TypeScript
DIAGNOSTIC_OUTPUT: true
REPO_IS_TSGO: true
8 changes: 6 additions & 2 deletions azure-pipelines-gitTests-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ parameters:
displayName: Pseudo-random number generator seed
type: string
default: 'n/a'
- name: REPO_IS_TSGO
displayName: Whether the repo is `typescript-go`
type: boolean
default: false

jobs:
- job: ListRepos
Expand Down Expand Up @@ -100,7 +104,7 @@ jobs:
corepack enable
corepack enable npm
mkdir 'RepoResults$(System.JobPositionInPhase)'
node dist/checkGithubRepos ${{ parameters.ENTRYPOINT }} ${{ parameters.OLD_VERSION }} ${{ parameters.NEW_VERSION }} '$(Pipeline.Workspace)/RepoList/repos.json' $(System.TotalJobsInPhase) $(System.JobPositionInPhase) 'RepoResults$(System.JobPositionInPhase)' ${{ parameters.DIAGNOSTIC_OUTPUT }} ${{ parameters.PRNG_SEED }}
node dist/checkReposScheduled ${{ parameters.ENTRYPOINT }} ${{ parameters.OLD_VERSION }} ${{ parameters.NEW_VERSION }} '$(Pipeline.Workspace)/RepoList/repos.json' $(System.TotalJobsInPhase) $(System.JobPositionInPhase) 'RepoResults$(System.JobPositionInPhase)' ${{ parameters.DIAGNOSTIC_OUTPUT }} ${{ parameters.PRNG_SEED }}
displayName: 'Run TypeScript on repos'
continueOnError: true
- publish: 'RepoResults$(System.JobPositionInPhase)'
Expand All @@ -127,7 +131,7 @@ jobs:
- script: |
npm ci
npm run build
node dist/postGithubIssue ${{ parameters.ENTRYPOINT }} ${{ parameters.LANGUAGE }} ${{ parameters.REPO_COUNT }} ${{ parameters.REPO_START_INDEX }} '$(Pipeline.Workspace)' '$(System.TeamFoundationCollectionUri)$(System.TeamProject)/_build/results?buildId=$(Build.BuildId)' '$(System.TeamFoundationCollectionUri)$(System.TeamProject)/_build/results?buildId=$(Build.BuildId)&view=artifacts&type=publishedArtifacts' ${{ parameters.POST_RESULT }} '$(System.TeamFoundationCollectionUri)$(System.TeamProject)/_apis/build/builds/$(Build.BuildId)/artifacts'
node dist/postGithubIssue ${{ parameters.ENTRYPOINT }} ${{ parameters.LANGUAGE }} ${{ parameters.REPO_COUNT }} ${{ parameters.REPO_START_INDEX }} '$(Pipeline.Workspace)' '$(System.TeamFoundationCollectionUri)$(System.TeamProject)/_build/results?buildId=$(Build.BuildId)' '$(System.TeamFoundationCollectionUri)$(System.TeamProject)/_build/results?buildId=$(Build.BuildId)&view=artifacts&type=publishedArtifacts' ${{ parameters.POST_RESULT }} '$(System.TeamFoundationCollectionUri)$(System.TeamProject)/_apis/build/builds/$(Build.BuildId)/artifacts' ${{ parameters.REPO_IS_TSGO }}
displayName: 'Create issue from new errors'
env:
GITHUB_PAT: $(typescript-bot-github-PAT-error-deltas)
4 changes: 2 additions & 2 deletions azure-pipelines-userTests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ jobs:
corepack enable
corepack enable npm
mkdir 'RepoResults$(System.JobPositionInPhase)'
node dist/checkUserTestRepos ${{ parameters.ENTRYPOINT }} ${{ parameters.OLD_TS_REPO_URL }} ${{ parameters.OLD_HEAD_REF }} ${{ parameters.SOURCE_ISSUE }} ${{ parameters.TOP_REPOS }} '$(Pipeline.Workspace)/RepoList/repos.json' $(System.TotalJobsInPhase) $(System.JobPositionInPhase) 'RepoResults$(System.JobPositionInPhase)' ${{ parameters.DIAGNOSTIC_OUTPUT }} ${{ parameters.PRNG_SEED }}
node dist/checkReposTriggered ${{ parameters.ENTRYPOINT }} ${{ parameters.OLD_TS_REPO_URL }} ${{ parameters.OLD_HEAD_REF }} ${{ parameters.SOURCE_ISSUE }} ${{ parameters.TOP_REPOS }} '$(Pipeline.Workspace)/RepoList/repos.json' $(System.TotalJobsInPhase) $(System.JobPositionInPhase) 'RepoResults$(System.JobPositionInPhase)' ${{ parameters.DIAGNOSTIC_OUTPUT }} ${{ parameters.PRNG_SEED }}
displayName: 'Run user tests'
- publish: 'RepoResults$(System.JobPositionInPhase)'
artifact: 'RepoResults$(System.JobPositionInPhase)'
Expand All @@ -161,7 +161,7 @@ jobs:
- script: |
npm ci
npm run build
node dist/postGithubComments ${{ parameters.ENTRYPOINT }} ${{ parameters.REQUESTING_USER }} ${{ parameters.SOURCE_ISSUE }} ${{ parameters.STATUS_COMMENT }} ${{ parameters.DISTINCT_ID }} ${{ parameters.TOP_REPOS }} '$(Pipeline.Workspace)' '$(System.TeamFoundationCollectionUri)$(System.TeamProject)/_build/results?buildId=$(Build.BuildId)&view=artifacts&type=publishedArtifacts' ${{ parameters.POST_RESULT }} ${{ parameters.REPO_COUNT }} '$(System.TeamFoundationCollectionUri)$(System.TeamProject)/_apis/build/builds/$(Build.BuildId)/artifacts'
node dist/postGithubComments ${{ parameters.ENTRYPOINT }} ${{ parameters.REQUESTING_USER }} ${{ parameters.SOURCE_ISSUE }} ${{ parameters.STATUS_COMMENT }} ${{ parameters.DISTINCT_ID }} ${{ parameters.TOP_REPOS }} '$(Pipeline.Workspace)' '$(System.TeamFoundationCollectionUri)$(System.TeamProject)/_build/results?buildId=$(Build.BuildId)&view=artifacts&type=publishedArtifacts' ${{ parameters.POST_RESULT }} ${{ parameters.REPO_COUNT }} '$(System.TeamFoundationCollectionUri)$(System.TeamProject)/_apis/build/builds/$(Build.BuildId)/artifacts' ${{ contains(parameters.OLD_TS_REPO_URL, 'typescript-go') }}
displayName: 'Update PR comment with new errors'
env:
GITHUB_PAT: $(typescript-bot-github-PAT-error-deltas)
3 changes: 2 additions & 1 deletion src/checkGithubRepos.ts → src/checkReposScheduled.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ if (argv.length < 11) {
const [,, entrypoint, oldTsNpmVersion, newTsNpmVersion, repoListPath, workerCount, workerNumber, resultDirName, diagnosticOutput, prngSeed, tmpfs] = argv;

mainAsync({
testType: "github",
testType: "scheduled",
tmpfs: tmpfs && tmpfs.toLowerCase() === "false" ? false : true,
entrypoint: entrypoint as TsEntrypoint,
diagnosticOutput: diagnosticOutput.toLowerCase() === "true",
Expand All @@ -23,6 +23,7 @@ mainAsync({
newTsNpmVersion,
resultDirName,
prngSeed: prngSeed.toLowerCase() === "n/a" ? undefined : prngSeed,
isGo: true,
}).catch(err => {
reportError(err, "Unhandled exception");
process.exit(1);
Expand Down
11 changes: 6 additions & 5 deletions src/checkUserTestRepos.ts → src/checkReposTriggered.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@ import { mainAsync, reportError, TsEntrypoint } from "./main";

const { argv } = process;

if (argv.length !== 13) {
console.error(`Usage: ${path.basename(argv[0])} ${path.basename(argv[1])} <ts_entrypoint> <old_ts_repo_url> <old_head_ref> <pr_number> <is_top_repos> <repo_list_path> <worker_count> <worker_number> <result_dir_name> <diagnostic_output> <prng_seed>`);
if (argv.length < 13) {
console.error(`Usage: ${path.basename(argv[0])} ${path.basename(argv[1])} <ts_entrypoint> <old_ts_repo_url> <old_head_ref> <pr_number> <is_top_repos> <repo_list_path> <worker_count> <worker_number> <result_dir_name> <diagnostic_output> <prng_seed> <use_tempfs>?`);
process.exit(-1);
}

const [,, entrypoint, oldTsRepoUrl, oldHeadRef, prNumber, buildWithNewWhenOldFails, repoListPath, workerCount, workerNumber, resultDirName, diagnosticOutput, prngSeed] = argv;
const [,, entrypoint, oldTsRepoUrl, oldHeadRef, prNumber, buildWithNewWhenOldFails, repoListPath, workerCount, workerNumber, resultDirName, diagnosticOutput, prngSeed, tempfs] = argv;

mainAsync({
testType: "user",
tmpfs: true,
testType: "triggered",
tmpfs: tempfs && tempfs.toLowerCase() === "false" ? false : true,
entrypoint: entrypoint as TsEntrypoint,
oldTsRepoUrl,
oldHeadRef,
Expand All @@ -24,6 +24,7 @@ mainAsync({
resultDirName,
diagnosticOutput: diagnosticOutput.toLowerCase() === "true",
prngSeed: prngSeed.toLowerCase() === "n/a" ? undefined : prngSeed,
isGo: oldTsRepoUrl.includes("typescript-go")
}).catch(err => {
reportError(err, "Unhandled exception");
process.exit(1);
Expand Down
Loading
Loading