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

Add blacklist option to Ansible watches.yaml #2374

Merged

Conversation

asmacdo
Copy link
Member

@asmacdo asmacdo commented Jan 8, 2020

With the addition of this feature, users will be able to prevent the
creation of watches for secondary resources by specifying a blacklist
of GVKs.

The CI was flakey due to the timeouts, so they were bumped as well.

@openshift-ci-robot openshift-ci-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Jan 8, 2020
@asmacdo asmacdo added language/ansible Issue is related to an Ansible operator project do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Jan 8, 2020
@asmacdo asmacdo force-pushed the 605-blacklist-ansible-watches branch from f5dc386 to 2734d23 Compare January 8, 2020 18:47
@openshift-ci-robot openshift-ci-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Jan 8, 2020
ownerGV, err := schema.ParseGroupVersion(owner.APIVersion)
if err != nil {
// TODO(asmacdo) what circumstances cause this path?
log.Error(err, "Could not get owner reference from proxy.")
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
log.Error(err, "Could not get owner reference from proxy.")
log.Error(err, "Unable to parse Group Version")

Copy link
Contributor

@camilamacedo86 camilamacedo86 left a comment

Choose a reason for hiding this comment

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

I am not sure if I got this one.
So, the idea is watch all - some specific GVK?
If yes, would not work just add an if here and not add the GVK in the map if it is in the blacklist?

@asmacdo
Copy link
Member Author

asmacdo commented Jan 8, 2020

@camilamacedo86, I originally planned to do what you suggested, but the blacklisted watches would be created anyway by the proxy as a side effect of owner reference injection and caching.

@asmacdo asmacdo force-pushed the 605-blacklist-ansible-watches branch from e5b561e to 37d28fc Compare January 9, 2020 20:59
@asmacdo asmacdo force-pushed the 605-blacklist-ansible-watches branch 6 times, most recently from d5db444 to 88538a7 Compare January 16, 2020 22:13
@asmacdo asmacdo removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jan 20, 2020
@asmacdo asmacdo force-pushed the 605-blacklist-ansible-watches branch from 88538a7 to 7476a3b Compare January 20, 2020 16:55
@openshift-ci-robot openshift-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jan 20, 2020
@asmacdo asmacdo force-pushed the 605-blacklist-ansible-watches branch from 7476a3b to 54098dd Compare January 20, 2020 20:37
@openshift-ci-robot openshift-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jan 20, 2020
@asmacdo asmacdo force-pushed the 605-blacklist-ansible-watches branch from 54098dd to e44929c Compare January 21, 2020 16:11
pkg/ansible/proxy/cache_response.go Outdated Show resolved Hide resolved
pkg/ansible/proxy/cache_response.go Outdated Show resolved Hide resolved
@asmacdo asmacdo force-pushed the 605-blacklist-ansible-watches branch 3 times, most recently from 58ce455 to 6457169 Compare January 22, 2020 16:36
With the addition of this feature, users will be able to prevent the
creation of watches for secondary resources by specifying a blacklist
of GVKs.

The CI was flakey due to the timeouts, so they were bumped as well.

Performance test: try to bail early
@asmacdo asmacdo force-pushed the 605-blacklist-ansible-watches branch from 6457169 to 9390ee5 Compare January 22, 2020 17:47
@asmacdo asmacdo force-pushed the 605-blacklist-ansible-watches branch from 3e741d4 to 698a3ba Compare January 23, 2020 19:37
@fabianvf
Copy link
Member

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Jan 24, 2020
Copy link
Member

@jmrodri jmrodri left a comment

Choose a reason for hiding this comment

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

/lgtm pending whether we're enforcing coveralls decrease or not.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
language/ansible Issue is related to an Ansible operator project lgtm Indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants