Skip to content

Output app logs from e2e as a github artifact#608

Merged
mjh1 merged 2 commits intomainfrom
mh/e2e
Mar 9, 2026
Merged

Output app logs from e2e as a github artifact#608
mjh1 merged 2 commits intomainfrom
mh/e2e

Conversation

@mjh1
Copy link
Copy Markdown
Contributor

@mjh1 mjh1 commented Mar 6, 2026

Summary by CodeRabbit

  • Chores
    • Strengthened CI/CD deployment workflow with enhanced error handling mechanisms
    • Improved testing infrastructure with comprehensive log collection and extended retention periods
    • Refined test environment settings for consistency and reliability

@mjh1 mjh1 requested a review from thomshutt March 6, 2026 13:50
Signed-off-by: Max Holland <[email protected]>
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 9, 2026

📝 Walkthrough

Walkthrough

Updates GitHub Actions workflow file to enhance error handling with strict shell options, redirects process outputs to log files, switches API endpoints from daydream.monster to daydream.live, renames workflow artifacts to generic names, and adds artifact upload for application logs.

Changes

Cohort / File(s) Summary
GitHub Actions Workflow Configuration
.github/workflows/docker-build.yml
Adds strict shell options (set -euo pipefail) for error handling; updates E2E test environment endpoints from daydream.monster to daydream.live; redirects background process outputs to scope-app.log file; renames artifact uploads from PR-specific names to generic names (playwright-report, test-artifacts); adds new artifact upload step for scope-app.log with 30-day retention.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐰 Hop, hop—the workflows now run tight,
With logs that glow and strict shell might,
From monster dreams to live we spring,
Artifacts gathered, tests will sing!
Our scope app hops through the night. 🌙✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and specifically describes the main objective of the pull request: adding app logs as a GitHub artifact in the e2e workflow.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch mh/e2e

Tip

Try Coding Plans. Let us write the prompt for your AI agent so you can ship faster (with fewer bugs).
Share your feedback on Discord.


Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
.github/workflows/docker-build.yml (1)

299-319: Tail scope-app.log before exiting on startup timeout.

Right now a startup failure turns into a generic 120s timeout, and the actual exception only exists in the artifact. Dumping the last log lines here makes failed runs much faster to diagnose.

Proposed change
       if [ $ATTEMPT -eq $MAX_ATTEMPTS ]; then
         echo "App did not start in time"
+        if [ -f scope-app.log ]; then
+          echo "::group::scope-app.log (tail)"
+          tail -n 200 scope-app.log
+          echo "::endgroup::"
+        fi
         exit 1
       fi
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/docker-build.yml around lines 299 - 319, When the startup
loop reaches the timeout (when ATTEMPT equals MAX_ATTEMPTS), print the last
lines of the background process log to aid debugging: update the timeout branch
in the startup script (the while loop and the subsequent if that compares
ATTEMPT and MAX_ATTEMPTS) to echo the timeout message, then run a tail of
scope-app.log (e.g., tail -n 200 scope-app.log) to dump recent logs to the
workflow output before exiting with status 1; keep the existing variables
MAX_ATTEMPTS, ATTEMPT, and the background invocation uv run daydream-scope >
scope-app.log 2>&1 & intact.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In @.github/workflows/docker-build.yml:
- Around line 299-319: When the startup loop reaches the timeout (when ATTEMPT
equals MAX_ATTEMPTS), print the last lines of the background process log to aid
debugging: update the timeout branch in the startup script (the while loop and
the subsequent if that compares ATTEMPT and MAX_ATTEMPTS) to echo the timeout
message, then run a tail of scope-app.log (e.g., tail -n 200 scope-app.log) to
dump recent logs to the workflow output before exiting with status 1; keep the
existing variables MAX_ATTEMPTS, ATTEMPT, and the background invocation uv run
daydream-scope > scope-app.log 2>&1 & intact.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: d151a349-369e-498c-8f9d-818eb16b82f3

📥 Commits

Reviewing files that changed from the base of the PR and between 0a52f7c and 601c885.

📒 Files selected for processing (1)
  • .github/workflows/docker-build.yml

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 9, 2026

🚀 fal.ai Preview Deployment

App ID daydream/scope-pr-608--preview
WebSocket wss://fal.run/daydream/scope-pr-608--preview/ws
Commit 601c885

Testing

Connect to this preview deployment by running this on your branch:

uv run build && SCOPE_CLOUD_APP_ID="daydream/scope-pr-608--preview/ws" uv run daydream-scope

🧪 E2E tests will run automatically against this deployment.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 9, 2026

✅ E2E Tests passed

Status passed
fal App daydream/scope-pr-608--preview
Run View logs

Test Artifacts

Check the workflow run for screenshots.

@mjh1 mjh1 merged commit d0342e8 into main Mar 9, 2026
10 checks passed
@mjh1 mjh1 deleted the mh/e2e branch March 9, 2026 13:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant