Skip to content

feat(netstat): wire portsAttributes into port forwarding watcher#202

Merged
skevetter merged 1 commit into
mainfrom
feat/devsy-024-ports-attributes-forwarding
May 4, 2026
Merged

feat(netstat): wire portsAttributes into port forwarding watcher#202
skevetter merged 1 commit into
mainfrom
feat/devsy-024-ports-attributes-forwarding

Conversation

@skevetter

Copy link
Copy Markdown
Contributor

Summary

Enhances the netstat Watcher to consult devcontainer portsAttributes when deciding forwarding behavior. The Forwarder interface now accepts a PortForwardAttribute struct (label, protocol, onAutoForward) so forwarders can log metadata and enforce per-port policy.

  • Added PortForwardAttribute struct and WithPortAttributes option to pkg/netstat/watcher.go
  • Updated Forwarder interface: Forward(port string, attr PortForwardAttribute) error
  • Container-side forwarder (credentials_server.go) now uses WithPortAttributes resolver instead of binary PortFilter
  • Host-side SSH forwarder (pkg/tunnel/forwarder.go) updated to satisfy new interface
  • E2E test expanded with otherPortsAttributes notify-policy coverage
  • Unit tests cover new resolver option and attribute resolution

The netstat Watcher now consults portsAttributes when deciding whether
to forward discovered ports. The Forwarder interface accepts a
PortForwardAttribute struct carrying label, protocol, and onAutoForward
metadata so downstream forwarders can log and act on port-specific config.
@netlify

netlify Bot commented May 4, 2026

Copy link
Copy Markdown

Deploy Preview for devsydev canceled.

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

@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 13 minutes and 20 seconds 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: 8ae64709-5dae-4ab0-9af2-2d994ba50d65

📥 Commits

Reviewing files that changed from the base of the PR and between 7af1be2 and 1721819.

📒 Files selected for processing (6)
  • cmd/agent/container/credentials_server.go
  • e2e/tests/ssh/ports_attributes_test.go
  • pkg/agent/tunnelserver/tunnelserver.go
  • pkg/netstat/watcher.go
  • pkg/netstat/watcher_test.go
  • pkg/tunnel/forwarder.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 13 minutes and 20 seconds.

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

@github-actions github-actions Bot added the size/l label May 4, 2026
@skevetter
skevetter marked this pull request as ready for review May 4, 2026 09:49
@skevetter
skevetter enabled auto-merge (squash) May 4, 2026 09:49
@skevetter
skevetter merged commit 2e93da4 into main May 4, 2026
54 checks passed
@skevetter
skevetter deleted the feat/devsy-024-ports-attributes-forwarding branch May 4, 2026 10:24
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