Skip to content

Commit f4a4787

Browse files
committed
feat(daily-stable): report resolved Langflow version + stamp run date in BRT
- Add a "Resolve Langflow version" step that reads the running service's GET /api/v1/version and feeds LANGFLOW_VERSION into the payload, so the QA Platform Run Summary can show the concrete nightly build (e.g. 1.11.0.dev25) instead of just the ":latest" image tag. - build-run-payload.mjs: emit langflow_version, and stamp date/time in BRT (America/Sao_Paulo) instead of UTC. Stamping in UTC rolled a run started after 21:00 BRT (00:00 UTC) onto the next calendar day, so it fell outside the QA Platform Trend view's default window while Run Summary still showed it. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent 0a6bc1b commit f4a4787

2 files changed

Lines changed: 33 additions & 2 deletions

File tree

.github/workflows/daily-stable.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,22 @@ jobs:
153153
echo "stable=$(npx ts-node scripts/stable-tests.ts --count)" >> "$GITHUB_OUTPUT"
154154
echo "total=$(grep -rE '^\s*test\s*\(' tests/tests-automations/regression --include='*.spec.ts' | wc -l | tr -d ' ')" >> "$GITHUB_OUTPUT"
155155
156+
# Resolve the ACTUAL Langflow version running in the service container.
157+
# The image tag is just `:latest` (or an RC/stable tag), so it never
158+
# carries the concrete nightly build (e.g. 1.11.0.dev25). Ask the running
159+
# service via its public /api/v1/version endpoint (AUTO_LOGIN is on, so it
160+
# needs no auth) and feed it into the payload so the QA Platform's Run
161+
# Summary can show the exact version tested. Best-effort: never fail the run.
162+
- name: Resolve Langflow version
163+
if: always()
164+
id: lfver
165+
continue-on-error: true
166+
run: |
167+
V="$(curl -sf http://localhost:7860/api/v1/version \
168+
| node -e 'let d="";process.stdin.on("data",c=>d+=c).on("end",()=>{try{process.stdout.write((JSON.parse(d).version||"").toString())}catch{process.stdout.write("")}})')"
169+
echo "Resolved Langflow version: '${V:-<none>}'"
170+
echo "version=$V" >> "$GITHUB_OUTPUT"
171+
156172
- name: Build run payload
157173
if: always()
158174
env:
@@ -161,6 +177,7 @@ jobs:
161177
GITHUB_RUN_ID: ${{ github.run_id }}
162178
RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
163179
LANGFLOW_IMAGE: ${{ inputs.langflow_image || 'langflowai/langflow-nightly' }}:${{ inputs.langflow_image_tag || 'latest' }}
180+
LANGFLOW_VERSION: ${{ steps.lfver.outputs.version }}
164181
STABLE_COUNT: ${{ steps.cov.outputs.stable }}
165182
TOTAL_COUNT: ${{ steps.cov.outputs.total }}
166183
EVIDENCE_URL: ${{ steps.upload_report.outputs.artifact-url }}

scripts/build-run-payload.mjs

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,14 +34,28 @@ const coverage = (process.env.STABLE_COUNT || process.env.TOTAL_COUNT)
3434
? { stable_count: num(process.env.STABLE_COUNT), total_count: num(process.env.TOTAL_COUNT) } : undefined;
3535

3636
const now = new Date();
37+
// Stamp date/time in BRT (America/Sao_Paulo), NOT UTC. run_date is what the QA
38+
// Platform's Trend view filters on and the Run Summary labels "BRT"; stamping in
39+
// UTC rolled a run started after 21:00 BRT (00:00 UTC) onto the next calendar
40+
// day, so it fell outside the Trend's default "last N days" window while Run
41+
// Summary (no date filter) still showed it. See qa-platform spec 001.
42+
const brtParts = new Intl.DateTimeFormat("en-CA", {
43+
timeZone: "America/Sao_Paulo",
44+
year: "numeric", month: "2-digit", day: "2-digit",
45+
hour: "2-digit", minute: "2-digit", hourCycle: "h23",
46+
}).formatToParts(now);
47+
const brt = t => brtParts.find(p => p.type === t)?.value ?? "";
48+
const runDate = `${brt("year")}-${brt("month")}-${brt("day")}`;
49+
const runTime = `${brt("hour")}:${brt("minute")}`;
3750
const payload = {
3851
version: 1,
39-
date: now.toISOString().slice(0,10),
40-
time: now.toISOString().slice(11,16), // HH:MM UTC — real run time, disambiguates same-day runs
52+
date: runDate,
53+
time: runTime, // HH:MM BRT — real run time, disambiguates same-day runs
4154
workflow: process.env.WORKFLOW || "weekly-stable",
4255
run_id: process.env.GITHUB_RUN_ID || "local",
4356
run_url: process.env.RUN_URL || null,
4457
langflow_image: process.env.LANGFLOW_IMAGE || null, // the nightly build (or RC/stable on a manual run)
58+
langflow_version: process.env.LANGFLOW_VERSION || null, // resolved version from GET /api/v1/version (e.g. 1.11.0.dev25)
4559
langflow_commit_sha: process.env.LANGFLOW_COMMIT_SHA || null,
4660
duration_ms: Math.round(report?.stats?.duration ?? 0),
4761
...(coverage ? { coverage } : {}),

0 commit comments

Comments
 (0)