-
Notifications
You must be signed in to change notification settings - Fork 565
🐛 OCPBUGS-37982: Reduce Frequency of Update Requests for Copied CSVs #3597
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
openshift-merge-bot
merged 26 commits into
operator-framework:master
from
tmshort:PR-3497
Jun 18, 2025
Merged
Changes from all commits
Commits
Show all changes
26 commits
Select commit
Hold shift + click to select a range
f0b7776
(bugfix): reduce frequency of update requests for CSVs
everettraven 8db54cc
update unit tests
everettraven 4e91464
updates to test so far
everettraven 5cbee7b
Small changes
bentito a2690ec
Add metadata drift guard to copyToNamespace
bentito 0b973b9
Tests for metadata guard
bentito f0a1d7e
Persist observed annotations on all status updates
bentito edfa12d
GCI the file
bentito e3130bb
Use TransformFunc
tmshort 50c46e0
Update operatorgroup tests to compile
tmshort d6bf664
Restore operatorgroup_test from master
tmshort 379e843
Remove more PartialObjectMetadata
tmshort c50f880
Remove hashes from operator_test
tmshort fc367b7
Fix error messages for static-analysis
tmshort 3e3568f
Update test annotations and test client
tmshort fa84695
Rename pruning to listerwatcher
tmshort 15f090a
Set resync to 6h
tmshort 93a78a8
Add CSV copy revert syncer
tmshort d067f2c
Log tweaks
tmshort 95f01aa
Consolidate revert and gc syncers
tmshort 2cd56b4
Add logging and reduce the amount of metadata in the TransformFunc
tmshort ed9cb76
Handle the copy CSV revert via a requeue of the primary CSV
tmshort 7d53e44
Revert "Set resync to 6h"
tmshort baca995
Add delete handler for copied csv
tmshort 4c5d1be
Revert whitespace change
tmshort 90919ed
Rename function, fix comment
tmshort File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
pkg/controller/operators/internal/listerwatcher/listerwatcher.go
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package listerwatcher | ||
|
||
import ( | ||
"context" | ||
|
||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" | ||
"k8s.io/apimachinery/pkg/runtime" | ||
"k8s.io/apimachinery/pkg/watch" | ||
"k8s.io/client-go/tools/cache" | ||
|
||
"github.com/operator-framework/operator-lifecycle-manager/pkg/api/client/clientset/versioned" | ||
) | ||
|
||
func NewListerWatcher(client versioned.Interface, namespace string, override func(*metav1.ListOptions)) cache.ListerWatcher { | ||
return &cache.ListWatch{ | ||
ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { | ||
override(&options) | ||
return client.OperatorsV1alpha1().ClusterServiceVersions(namespace).List(context.TODO(), options) | ||
}, | ||
WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { | ||
override(&options) | ||
return client.OperatorsV1alpha1().ClusterServiceVersions(namespace).Watch(context.TODO(), options) | ||
}, | ||
} | ||
} |
52 changes: 0 additions & 52 deletions
52
pkg/controller/operators/internal/pruning/listerwatcher.go
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.