Skip to content

feat(compose): validate runServices against compose file services#211

Merged
skevetter merged 1 commit into
mainfrom
feat/devsy-045-run-services-validation
May 4, 2026
Merged

feat(compose): validate runServices against compose file services#211
skevetter merged 1 commit into
mainfrom
feat/devsy-045-run-services-validation

Conversation

@skevetter

Copy link
Copy Markdown
Contributor

Summary

Adds upfront validation that each service listed in runServices actually exists in the referenced docker-compose file's services: map. Previously, typos in runServices would pass silently through config loading and only fail with confusing errors at container start time. Now a clear error is returned immediately, listing all invalid service names (e.g. runServices: service(s) not found in compose file: [typo-service]).

  • Added validateRunServices() in pkg/devcontainer/compose.go called after LoadDockerComposeProject returns
  • Unit tests covering: empty list, all valid, invalid only, mix of valid/invalid, empty project
  • E2E test fixture with an invalid runServices entry asserting the error message

Return a clear error listing invalid service names when runServices
references services that don't exist in the docker-compose file, instead
of failing with confusing errors at container start time.
@netlify

netlify Bot commented May 4, 2026

Copy link
Copy Markdown

Deploy Preview for devsydev canceled.

Name Link
🔨 Latest commit eed80bb
🔍 Latest deploy log https://app.netlify.com/projects/devsydev/deploys/69f8c7aceb2da70008cc297b

@coderabbitai

coderabbitai Bot commented May 4, 2026

Copy link
Copy Markdown

Warning

Rate limit exceeded

@skevetter has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 37 minutes before requesting another review.

To keep reviews running without waiting, you can enable usage-based add-on for your organization. This allows additional reviews beyond the hourly cap. Account admins can enable it under billing.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 31d206cb-e976-4478-b33e-2b3633808bb3

📥 Commits

Reviewing files that changed from the base of the PR and between ba9fbb9 and eed80bb.

📒 Files selected for processing (5)
  • e2e/tests/up-docker-compose/testdata/docker-compose-run-services-invalid/.devcontainer/devcontainer.json
  • e2e/tests/up-docker-compose/testdata/docker-compose-run-services-invalid/docker-compose.yaml
  • e2e/tests/up-docker-compose/up_docker_compose.go
  • pkg/devcontainer/compose.go
  • pkg/devcontainer/compose_test.go

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
Review rate limit: 0/1 reviews remaining, refill in 37 minutes.

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

@github-actions github-actions Bot added the size/m label May 4, 2026
@skevetter
skevetter marked this pull request as ready for review May 4, 2026 16:26
@skevetter
skevetter enabled auto-merge (squash) May 4, 2026 16:26
@skevetter
skevetter merged commit db7f18a into main May 4, 2026
132 of 142 checks passed
@skevetter
skevetter deleted the feat/devsy-045-run-services-validation branch May 4, 2026 18:43
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