-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Add --port-forward to skaffold run #3263
Conversation
Codecov Report
|
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.
This looks good but we will need to add an integration test for this.
For example you could create a testcase based on TestPortForwardDeletePod
with skaffold.Run
instead skaffold.Dev
on line 83 (maybe we don't need the whole deletion testing for Run
).
I'll try it. |
integration/port_forward_test.go
Outdated
@@ -55,10 +55,28 @@ func TestPortForward(t *testing.T) { | |||
portforward.WhiteBoxPortForwardCycle(t, kubectlCLI, ns.Name) | |||
} | |||
|
|||
// TestPortForwardDeletePod tests that port forwarding works | |||
func TestRunPortForwardDeletePod(t *testing.T) { |
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.
nit: this is not deleting so we can remove the Delete
from the name
integration/port_forward_test.go
Outdated
ns, _, deleteNs := SetupNamespace(t) | ||
defer deleteNs() | ||
|
||
stop := skaffold.Run("--port-forward").InDir("examples/microservices").InNs(ns.Name).RunBackground(t) |
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.
you'll need to add some more flags to enable the API server: e.g. --rpc-port 50051 --enable-rpc=true
- but I'd rather you use a random port like in the other test. - this is why the integration test is failing!
@balopat Tests passed. Thanks for your advice! |
It seems that GoogleContainerTools#3263 makes `skaffold run` freeze when port forwarding in on. This reverts commit 647b3c3. This reverts commit 2fbed4e. This reverts commit 0abb700. Signed-off-by: David Gageot <david@gageot.net>
@tvvignesh we decided to revert this PR for now. the behavior was non-intuitive as the process would hang after completing the deployment and forwarding the port, making it feel like it was frozen. see #3415 for details |
Fixes #2949
Description
Add --port-forward to skaffold run. See more details in #2949
User facing changes
Before
No --port-forward to skaffold run
After
Add --port-forward to skaffold run
Next PRs.
n/a
Submitter Checklist
These are the criteria that every PR should meet, please check them off as you
review them:
Reviewer Notes
Release Notes