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(updates): re-run loop when update is made #110

Merged
merged 2 commits into from
Oct 18, 2023
Merged

Conversation

Pothulapati
Copy link
Collaborator

@Pothulapati Pothulapati commented Sep 28, 2023

Fixes #93

Currently, We sometimes miss updates when we compare the statefulset
version. This could be stale as update couldn't have propogated already.

This PR fixes that by requeuing the object when an update is made, so
that we retreive the latest version when ran again.

@Pothulapati Pothulapati force-pushed the tar/missing-updates branch 5 times, most recently from 2138acb to 02fe5ec Compare October 13, 2023 13:16
Currently, We sometimes miss updates when we compare the statefulset
version. This could be stale as update couldn't have propogated already.

This PR fixes that by requeuing the object when an update is made, so
that we retreive the latest version when ran again.
@Pothulapati Pothulapati changed the title fix: don't miss updates by using revision version fix(updates): re-run loop when update is made Oct 18, 2023
@@ -446,6 +451,46 @@ var _ = Describe("Dragonfly Lifecycle tests", Ordered, FlakeAttempts(3), func()

// check for affinity
Expect(ss.Spec.Template.Spec.Affinity.NodeAffinity.PreferredDuringSchedulingIgnoredDuringExecution).To(Equal(newAffinity.NodeAffinity.PreferredDuringSchedulingIgnoredDuringExecution))

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is important as it actually verifies if the statefulset update actually translated into a rollout onto the pods.

@@ -59,7 +59,7 @@ vet: ## Run go vet against code.
.PHONY: test
test: manifests generate fmt vet envtest ## Run tests.
GOBIN=$(LOCALBIN) go install github.com/onsi/ginkgo/v2/[email protected]
KUBEBUILDER_ASSETS="$(shell $(ENVTEST) use $(ENVTEST_K8S_VERSION) --bin-dir $(LOCALBIN) -p path)" $(GINKGO) -r -p -coverprofile cover.out
KUBEBUILDER_ASSETS="$(shell $(ENVTEST) use $(ENVTEST_K8S_VERSION) --bin-dir $(LOCALBIN) -p path)" $(GINKGO) -vv -r -p -coverprofile cover.out
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

adds more verbose logs on the tests

@@ -609,12 +654,20 @@ var _ = Describe("Dragonfly Server TLS tests", Ordered, FlakeAttempts(3), func()
TLSSecretRef: &corev1.SecretReference{
Name: "df-tls",
},
Authentication: &resourcesv1.Authentication{
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is needed as an auth mechanism is necessary when we pass a TLS certificate.

@Pothulapati Pothulapati merged commit 58d867b into main Oct 18, 2023
@Pothulapati Pothulapati deleted the tar/missing-updates branch October 18, 2023 09:20
diffuse pushed a commit to diffuse/dragonfly-operator that referenced this pull request Nov 18, 2023
* fix(updates): re-run loop when update is made

Currently, We sometimes miss updates when we compare the statefulset
version. This could be stale as update couldn't have propogated already.

This PR fixes that by requeuing the object when an update is made, so
that we retreive the latest version when ran again.

* fix comment
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.

Operator sometimes does not apply all updates
3 participants