You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ci: tighten drift workflow for readability and maintainability
- Single source of truth for the apm-server config: write it to a
file in the CI run, then read it back (with path.data rewritten)
when generating the recipe in the drift issue. The CI run and the
recipe can no longer disagree about what config produced the
captured /stats.
- Split "Run apm-server, capture /stats" into "Write apm-server
config" + "Run apm-server, capture /stats". The split makes the
config the source-of-truth artifact other steps reference.
- Replace the on-disk PID file with a bash variable plus an EXIT
trap that cleans up apm-server even if curl fails.
- Hoist STATS_PORT to a job-level env so the magic 15066 lives in
one place.
- Recipe: `export PATH="$PATH:$(go env GOPATH)/bin"` after
`go install`, since contributors without that already in PATH
would otherwise see "stats-to-mapping: command not found".
- Issue title and lead paragraph now state the drifted file count
(`stats-to-mapping drift in N file(s) (date)`) so a reader
scanning the issue list grasps the scope without opening it.
Workflow output renamed `drift` -> `drifted_files` (a count) and
the conditional steps gate on != '0'.
No behavior change in what's detected or when an issue is opened.
Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
The weekly drift-check workflow detected divergence between apm-server's \`/stats\` endpoint and the upstream mapping files maintained in \`elastic/elasticsearch\`, \`elastic/beats\`, and \`elastic/integrations\`.
203
+
The weekly drift-check workflow detected drift in **$DRIFTED_FILES file(s)** between apm-server's \`/stats\` endpoint and the upstream mapping files in \`elastic/elasticsearch\`, \`elastic/beats\`, and \`elastic/integrations\`.
178
204
179
205
Detected on $today by [workflow run]($RUN_URL). The full \`git diff\` of every drifted file is attached to that run as the \`drift-diff\` artifact, alongside the captured \`stats.json\`.
180
206
@@ -186,56 +212,48 @@ jobs:
186
212
187
213
## Reproduce locally
188
214
215
+
From an apm-server checkout:
216
+
189
217
\`\`\`shell
190
-
# 1. Install the regen tool.
218
+
# 1. Install the regen tool. Make sure \$(go env GOPATH)/bin is on PATH.
191
219
go install github.com/elastic/apm-tools/cmd/stats-to-mapping@latest
220
+
export PATH="\$PATH:\$(go env GOPATH)/bin"
192
221
193
-
# 2. Build apm-server from main and capture a TBS-enabled /stats snapshot.
222
+
# 2. Build apm-server and capture a TBS-enabled /stats snapshot.
0 commit comments