Skip to content

Conversation

@blsmth
Copy link
Contributor

@blsmth blsmth commented Jul 22, 2025

Summary

Changes

  • Modified watchBuildPhase() in cmd/build.go to detect prebuild phase failures
  • When build state indicates failure during prebuild, stops spinner and streams logs
  • Preserves existing UX for successful builds (spinner only)
  • Supports both CloudWatch and S3 log sources

Test plan

  • Verify compilation and tests pass
  • Test with a build that fails during prebuild phase (malformed app.json)
  • Verify normal build flow still works correctly
  • Check that appropriate error logs are displayed

Fixes #95. When builds fail during prebuild phases (INSTALL, PRE_BUILD, etc.),
users now see the relevant error logs instead of just a spinner. This helps
users understand failures like malformed app.json or apppack.toml files.

The implementation checks CodeBuild status (FAILED, STOPPED, TIMED_OUT) during
prebuild phases and streams logs when failures are detected. This preserves
existing UX for successful builds while providing error visibility for failures.
@blsmth blsmth force-pushed the show-prebuild-logs branch from 552831a to 76587bd Compare July 22, 2025 02:43
@blsmth
Copy link
Contributor Author

blsmth commented Jul 30, 2025

closing this one in favor of #98 which is the same thing but with a refactor to reduce complexity

@blsmth blsmth closed this Jul 30, 2025
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.

Show logs when a build fails before the "build" phase starts

2 participants