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: Remove readiness tracker deadlock caused by duplicate syncs #2970

Merged
merged 2 commits into from
Aug 24, 2023

Conversation

maxsmythe
Copy link
Contributor

What this PR does / why we need it:

The following sync config would cause readiness tracker to hang:

apiVersion: config.gatekeeper.sh/v1alpha1
kind: Config
metadata:
  name: config
  namespace: gatekeeper-system
spec:
  sync:
    syncOnly:
    - group: ""
      kind: Namespace
      version: v1
    - group: networking.k8s.io
      kind: NetworkPolicy
      version: v1
    - group: networking.k8s.io
      kind: NetworkPolicy
      version: v1

this PR fixes that.

Which issue(s) this PR fixes (optional, using fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when the PR gets merged):
Fixes #

Special notes for your reviewer:

Signed-off-by: Max Smythe <smythe@google.com>
@codecov-commenter
Copy link

codecov-commenter commented Aug 23, 2023

Codecov Report

Patch coverage: 57.14% and no project coverage change.

Comparison is base (83ccdd3) 53.10% compared to head (4230479) 53.10%.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #2970   +/-   ##
=======================================
  Coverage   53.10%   53.10%           
=======================================
  Files         135      135           
  Lines       11806    11813    +7     
=======================================
+ Hits         6269     6273    +4     
- Misses       5051     5053    +2     
- Partials      486      487    +1     
Flag Coverage Δ
unittests 53.10% <57.14%> (+<0.01%) ⬆️

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

Files Changed Coverage Δ
pkg/readiness/tracker_map.go 73.13% <25.00%> (-3.06%) ⬇️
pkg/readiness/object_tracker.go 84.26% <100.00%> (+0.16%) ⬆️

... and 1 file with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@ritazh ritazh left a comment

Choose a reason for hiding this comment

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

LGTM

@maxsmythe maxsmythe merged commit e50ee2f into open-policy-agent:master Aug 24, 2023
15 checks passed
salaxander pushed a commit to salaxander/gatekeeper that referenced this pull request Sep 13, 2023
Mattes83 pushed a commit to Mattes83/gatekeeper that referenced this pull request Oct 25, 2023
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.

None yet

3 participants