-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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 ansible-operator finalizer concurrency issue #5678
Fix ansible-operator finalizer concurrency issue #5678
Conversation
For ansible-based operators, this change fixes an issue that caused finalizers to fail to run if the watched resource (CR) is deleted during reconciliation. Fixes operator-framework#4909 Signed-off-by: Austin Macdonald <[email protected]>
ff4991c
to
5d3b1c3
Compare
Signed-off-by: Austin Macdonald <[email protected]>
Signed-off-by: Austin Macdonald <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The changes look good and make sense to me, but because I feel I don't know enough about Ansible operators I will leave explicit approval to someone more knowledgeable.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
Just a couple nits but they can be fixed later if we want. The biggest one is the makefile targets should be in a .PHONY.
@@ -0,0 +1,58 @@ | |||
--- | |||
# TODO(asmacdo) this should be the only task. the other is getting magiced in | |||
- name: Create the test.example.com/v1alpha1.FinalizerConcurrencyTest |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is there a reason the file is finalizerconcurrencytest_test
? vs finalizerconcurrency_test
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, but its not a good one. The testdata generation takes the Kind name "FinalizerConcurrenctTest" and automagically creates a verify task finalizerconcurrencytest_test. Rather than delete that and put mine in place, I just clobbered it.
6143ae2
to
518595e
Compare
Signed-off-by: Austin Macdonald <[email protected]>
518595e
to
18936db
Compare
@@ -156,10 +156,16 @@ e2e_targets := test-e2e $(e2e_tests) | |||
export KIND_CLUSTER := osdk-test | |||
|
|||
KUBEBUILDER_ASSETS = $(PWD)/$(shell go install sigs.k8s.io/controller-runtime/tools/setup-envtest@latest && $(shell go env GOPATH)/bin/setup-envtest use $(ENVTEST_K8S_VERSION) --bin-dir tools/bin/ -p path) | |||
test-e2e-setup: build | |||
test-e2e-setup:: build dev-install cluster-create |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ryantking Since you just changed this thought you might want to have a look. After digging in, the memcached-molecule test needs to create its own cluster, so I had to separate the make targets.
Signed-off-by: Austin Macdonald <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
For ansible-based operators, this change fixes an issue that caused
finalizers to fail to run if the watched resource (CR) is deleted during
reconciliation.
Fixes #4909
Signed-off-by: Austin Macdonald [email protected]
Description of the change:
Motivation for the change:
Checklist
If the pull request includes user-facing changes, extra documentation is required:
changelog/fragments
(seechangelog/fragments/00-template.yaml
)website/content/en/docs