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

Tweak ExternalDisconnecter implementation #306

Merged
merged 1 commit into from
Dec 2, 2021
Merged

Conversation

negz
Copy link
Member

@negz negz commented Dec 2, 2021

Description of your changes

The primary functional change here is to avoid setting a status condition when a deferred disconnect fails. We don't want to overwrite the original status condition that may have been written if we're returning from Reconcile because we hit an error. Emitting an event and a debug log should be sufficient.

This commit also tweaks a bit of grammar and updates the NopConnectDisconnecter implementation to more closely match its docstring description.

I have:

  • Read and followed Crossplane's contribution process.
  • Run make reviewable test to ensure this PR is ready for review.

How has this code been tested

I don't believe there are any consumers of this code yet, so I'm relying on unit tests.

The primary functional change here is to avoid setting a status condition when a
deferred disconnect fails. We don't want to overwrite the original status
condition that may have been written if we're returning from Reconcile because
we hit an error. Emitting an event and a debug log should be sufficient.

This commit also tweaks a bit of grammar and updates the NopConnectDisconnecter
implementation to more closely match its docstring description.

Signed-off-by: Nic Cope <negz@rk0n.org>
@negz negz requested review from muvaf and hasheddan December 2, 2021 22:47
Copy link
Member

@hasheddan hasheddan left a comment

Choose a reason for hiding this comment

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

LGTM -- thanks @negz!

pkg/reconciler/managed/reconciler.go Show resolved Hide resolved
@negz negz merged commit d43d510 into crossplane:master Dec 2, 2021
@negz negz deleted the dc branch December 2, 2021 23:09
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.

2 participants