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

[ws-manager] Retry controlPort on conflict #7079

Merged
merged 1 commit into from
Dec 6, 2021

Conversation

csweichel
Copy link
Contributor

@csweichel csweichel commented Dec 6, 2021

Description

This PR makes the ControlPort operation in ws-manager retry on-conflict. Such edit conflicts can arise because ControlPort is not synchronised (i.e. multiple such operations can happen at the same time), and because of Kubernetes opportunistic concurrency model.

Note: this does not actually fix #7054. The status updates happen, but the ports view does not update. This PR clearly fixes a part of the problem, but not the entire issue.

Related Issue(s)

relates to #7054

How to test

  1. Run gpctl workspaces subscribe
  2. Start a workspace
  3. Expose multiple services, change the port visibility from public to private and back

All port exposures should trigger a status update.

Release Notes

[ws-manager] Improve port exposure stability

@codecov
Copy link

codecov bot commented Dec 6, 2021

Codecov Report

Merging #7079 (4cc1f93) into main (5bd176b) will increase coverage by 8.00%.
The diff coverage is 56.06%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #7079      +/-   ##
==========================================
+ Coverage   32.62%   40.62%   +8.00%     
==========================================
  Files           6       13       +7     
  Lines        1128     3493    +2365     
==========================================
+ Hits          368     1419    +1051     
- Misses        724     1959    +1235     
- Partials       36      115      +79     
Flag Coverage Δ
components-image-builder-mk3-app ?
components-local-app-app-darwin-amd64 ?
components-local-app-app-darwin-arm64 ?
components-local-app-app-linux-amd64 ?
components-local-app-app-linux-arm64 ?
components-local-app-app-windows-386 ?
components-local-app-app-windows-amd64 ?
components-local-app-app-windows-arm64 ?
components-ws-manager-app 40.62% <56.06%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
components/ws-manager/pkg/manager/manager.go 23.71% <56.06%> (ø)
...ents/image-builder-mk3/pkg/orchestrator/metrics.go
...image-builder-mk3/pkg/orchestrator/orchestrator.go
components/local-app/pkg/auth/auth.go
components/local-app/pkg/auth/pkce.go
components/image-builder/pkg/resolve/resolve.go
...ents/image-builder-mk3/pkg/orchestrator/monitor.go
components/ws-manager/pkg/manager/probe.go 0.00% <0.00%> (ø)
components/ws-manager/pkg/manager/monitor.go 9.46% <0.00%> (ø)
components/ws-manager/pkg/manager/manager_ee.go 0.00% <0.00%> (ø)
... and 10 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 5bd176b...4cc1f93. Read the comment docs.

@csweichel csweichel marked this pull request as ready for review December 6, 2021 13:30
@csweichel csweichel changed the title [ws-managr] Retry controlPort on conflict [ws-manager] Retry controlPort on conflict Dec 6, 2021
Copy link
Contributor

@iQQBot iQQBot left a comment

Choose a reason for hiding this comment

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

LGTM

@roboquat
Copy link
Contributor

roboquat commented Dec 6, 2021

LGTM label has been added.

Git tree hash: cec2f98d7a4d283e0e9dc89808df9fa1584267f1

@csweichel
Copy link
Contributor Author

/approve no-issue

@roboquat
Copy link
Contributor

roboquat commented Dec 6, 2021

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: csweichel, iQQBot

Associated issue: #7054

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@roboquat roboquat merged commit 5742c6a into main Dec 6, 2021
@roboquat roboquat deleted the csweichel/server-stops-sending-7054 branch December 6, 2021 17:17
@roboquat roboquat added deployed: workspace Workspace team change is running in production deployed Change is completely running in production labels Dec 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved deployed: workspace Workspace team change is running in production deployed Change is completely running in production release-note size/L team: workspace Issue belongs to the Workspace team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

server stops sending events to supervisor occasionally
3 participants