Skip to content

test: improve e2e invoice diagnostics - #4598

Merged
turip merged 4 commits into
mainfrom
fix/e2e-invoice-diagnostics
Jun 29, 2026
Merged

test: improve e2e invoice diagnostics#4598
turip merged 4 commits into
mainfrom
fix/e2e-invoice-diagnostics

Conversation

@turip

@turip turip commented Jun 29, 2026

Copy link
Copy Markdown
Member

What

  • Archive all E2E docker-compose logs, including per-service snapshots and live compose log streams for both base and credits-disabled phases.
  • Add JSON diagnostics to the V3 invoice E2E polling loop so invoice state and customer charge status are visible when async advancement times out.
  • Document the async billing E2E troubleshooting pattern in the repo E2E skill.

Why

The previous E2E failure only showed that invoice advancement timed out. These diagnostics make future failures correlate test output, invoice/charge state, and service logs without relying only on Docker log buffers after the fact.

Validation

  • actionlint .github/workflows/ci.yaml
  • nix develop --impure .#ci -c go test -tags=dynamic -run '^TestV3GetBillingInvoice$' ./e2e
  • nix develop --impure .#ci -c go vet -tags=dynamic ./e2e

Summary by CodeRabbit

  • Bug Fixes
    • Improved end-to-end billing test diagnostics by logging detailed async invoice-line transitions and customer charge status during polling, with JSON-formatted output for easier failure triage.
  • Documentation
    • Updated e2e guidance for eventual consistency and async billing flows to specify what to log on timeout failures and what to capture during polling.
  • Chores
    • Enhanced CI Docker Compose orchestration and log streaming across test phases, and expanded archived artifacts to preserve more service logs.

@coderabbitai

coderabbitai Bot commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

Caution

Review failed

An error occurred during the review process. Please try again later.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/e2e-invoice-diagnostics

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@greptile-apps

greptile-apps Bot commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR improves E2E invoice diagnostics and CI log capture. The main changes are:

  • JSON invoice and charge state logging during async invoice polling.
  • A non-fatal diagnostic V3 charge request helper.
  • Broader Docker Compose log streaming and archived E2E artifacts.
  • Updated E2E troubleshooting guidance for async billing flows.

Confidence Score: 5/5

This looks safe to merge.

  • No blocking issues found in the changed code.

Important Files Changed

Filename Overview
e2e/billinginvoices_v3_test.go Adds structured invoice and charge diagnostics to the async invoice polling loop.
e2e/v3helpers_test.go Adds a diagnostic charge-listing path that returns request and decode errors to the caller.
.github/workflows/ci.yaml Streams and archives Docker Compose logs for both E2E phases.
e2e/.gitignore Ignores generated E2E artifacts.
.agents/skills/e2e/SKILL.md Documents the async billing E2E troubleshooting pattern.

Reviews (4): Last reviewed commit: "test: route invoice diagnostics through ..." | Re-trigger Greptile

Comment thread e2e/billinginvoices_v3_test.go Outdated
@turip
turip marked this pull request as ready for review June 29, 2026 12:02
@turip
turip requested a review from a team as a code owner June 29, 2026 12:02
@turip turip added the release-note/ignore Ignore this change when generating release notes label Jun 29, 2026

@borosr borosr left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

lgtm

@turip
turip enabled auto-merge (squash) June 29, 2026 12:41
@turip
turip merged commit c817ba7 into main Jun 29, 2026
29 checks passed
@turip
turip deleted the fix/e2e-invoice-diagnostics branch June 29, 2026 12:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release-note/ignore Ignore this change when generating release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants