Skip to content
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

Feature request: Port forward for all ready resources #5318

Open
Richard87 opened this issue Jan 28, 2021 · 9 comments
Open

Feature request: Port forward for all ready resources #5318

Richard87 opened this issue Jan 28, 2021 · 9 comments

Comments

@Richard87
Copy link

I don't want skaffold to wait for all resources to be ready before starting to port-forward

This would make it easier to troubleshoot broken builds in our case :)

Expected behavior

Open port-forwarding when resource is ready

Actual behavior

Waits for all resources to be ready before port-forwarding

Information

  • Skaffold version: 1.18
  • Operating system: Fedora 33
@MarlonGamez MarlonGamez added kind/feature-request priority/p2 May take a couple of releases labels Feb 1, 2021
@MarlonGamez
Copy link
Contributor

Hi @Richard87, thanks for opening up this issue! This definitely seems like a reasonable request, and I'll discuss it with our team. It seems like it would require a bit of restructuring about how things are currently done within skaffold, but I'll update here once I have more information :)

@MarlonGamez MarlonGamez added the triage/discuss Items for discussion label Feb 1, 2021
@nkubala nkubala removed the triage/discuss Items for discussion label Feb 1, 2021
@MarlonGamez
Copy link
Contributor

Hey again, could you expand a bit more on your use case and how this functionality would help you? Does disabling the status check phase in skaffold by using --status-check=false help things?

@Richard87
Copy link
Author

Hi! I was not aware of --status-check=false, I'll enable it and see what happens next time something breaks :)

For example, if there is a problem with the database schema, our web-app doesn't go "ready", therefore port-forwarding doesn't start, and it gets much harder to connect to the database to fix the issue, and sometimes, Skaffold gives up and deletes all resources before I finish fixing the issue.

Or another example, if someone (probably me) have to work on different microservices at the same time, and havent checked out a different branch for each, and breaks one of the builds, I can't fix one at a time to get it up, everything have to be fixed before anything is available...

@Richard87
Copy link
Author

Hmm, --status-check=false did bring it up without deleting the deployments, but no port-forwarding worked.

I got a whole bunch of port forwarding service-eportal-db-richard-3306 got terminated: output: error: unable to forward port because pod is not running. Current status=Pending

@tejal29
Copy link
Contributor

tejal29 commented Feb 23, 2021

For user usecase i think it makes sense to port-forward as resources are ready.

Thanks for the request @Richard87 . We will try to bundle it with #4832

@Richard87
Copy link
Author

For user usecase i think it makes sense to port-forward as resources are ready.

Thanks for the request @Richard87 . We will try to bundle it with #4832

So, port-forwarding starts as soon as the requested resource is ready, or will it wait until all resources are ready?

@Richard87
Copy link
Author

version 1.22 / #4832 did not solve my use case...

Skaffold still waits for all resources to be ready before port-forwarding any resources, even ready resources.
(I have one resource that takes some time to come up, and it would be nice to start working in dev since it's not required)

@gsquared94
Copy link
Contributor

@Richard87 you're right, #4832 only modified the pod selection logic and doesn't really help with your issue. The code currently has the status-check and port-forward as separate stages so it's not a straight-forward refactor to make them triggerable with individual resource updates. I know that @nkubala is working on making the port-forwarder an element of the Deployer. Since status-check is already inside the Deployer, maybe this is something that could be attempted then?

@Richard87
Copy link
Author

Thanks for keeping this on the radar, it would make my bad (coding) days way better! :)

@nkubala nkubala self-assigned this Jun 14, 2021
@nkubala nkubala added this to the v1.29.0 milestone Jun 14, 2021
@MarlonGamez MarlonGamez modified the milestones: v1.29.0, v1.30.0 Jul 26, 2021
@tejal29 tejal29 removed this from the v1.30.0 milestone Sep 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants