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

Add option to wait for connection to /v2/events on gRPC/HTTP server #6545

Merged

Conversation

MarlonGamez
Copy link
Contributor

@MarlonGamez MarlonGamez commented Aug 30, 2021

Description
This PR adds the option for the user to have skaffold pause execution on initialization of the gRPC/HTTP server. Execution will continue when a request to /v2/events is made. This will help ensure that users of the server can connect before Skaffold execution ends early in some cases.

This PR also moves the call to event.SendErrorMessageOnce to the server shutdown callback function, which ensures that the error message gets sent out before the server is shut down.

@codecov
Copy link

codecov bot commented Aug 30, 2021

Codecov Report

Merging #6545 (712b7dc) into main (cfe7882) will increase coverage by 0.08%.
The diff coverage is 44.44%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #6545      +/-   ##
==========================================
+ Coverage   70.44%   70.52%   +0.08%     
==========================================
  Files         515      515              
  Lines       23144    23152       +8     
==========================================
+ Hits        16303    16328      +25     
+ Misses       5785     5770      -15     
+ Partials     1056     1054       -2     
Impacted Files Coverage Δ
cmd/skaffold/app/cmd/cmd.go 70.68% <0.00%> (-0.38%) ⬇️
cmd/skaffold/app/cmd/flags.go 90.81% <ø> (ø)
cmd/skaffold/skaffold.go 0.00% <ø> (ø)
pkg/skaffold/config/options.go 100.00% <ø> (ø)
pkg/skaffold/server/server.go 46.87% <0.00%> (-0.75%) ⬇️
pkg/skaffold/event/v2/event.go 84.22% <66.66%> (-0.37%) ⬇️
pkg/skaffold/build/ko/builder.go 100.00% <0.00%> (ø)
pkg/skaffold/build/jib/jib.go 73.50% <0.00%> (+0.66%) ⬆️
pkg/skaffold/docker/parse.go 88.23% <0.00%> (+0.84%) ⬆️
pkg/skaffold/output/color.go 100.00% <0.00%> (+3.70%) ⬆️
... and 4 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update cfe7882...712b7dc. Read the comment docs.

Copy link
Contributor

@aaron-prindle aaron-prindle left a comment

Choose a reason for hiding this comment

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

LGTM, seems this flag could be defined on more commands and it looks like a commented out line was left (see comments)

@MarlonGamez MarlonGamez merged commit 130980d into GoogleContainerTools:main Aug 31, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants