Skip to content

Commit

Permalink
fix log spam in e2e flakiness detector
Browse files Browse the repository at this point in the history
The GitHub action appears to fail because of tons of log lines from the thing that logs our telemetry from e2e runs. Example: https://github.com/sourcegraph/cody/actions/runs/8321504214/job/22767854935
  • Loading branch information
sqs committed Mar 18, 2024
1 parent 43f673c commit 92608c4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/e2e-flakiness-detector.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,12 @@ jobs:
- run: pnpm install
- run: xvfb-run -a pnpm -C vscode run test:e2e --repeat-each 10 --retries 0
if: matrix.runner == 'ubuntu'
env:
NO_LOG_TESTING_TELEMETRY_CALLS: "1"
- run: pnpm -C vscode run test:e2e --repeat-each 10 --retries 0
if: matrix.runner != 'ubuntu'
env:
NO_LOG_TESTING_TELEMETRY_CALLS: "1"
- uses: actions/upload-artifact@v3
if: ${{ failure() }}
with:
Expand Down
11 changes: 3 additions & 8 deletions vscode/test/fixtures/mock-server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,16 +57,11 @@ const pubSubClient = new PubSub({
projectId: 'sourcegraph-telligent-testing',
})

const publishOptions = {
const topicPublisher = pubSubClient.topic('projects/sourcegraph-telligent-testing/topics/e2e-testing', {
gaxOpts: {
timeout: 120000,
},
}

const topicPublisher = pubSubClient.topic(
'projects/sourcegraph-telligent-testing/topics/e2e-testing',
publishOptions
)
})

//#region GraphQL Mocks

Expand Down Expand Up @@ -480,7 +475,7 @@ export class MockServer {
const loggedTestRun: Record<string, boolean> = {}

async function logTestingData(type: 'legacy' | 'new', data: string): Promise<void> {
if (process.env.CI === undefined) {
if (process.env.CI === undefined || process.env.NO_LOG_TESTING_TELEMETRY_CALLS) {
return
}

Expand Down

0 comments on commit 92608c4

Please sign in to comment.