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

Send DAG status updates via StatusUpdateHandler #2613

Merged
merged 1 commit into from
Jun 19, 2020

Conversation

youngnick
Copy link
Member

Updates the DAG StatusClient to use the StatusUpdateWriter pattern.

Fixes #2560
Fixes #2580 - I think it fixes it, but I haven't been able to reproduce, even with the excellent script provided by @primeroz.
Fixes #2522 - I've confirmed this one with testing.

We should be able to remove the StatusClient eventually, but that API also needs refactoring for adding Conditions (currently under #2495), so for now I've just updated it to send updates via the StatusUpdateWriter rather than make API calls directly.

Signed-off-by: Nick Young ynick@vmware.com

@youngnick
Copy link
Member Author

I pushed docker.io/youngnick/contour:dag-status-update as a build of this branch if anyone wants to test in their own cluster.

@codecov
Copy link

codecov bot commented Jun 19, 2020

Codecov Report

Merging #2613 into master will decrease coverage by 0.07%.
The diff coverage is 62.06%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2613      +/-   ##
==========================================
- Coverage   76.79%   76.71%   -0.08%     
==========================================
  Files          71       71              
  Lines        5502     5505       +3     
==========================================
- Hits         4225     4223       -2     
- Misses       1190     1197       +7     
+ Partials       87       85       -2     
Impacted Files Coverage Δ
cmd/contour/serve.go 0.00% <0.00%> (ø)
internal/k8s/statusupdater.go 20.40% <0.00%> (-0.43%) ⬇️
internal/k8s/status.go 84.61% <71.42%> (-4.48%) ⬇️
internal/k8s/statusaddress.go 86.81% <100.00%> (+0.93%) ⬆️
internal/k8s/converter.go 36.95% <0.00%> (-6.53%) ⬇️

Copy link
Contributor

@jpeach jpeach left a comment

Choose a reason for hiding this comment

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

LGTM

// Now we have the statusUpdateWriter, we can create the StatusWriter, which will take the
// status updates from the DAG, and send them to the status update handler.
eventHandler.StatusClient = &k8s.StatusWriter{
Updater: suw,
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: it would be a bit cleaner if we just called sh.Writer() where necessary, rather than having a temporary suw.

Copy link
Member Author

Choose a reason for hiding this comment

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

Sure.

internal/k8s/statusaddress.go Outdated Show resolved Hide resolved
internal/k8s/status.go Outdated Show resolved Hide resolved
@youngnick youngnick force-pushed the dag-status-update branch 2 times, most recently from 1939d6f to 36f62e8 Compare June 19, 2020 06:31
Updates the DAG StatusClient to use the StatusUpdateWriter pattern.

Fixes projectcontour#2560
Fixes projectcontour#2580
Fixes projectcontour#2522

We should be able to remove the StatusClient eventually, but that API also needs refactoring for adding Conditions (currently under projectcontour#2495), so for now I've just updated it to send updates via the StatusUpdateWriter rather than make API calls directly.

Signed-off-by: Nick Young <ynick@vmware.com>
@shyaamsn
Copy link
Contributor

shyaamsn commented Jun 19, 2020

@youngnick I consistently hit #2522 when running contour integration tests in my kind cluster. I tried the docker image with this fix multiple times and can confirm it fixes #2522 and all the integration tests passes now.

@youngnick youngnick merged commit 7da4e29 into projectcontour:master Jun 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants