History

Disable product telemetry in CI (#1701)

CI reports to the production PostHog project from every e2e shard. Each shard is a fresh container, so it mints a fresh anonymous analytics id and arrives on a fresh runner IP, which inflates machine and user counts. Set DO_NOT_TRACK, EXECUTOR_DISABLE_ANALYTICS and EXECUTOR_DISABLE_INTEGRATIONS_FETCH on the workflows that execute product code. Pin disabled: false in the two registry tests that assert the fetch happens, so they do not inherit the ambient flags.

Rhys Sullivan committed 2 months ago

Commit 9e7afaf1 parent f08e84d5 files · +56 −0Browse files

Unified · Split

5 files
  1. .github/workflows/ci.yml +12 −0
  2. .github/workflows/publish-desktop.yml +12 −0
  3. .github/workflows/publish-selfhost-docker.yml +12 −0
  4. .github/workflows/release.yml +12 −0
  5. packages/core/integrations-registry/src/registry.test.ts +8 −0
.github/workflows/ci.yml+12−0
@@ -10,6 +10,18 @@ concurrency: · 9 unmodified lines
1010 group: ci-${{ github.ref }}
1111 cancel-in-progress: true
1212
13+# CI is not a user. Without this, executor's own product telemetry reports to the
14+# production PostHog project from every e2e shard: the analytics layer
15+# (integration_added, execution_completed, artifact_*) and the
16+# integrations-registry fetch, which lands as a `hit` event. Each shard is a
17+# fresh container, so it mints a fresh anonymous id and arrives on a fresh
18+# runner IP — inflating machine and user counts by roughly an order of
19+# magnitude. Both opt-outs are the packages' documented CI/test hooks.
20+env:
21+ DO_NOT_TRACK: "1"
22+ EXECUTOR_DISABLE_ANALYTICS: "1"
23+ EXECUTOR_DISABLE_INTEGRATIONS_FETCH: "1"
24+
1325 jobs:
1426 changes:
1527 name: Changed paths
.github/workflows/publish-desktop.yml+12−0
@@ -21,6 +21,18 @@ concurrency: · 20 unmodified lines
2121 group: publish-desktop-${{ github.ref }}
2222 cancel-in-progress: false
2323
24+# CI is not a user. Without this, executor's own product telemetry reports to the
25+# production PostHog project from every e2e shard: the analytics layer
26+# (integration_added, execution_completed, artifact_*) and the
27+# integrations-registry fetch, which lands as a `hit` event. Each shard is a
28+# fresh container, so it mints a fresh anonymous id and arrives on a fresh
29+# runner IP — inflating machine and user counts by roughly an order of
30+# magnitude. Both opt-outs are the packages' documented CI/test hooks.
31+env:
32+ DO_NOT_TRACK: "1"
33+ EXECUTOR_DISABLE_ANALYTICS: "1"
34+ EXECUTOR_DISABLE_INTEGRATIONS_FETCH: "1"
35+
2436 jobs:
2537 build:
2638 permissions:
.github/workflows/publish-selfhost-docker.yml+12−0
@@ -16,6 +16,18 @@ concurrency: · 15 unmodified lines
1616 group: publish-selfhost-docker-${{ inputs.tag }}
1717 cancel-in-progress: false
1818
19+# CI is not a user. Without this, executor's own product telemetry reports to the
20+# production PostHog project from every e2e shard: the analytics layer
21+# (integration_added, execution_completed, artifact_*) and the
22+# integrations-registry fetch, which lands as a `hit` event. Each shard is a
23+# fresh container, so it mints a fresh anonymous id and arrives on a fresh
24+# runner IP — inflating machine and user counts by roughly an order of
25+# magnitude. Both opt-outs are the packages' documented CI/test hooks.
26+env:
27+ DO_NOT_TRACK: "1"
28+ EXECUTOR_DISABLE_ANALYTICS: "1"
29+ EXECUTOR_DISABLE_INTEGRATIONS_FETCH: "1"
30+
1931 jobs:
2032 metadata:
2133 runs-on: blacksmith-4vcpu-ubuntu-2404
.github/workflows/release.yml+12−0
@@ -13,6 +13,18 @@ concurrency: · 12 unmodified lines
1313 group: release-${{ github.ref }}
1414 cancel-in-progress: false
1515
16+# CI is not a user. Without this, executor's own product telemetry reports to the
17+# production PostHog project from every e2e shard: the analytics layer
18+# (integration_added, execution_completed, artifact_*) and the
19+# integrations-registry fetch, which lands as a `hit` event. Each shard is a
20+# fresh container, so it mints a fresh anonymous id and arrives on a fresh
21+# runner IP — inflating machine and user counts by roughly an order of
22+# magnitude. Both opt-outs are the packages' documented CI/test hooks.
23+env:
24+ DO_NOT_TRACK: "1"
25+ EXECUTOR_DISABLE_ANALYTICS: "1"
26+ EXECUTOR_DISABLE_INTEGRATIONS_FETCH: "1"
27+
1628 jobs:
1729 release:
1830 runs-on: ubuntu-latest
packages/core/integrations-registry/src/registry.test.ts+8−0
@@ -131,6 +131,10 @@ describe("IntegrationsRegistry", () => { · 130 unmodified lines
131131 Effect.provide(
132132 integrationsRegistryLayer({
133133 userAgent: TEST_USER_AGENT,
134+ // Pinned: this case asserts the fetch happens, so it must not
135+ // inherit an ambient DO_NOT_TRACK / EXECUTOR_DISABLE_INTEGRATIONS_FETCH
136+ // (CI sets both). Mirrors the analytics package's test config.
137+ disabled: false,
134138 cacheDir,
135139 url: "https://integrations.test/api.json",
136140 }).pipe(Layer.provide(httpLayer), Layer.provide(NodeFileSystem.layer)),
@@ -164,6 +168,10 @@ describe("IntegrationsRegistry", () => { · 27 unmodified lines
164168 Effect.provide(
165169 integrationsRegistryLayer({
166170 userAgent: TEST_USER_AGENT,
171+ // Pinned: this case asserts the fetch happens, so it must not
172+ // inherit an ambient DO_NOT_TRACK / EXECUTOR_DISABLE_INTEGRATIONS_FETCH
173+ // (CI sets both). Mirrors the analytics package's test config.
174+ disabled: false,
167175 cacheDir,
168176 url: "https://integrations.test/api.json",
169177 }).pipe(Layer.provide(httpLayer), Layer.provide(NodeFileSystem.layer)),