-
Notifications
You must be signed in to change notification settings - Fork 956
fix(agent/agentcontainers): fix devcontainer integration tests #19109
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(agent/agentcontainers): fix devcontainer integration tests #19109
Conversation
@coderabbitai review |
✅ Actions performedReview triggered.
|
📝 WalkthroughWalkthroughThe logic for filtering containers based on label inclusion was updated to require all specified labels to match (logical AND), instead of any (logical OR). Additionally, containers labeled as test devcontainers are now skipped by default unless inclusion filters are set. Only comments and internal logic were modified; no public interfaces changed. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~7 minutes Suggested reviewers
Note ⚡️ Unit Test Generation is now available in beta!Learn more here, or try it out under "Finishing Touches" below. 📜 Recent review detailsConfiguration used: .coderabbit.yaml 📒 Files selected for processing (1)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (8)
🔇 Additional comments (3)
✨ Finishing Touches
🧪 Generate unit tests
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR fixes devcontainer integration tests by correcting the container filtering logic and improving how test containers are handled. The fix addresses filtering behavior to ensure proper container inclusion/exclusion based on labels.
- Updated container label filtering logic to require all labels to match (AND behavior) instead of any label (OR behavior)
- Added explicit filtering to ignore test devcontainers when no include filters are set
- Reorganized the filtering logic to handle test containers more appropriately
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
} | ||
v, found := container.Labels[label] | ||
|
||
includeContainer = includeContainer && (found && v == value) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no break when matched?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The change is to ensure every filter is found, instead of just one.
It appears we accidentally merged a change that broke our devcontainer integration tests #18570.
You can run
CODER_TEST_USE_DOCKER=1 go test ./coderd ./agent ./agent/agentcontainers
to run the integration tests.