Skip to content

ROX-12219: Add support for pause-reconcile annotation - #29

Merged
porridge merged 3 commits into
mainfrom
vbologa/ROX-12219-pause-reconcile-annotation
Sep 19, 2022
Merged

ROX-12219: Add support for pause-reconcile annotation#29
porridge merged 3 commits into
mainfrom
vbologa/ROX-12219-pause-reconcile-annotation

Conversation

@vladbologa

@vladbologavladbologa commented Sep 2, 2022

Copy link
Copy Markdown
Contributor

Implemented support for customizable "pause-reconcile" annotation, and added unit tests.

Comment on lines +36 to +37
ReasonUninstallSuccessful = status.ConditionReason("UninstallSuccessful")
ReasonPauseReconcileAnnotationSet = status.ConditionReason("PauseReconcileAnnotationSet")

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Suggested change
ReasonUninstallSuccessful=status.ConditionReason("UninstallSuccessful")
ReasonPauseReconcileAnnotationSet=status.ConditionReason("PauseReconcileAnnotationSet")
ReasonUninstallSuccessful=status.ConditionReason("UninstallSuccessful")
ReasonPauseReconcileAnnotationSet=status.ConditionReason("PauseReconcileAnnotationSet")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

nit: WDYTH renaming ReasonPauseReconcileAnnotationSet to ReasonPauseReconcileAnnotationPresent?

The Set in the end sounds to me like an action which happens.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

The only problem is that mere presence does not cause this. The value needs to be true. I renamed to ReasonPauseReconcileAnnotationTrue.
Please let me know what you think.

Comment threadpkg/reconciler/reconciler.go Outdated
Comment threadpkg/reconciler/reconciler.go Outdated
Comment threadpkg/reconciler/reconciler_test.go

@porridgeporridge left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

FTR, this is the reason why stackrox/stackrox#2953 tests are failing.

Comment threadpkg/reconciler/reconciler.go Outdated

@SimonBaeumerSimonBaeumer left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Good job!
@porridge my review is finished, just some nits on naming. I think your review already covers the most important parts.

Comment on lines +36 to +37
ReasonUninstallSuccessful = status.ConditionReason("UninstallSuccessful")
ReasonPauseReconcileAnnotationSet = status.ConditionReason("PauseReconcileAnnotationSet")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

nit: WDYTH renaming ReasonPauseReconcileAnnotationSet to ReasonPauseReconcileAnnotationPresent?

The Set in the end sounds to me like an action which happens.

Comment threadpkg/reconciler/reconciler.go Outdated
Comment threadpkg/reconciler/reconciler_test.go Outdated
Comment threadpkg/reconciler/reconciler_test.go Outdated
Expect(err).To(BeNil())
})

By("getting the CR", func() {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
By("getting the CR", func() {
By("getting the CR verify the reconciler is paused", func() {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Sorry, I cannot parse your suggestion.

Expect(err).To(BeNil())
})

By("verifying the release is uninstalled", func() {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
By("verifying the release is uninstalled", func() {
By("verifying reconciliation unpaused and the release is uninstalled", func() {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Well, we don't actually check the status here, so I'd leave this as is...

@porridge
porridge changed the base branch from main to rebase-main-2022-09-01September 7, 2022 09:58
@porridge

Copy link
Copy Markdown
Collaborator

FTR, I changed base branch from main to rebase-main-2022-09-01 in order to keep the diff sane after I force-push the backed-up main to main.
I will rebase this PR on top of the restored main next.

@porridge
porridgeforce-pushed the vbologa/ROX-12219-pause-reconcile-annotation branch from 17b3f45 to 2985fabCompareSeptember 15, 2022 09:41
@porridge
porridge changed the base branch from rebase-main-2022-09-01 to mainSeptember 15, 2022 09:42
Comment on lines +36 to +37
ReasonUninstallSuccessful = status.ConditionReason("UninstallSuccessful")
ReasonPauseReconcileAnnotationSet = status.ConditionReason("PauseReconcileAnnotationSet")

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

The only problem is that mere presence does not cause this. The value needs to be true. I renamed to ReasonPauseReconcileAnnotationTrue.
Please let me know what you think.

Expect(err).To(BeNil())
})

By("getting the CR", func() {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Sorry, I cannot parse your suggestion.

Expect(err).To(BeNil())
})

By("verifying the release is uninstalled", func() {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Well, we don't actually check the status here, so I'd leave this as is...

@porridge
porridge merged commit 89f9785 into mainSep 19, 2022
misberner pushed a commit that referenced this pull request Oct 3, 2022
Co-authored-by: Marcin Owsiany <porridge@redhat.com>
ludydoo pushed a commit that referenced this pull request Jun 27, 2023
Co-authored-by: Marcin Owsiany <porridge@redhat.com>
ludydoo pushed a commit that referenced this pull request Jun 27, 2023
Co-authored-by: Marcin Owsiany <porridge@redhat.com>
ludydoo pushed a commit that referenced this pull request Jun 27, 2023
Co-authored-by: Marcin Owsiany <porridge@redhat.com>
ludydoo pushed a commit that referenced this pull request Jun 29, 2023
Co-authored-by: Marcin Owsiany <porridge@redhat.com>
ludydoo pushed a commit that referenced this pull request Aug 4, 2023
Co-authored-by: Marcin Owsiany <porridge@redhat.com>
porridge added a commit that referenced this pull request Sep 5, 2024
Co-authored-by: Marcin Owsiany <porridge@redhat.com>
porridge added a commit that referenced this pull request Feb 6, 2025
Co-authored-by: Marcin Owsiany <porridge@redhat.com>
porridge added a commit that referenced this pull request Feb 11, 2025
Co-authored-by: Marcin Owsiany <porridge@redhat.com>
porridge added a commit that referenced this pull request Feb 11, 2025
Co-authored-by: Marcin Owsiany <porridge@redhat.com>
porridge added a commit that referenced this pull request Feb 11, 2025
Co-authored-by: Marcin Owsiany <porridge@redhat.com>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@vladbologa@porridge@SimonBaeumer