Skip to content

fix(aws): add CodeBuild log to subscribe events#2017

Merged
edwardrf merged 1 commit intomainfrom
lio/cb-msg
Apr 6, 2026
Merged

fix(aws): add CodeBuild log to subscribe events#2017
edwardrf merged 1 commit intomainfrom
lio/cb-msg

Conversation

@lionello
Copy link
Copy Markdown
Member

@lionello lionello commented Apr 6, 2026

Description

CI occasionally fails with:

Error: deployment failed for service "website": 
 ! deployment failed for service "website": 
Error: Process completed with exit code 2.

The reason is that CodeBuild log has this line:

2026-04-06T19:06:04.957Z website-image 7278f071-bfd4-4deb-ab0f-7c5d6904c070 [Container] 2026/04/06 19:06:04.685784 Phase complete: PRE_BUILD State: FAILED

which resulted in a failed build for the "website" service. This PR doesn't fix the failure (related to /tmp/nginx.conf being a folder), but at least adds the actual CodeBuild log line as the event status.

Linked Issues

Checklist

  • I have performed a self-review of my code
  • I have added appropriate tests
  • I have updated the Defang CLI docs and/or README to reflect my changes, if necessary

Summary by CodeRabbit

  • Bug Fixes
    • CodeBuild event status now correctly displays message content instead of appearing blank.

@lionello lionello requested a review from jordanstephens as a code owner April 6, 2026 21:32
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 6, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 0a4171cb-88be-44a0-800b-d204ef6126b2

📥 Commits

Reviewing files that changed from the base of the PR and between 9098072 and dc09886.

📒 Files selected for processing (1)
  • src/pkg/clouds/aws/codebuild/event.go

📝 Walkthrough

Walkthrough

The CodebuildEvent.Status() method in the AWS CodeBuild event handler was updated to return the event's message field instead of an empty string, changing the status output from blank to the raw log message content.

Changes

Cohort / File(s) Summary
CodeBuild Event Status
src/pkg/clouds/aws/codebuild/event.go
Modified Status() method to return e.message instead of empty string, enabling the method to expose the event's message content.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Possibly related PRs

Suggested reviewers

  • edwardrf

Poem

A rabbit hops with joy so bright, 🐰
No more empty status in sight,
The message now flows free and clear,
Where silence once did persevere! 💬

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: exposing CodeBuild log messages in the Status() method for subscribe events.

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

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch lio/cb-msg

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 golangci-lint (2.11.4)

level=warning msg="[linters_context] running gomodguard failed: unable to read module file go.mod: current working directory must have a go.mod file: if you are not using go modules it is suggested to disable this linter"
level=error msg="[linters_context] typechecking error: pattern ./...: directory prefix . does not contain main module or its selected dependencies"


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

@lionello lionello requested a review from edwardrf April 6, 2026 21:32
@lionello
Copy link
Copy Markdown
Member Author

lionello commented Apr 6, 2026

@edwardrf edwardrf merged commit e8d5f34 into main Apr 6, 2026
14 checks passed
@edwardrf edwardrf deleted the lio/cb-msg branch April 6, 2026 21:46
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.

2 participants