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

fix: emit CloudRunServiceReady event even if default url is disabled #9523

Merged
merged 3 commits into from
Sep 20, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions pkg/skaffold/deploy/cloudrun/status.go
Original file line number Diff line number Diff line change
Expand Up @@ -302,10 +302,10 @@ func (s *Monitor) printStatusCheckSummary(out io.Writer, c *counter, r *runResou
return
}
eventV2.ResourceStatusCheckEventCompleted(r.resource.String(), curStatus.ae)
r.sub.reportSuccess()
if curStatus.ae.ErrCode != proto.StatusCode_STATUSCHECK_SUCCESS {
output.Default.Fprintln(out, fmt.Sprintf("Cloud Run %s %s failed with error: %s", r.resource.Type(), r.resource.Name(), curStatus.ae.Message))
} else {
r.sub.reportSuccess()
output.Default.Fprintln(out, fmt.Sprintf("Cloud Run %s %s finished: %s. %s", r.resource.Type(), r.resource.Name(), curStatus.ae.Message, c.remaining()))
}
}
Expand Down Expand Up @@ -344,9 +344,8 @@ func (r *runServiceResource) getTerminalStatus(crClient *run.APIService) (*run.G
return ready, nil
}
func (r *runServiceResource) reportSuccess() {
if r.url != "" {
eventV2.CloudRunServiceReady(r.path, r.url, r.latestRevision)
}
url := r.url
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: looks like we don't need this url variable anymore

eventV2.CloudRunServiceReady(r.path, url, r.latestRevision)
}

type runJobResource struct {
Expand Down
Loading