8000 Supply resourceVersion to watch request to prevent reading of stale cache by jessesuen · Pull Request #1612 · argoproj/argo-cd · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Supply resourceVersion to watch request to prevent reading of stale cache #1612

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

Merged
merged 1 commit into from
May 13, 2019

Conversation

jessesuen
Copy link
Member
@jessesuen jessesuen commented May 13, 2019

Resolves #1605

Our Application Watch API will now perform a list followed by a watch, and supply the resource version to the K8s watch request. This guarantees we do not return stale/inconsistent application data after some previous mutation (e.g. Sync operation).

NOTE: List + Watch is the same technique that kubectl get -w uses.

@jessesuen jessesuen requested review from alexmt and alexec May 13, 2019 21:25
Copy link
Collaborator
@alexmt alexmt left a comment

Choose a reason for hiding this comment

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

LGTM

@jessesuen jessesuen force-pushed the 1605-stale-watch-cache branch from 4fd32da to 209ad4b Compare May 13, 2019 21:32
@jessesuen jessesuen force-pushed the 1605-stale-watch-cache branch from 209ad4b to a937131 Compare May 13, 2019 21:35
@codecov-io
< 8000 /span> Copy link

Codecov Report

Merging #1612 into master will increase coverage by 0.06%.
The diff coverage is 0%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master   #1612      +/-   ##
=========================================
+ Coverage   32.33%   32.4%   +0.06%     
=========================================
  Files          70      70              
  Lines       11214   11225      +11     
=========================================
+ Hits         3626    3637      +11     
+ Misses       7059    7055       -4     
- Partials      529     533       +4
Impacted Files Coverage Δ
server/application/application.go 22.91% <0%> (-0.45%) ⬇️
controller/cache/cache.go 4.21% <0%> (ø) ⬆️
controller/cache/cluster.go 63.79% <0%> (+0.66%) ⬆️
util/kube/kube.go 34.26% <0%> (+0.92%) ⬆️
controller/appcontroller.go 37.1% <0%> (+1.01%) ⬆️

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 847b7f5...a937131. Read the comment docs.

@jessesuen jessesuen merged commit 5ed0b1a into argoproj:master May 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Need to handle stale kubernetes watch cache
3 participants
0