Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged

Conversation

DanielleMaywood
Copy link
Contributor

@DanielleMaywoodDanielleMaywood commentedJul 31, 2025
edited
Loading

It appears we accidentally merged a change that broke our devcontainer integration tests#18570.

You can runCODER_TEST_USE_DOCKER=1 go test ./coderd ./agent ./agent/agentcontainers to run the integration tests.

@DanielleMaywood
Copy link
ContributorAuthor

@coderabbitai review

coderabbitai[bot] reacted with eyes emoji

@coderabbitaicoderabbitai
Copy link

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitaicoderabbitai
Copy link

📝 Walkthrough

Walkthrough

The 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

Cohort / File(s)Change Summary
Container Label Filtering Logic
agent/agentcontainers/api.go
Updated label filter logic from OR to AND, corrected related comment, and added logic to skip test devcontainers by default.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~7 minutes

Suggested reviewers

  • mafredri
  • mtojek

Note

⚡️ Unit Test Generation is now available in beta!

Learn morehere, or try it out under "Finishing Touches" below.


📜 Recent review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and betweene4dc2d9 and7419dd2.

📒 Files selected for processing (1)
  • agent/agentcontainers/api.go (2 hunks)
⏰ 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)
  • GitHub Check: test-go-pg-17
  • GitHub Check: test-go-pg (windows-2022)
  • GitHub Check: test-go-race-pg
  • GitHub Check: test-go-pg (ubuntu-latest)
  • GitHub Check: test-go-pg (macos-latest)
  • GitHub Check: test-e2e
  • GitHub Check: lint
  • GitHub Check: gen
🔇 Additional comments (3)
agent/agentcontainers/api.go (3)

164-165:LGTM! Comment accurately reflects the AND logic.

The documentation now correctly describes that containers must match all provided labels, which aligns with the implementation changes.


930-934:Excellent fix for test devcontainer interference.

This change appropriately excludes test devcontainers from normal processing when no explicit include filters are set, which should resolve the integration test issues mentioned in the PR objectives.


936-942:Correct implementation of AND logic for label filtering.

The logic properly changed from OR to AND behavior:

  • Initializesok = true
  • Uses logical AND (ok = ok && (found && v == value)) to require all labels to match
  • This provides more precise filtering control and aligns with the updated documentation
✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branchdanielle/fix-devcontainer-integration-tests

🪧 Tips

Chat

There are 3 ways to chat withCodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag@coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag@coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on oursupport 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)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings togenerate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai generate unit tests to generate unit tests for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add@coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add@coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add@coderabbitai anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit ourDocumentation for detailed information on how to use CodeRabbit.
  • Join ourDiscord Community to get help, request features, and share feedback.
  • Follow us onX/Twitter for updates and announcements.

Copy link
Contributor

@CopilotCopilotAI left a 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

@DanielleMaywoodDanielleMaywood marked this pull request as ready for reviewJuly 31, 2025 11:30
Copy link
Member

@johnstcnjohnstcn left a comment

Choose a reason for hiding this comment

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

:shipit:

}
v,found:=container.Labels[label]

includeContainer=includeContainer&& (found&&v==value)
Copy link
Member

Choose a reason for hiding this comment

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

no break when matched?

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

The change is to ensureevery filter is found, instead of just one.

mtojek reacted with thumbs up emoji
@DanielleMaywoodDanielleMaywood merged commitcc4f8da intomainJul 31, 2025
30 checks passed
@DanielleMaywoodDanielleMaywood deleted the danielle/fix-devcontainer-integration-tests branchJuly 31, 2025 12:24
@github-actionsgithub-actionsbot locked and limited conversation to collaboratorsJul 31, 2025
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.
Reviewers

@mtojekmtojekmtojek left review comments

Copilot code reviewCopilotCopilot left review comments

@johnstcnjohnstcnjohnstcn approved these changes

@mafredrimafredriAwaiting requested review from mafredri

Assignees

@DanielleMaywoodDanielleMaywood

Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

3 participants
@DanielleMaywood@johnstcn@mtojek

[8]ページ先頭

©2009-2025 Movatter.jp