-
Notifications
You must be signed in to change notification settings - Fork 66
Skip network and proxy creation when no credentials are present #534
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
Conversation
Co-authored-by: jakecoffman <[email protected]>
…ario Co-authored-by: jakecoffman <[email protected]>
Co-authored-by: jakecoffman <[email protected]>
|
@copilot fix the CI errors |
Co-authored-by: jakecoffman <[email protected]>
... Fixed in commit 001ef59. The issue was that case-insensitive filesystem support requires networks to be created even when credentials are absent. Updated the logic to create networks when either credentials exist OR case-insensitive filesystem is needed, while the proxy is only created when credentials exist. |
|
@copilot Fix these tests as well: I think the issue here is we are expecting to see certain output from the Proxy, but we aren't running the proxy since there are no credentials. Is there another way to assert? Or can we add an unrelated credential to the test so the Proxy starts up? |
Co-authored-by: jakecoffman <[email protected]>
|
Will revisit soon, still think this is a good idea but things are getting messy. |
Summary
Successfully implemented the optimization to skip creating Docker networks and starting the proxy container when there are no credentials to protect.
Changes Made
Technical Details
Modified Files
internal/infra/run.go:
hasCredentialscheck to determine if proxy should be createdneedsNetworkcheck for both credentials and case-insensitive filesysteminternal/infra/updater.go:
NewUpdaterto handle nil network and proxy parametersputUpdaterInputsto skip certificate copy when no proxy existsinternal/infra/run_test.go:
testdata/scripts/proxy.txt:
testdata/scripts/pypi.txt:
Benefits
Test Results
✅ SMB mount test passes (case-insensitive filesystem works)
✅ Proxy tests pass (with and without credentials)
✅ PyPI test updated to work with conditional proxy
✅ All unit tests pass
✅ All linting checks pass (gofmt, go vet)
✅ CodeQL security scan: 0 vulnerabilities
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.