Skip to content

Commit 87d626e

Browse files
lice-reisclaude
andauthored
feat(ci): add migration-summary.md artifact to migration-upgrade-with-flows (#273)
Generates a /tmp/migration-summary.md at the end of every run (success or failure) and includes it in the existing artifact upload. The summary captures: outcome, source/target image digests, database backend, deployment shape (LANGFLOW_LOAD_FLOWS_PATH bind mount), preloaded flow name, and a checklist of what the run verified. Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
1 parent 6db70eb commit 87d626e

1 file changed

Lines changed: 44 additions & 1 deletion

File tree

.github/workflows/migration-upgrade-with-flows.yml

Lines changed: 44 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,13 +139,56 @@ jobs:
139139
LANGFLOW_URL: ${{ env.LANGFLOW_URL }}
140140
EXPECTED_FLOW_NAME: ${{ env.FLOW_NAME }}
141141

142-
# ── Phase 4: Artifacts ───────────────────────────────────
142+
# ── Phase 4: Summary + Artifacts ─────────────────────────
143+
- name: Generate migration summary
144+
if: always()
145+
run: |
146+
LATEST_DIGEST=$(cat /tmp/latest-digest.txt 2>/dev/null || echo "(unavailable)")
147+
NIGHTLY_DIGEST=$(cat /tmp/nightly-digest.txt 2>/dev/null || echo "(unavailable)")
148+
OUTCOME="${{ job.status }}"
149+
DATE=$(date -u +%Y-%m-%d)
150+
151+
{
152+
echo "# Langflow Migration — Run Summary"
153+
echo ""
154+
echo "**Outcome:** \`${OUTCOME}\` · Run #${{ github.run_number }} (${DATE}, ${{ github.event_name }})"
155+
echo ""
156+
echo "## Scenario"
157+
echo ""
158+
echo "| Field | Value |"
159+
echo "|---|---|"
160+
echo "| Workflow | \`${{ github.workflow }}\` |"
161+
echo "| Source image | \`langflowai/langflow:latest\` (\`${LATEST_DIGEST}\`) |"
162+
echo "| Target image | \`langflowai/langflow-nightly:latest\` (\`${NIGHTLY_DIGEST}\`) |"
163+
echo "| Database | PostgreSQL 16 (GHA service) |"
164+
echo "| Deployment | \`docker run\` + \`LANGFLOW_LOAD_FLOWS_PATH=/flows\` (bind-mounted flow JSON) |"
165+
echo "| Preloaded flow | \`${{ env.FLOW_NAME }}\` |"
166+
echo ""
167+
echo "## What this run verified"
168+
echo ""
169+
echo "- Source (latest) boots with \`LANGFLOW_LOAD_FLOWS_PATH\` and ingests the pre-built flow from disk."
170+
echo "- Target (nightly) boots on the same Postgres database with the same \`LANGFLOW_LOAD_FLOWS_PATH\`."
171+
echo "- Nightly logs contain no \`UniqueViolation\` / unique-constraint / duplicate-key errors after the re-import."
172+
echo "- The pre-loaded flow remains accessible via API after the upgrade."
173+
echo ""
174+
echo "## Artifacts"
175+
echo ""
176+
echo "- \`langflow-latest.log\` — full container log for the source phase"
177+
echo "- \`langflow-nightly.log\` — full container log for the target phase (includes alembic migration)"
178+
echo "- \`latest-digest.txt\` / \`nightly-digest.txt\` — exact image digests tested"
179+
} > /tmp/migration-summary.md
180+
181+
echo "::group::Generated summary"
182+
cat /tmp/migration-summary.md
183+
echo "::endgroup::"
184+
143185
- name: Upload logs
144186
if: always()
145187
uses: actions/upload-artifact@v4
146188
with:
147189
name: upgrade-with-flows-${{ github.run_number }}
148190
path: |
191+
/tmp/migration-summary.md
149192
/tmp/langflow-latest.log
150193
/tmp/langflow-nightly.log
151194
/tmp/latest-digest.txt

0 commit comments

Comments
 (0)