Skip to content

refactor(e2e): dedupe compose config container lookups - #1586

Merged
skevetter merged 1 commit into
mainfrom
refactor/e2e-compose-config-dedupe
Oct 19, 2026
Merged

skevetter merged 1 commit into
mainfrom
refactor/e2e-compose-config-dedupe

Conversation

@skevetter

@skevetter skevetter commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Add expectSingleAppContainer in helper.go and use it at nine call sites in config.go that repeated the same findComposeContainer + HaveLen(1) block for the app service.
  • Turn the root folder, sub-folder and overrides It blocks into one DescribeTable with SpecTimeout on each entry.

Why

The same container lookup and assertion was copy-pasted across the up-docker-compose specs. One helper keeps the assertion messages in one place.

Validation

  • mise run cli:format, mise run cli:lint:ci: 0 issues
  • go vet ./e2e/...: clean
  • go test ./e2e/framework/...: pass
  • go tool ginkgo --dry-run --label-filter=up-docker-compose .: 56 of 503 selected, same set as before except the three testdata specs now sit under "starts workspace from testdata"
  • mise run cli:test:e2e:suite up-docker-compose: 49 passed, 7 failed
  • Same focused run on origin/main and on this branch: identical 2 passed / 5 failed. Failing on both: root folder, sub-folder, overrides, user lookup with no remoteUser, multistage build (local Docker/macOS environment)

CodeRabbit CLI

coderabbit review --agent --committed failed twice with "WebSocket closed" before producing a review.

Auto-merge

Eligible by size: yes. Non-test changed lines: 142 (44 added, 98 removed), 2 files. Not merged.

Next

Run the up-docker-compose e2e rows in CI. Those are the CI jobs that exercise these specs.

Summary by CodeRabbit

  • Tests
    • Automated checks for Docker Compose workspace startup now cover root-folder, subfolder, and override configurations with consistent setup and mount verification.
    • Related scenarios now consistently verify that exactly one app container is present and report container lookup failures. These updates make the automated checks more uniform across the tested workspace configurations.

@skevetter skevetter added the e2e-refactor e2e refactor label Oct 19, 2026
@netlify

netlify Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for devsydev canceled.

Name Link
🔨 Latest commit a982b63
🔍 Latest deploy log https://app.netlify.com/projects/devsydev/deploys/6ad5feaf34bcab07ca478084

@netlify

netlify Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for images-devsy-sh canceled.

Name Link
🔨 Latest commit a982b63
🔍 Latest deploy log https://app.netlify.com/projects/images-devsy-sh/deploys/6ad5feaf9ae1a798d56a23ff

@coderabbitai

coderabbitai Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: d3180bad-a054-4c43-bea8-51448f950b81
📥 Commits

Reviewing files that changed from the base of the PR and between 91c3655 and a982b63.

📒 Files selected for processing: 2
  • e2e/tests/up-docker-compose/config.go
  • e2e/tests/up-docker-compose/helper.go

Included review availability: This review used your included allowance. Your plan provides up to 2 included reviews per hour; 0 remain after this review.

📝 Walkthrough

The Docker Compose E2E tests now share an app-container lookup and assertion helper. Three workspace-start tests are consolidated into a table-driven test.

Changes: Docker Compose E2E Tests

Layer / File(s) Summary
Shared app-container lookup and assertion
e2e/tests/up-docker-compose/helper.go, e2e/tests/up-docker-compose/config.go
A helper locates app container IDs, fails on lookup errors, asserts exactly one container, and returns the IDs. Eight tests use it.
Workspace-start test cases
e2e/tests/up-docker-compose/config.go
The root-folder, sub-folder, and overrides cases use one table-driven test. Each case retains workspace setup, mount verification, and the long timeout.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Refactor

Merge Risk: ⚪ Minimal · up to a982b

The change reorganizes Compose E2E tests without an established behavior regression. The reported local failures also occurred on the baseline; focused CI confirmation remains ordinary validation, not an identified merge blocker.

Pre-merge checks: Passed 5
Check name Status Explanation
Title check Passed The title clearly and concisely describes the main refactor: deduplicating Compose container lookups in end-to-end tests.
Description check Passed The description explains what changed, why it changed, and how it was validated. It also reports the focused test failures and their comparison with origin/main. It does not use the template headings …
Docstring Coverage Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 2…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Description check

Explanation

The description explains what changed, why it changed, and how it was validated. It also reports the focused test failures and their comparison with origin/main. It does not use the template headings or include the type-of-change and AI-assistance checklist details, but the core information is complete.

Full details: Docstring Coverage

Explanation

No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 2 files.

✨ Finishing Touches
✨ Simplify code
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

@skevetter
skevetter marked this pull request as ready for review October 19, 2026 13:30
@mergify

mergify Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

This pull request does not currently match the merge queue conditions, so it cannot be queued from here. The box comes back if it matches again.

@skevetter
skevetter merged commit d710ebb into main Oct 19, 2026
111 checks passed
@skevetter
skevetter deleted the refactor/e2e-compose-config-dedupe branch October 19, 2026 13:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant