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

Update ImageUpdateAutomation Status with Patch. #132

Merged
merged 1 commit into from
Mar 23, 2021

Conversation

bigkevmcd
Copy link
Contributor

@bigkevmcd bigkevmcd commented Mar 22, 2021

This changes the functionality when updating the status to use Patch
rather than Update, which is more resilient to changes.

Fix: #131

This changes the functionality when updating the status to use Patch
rather than Updating, which is more resilient to changes.

Signed-off-by: Kevin McDermott <[email protected]>
Copy link
Member

@stefanprodan stefanprodan 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 @bigkevmcd

newStatus imagev1.ImageUpdateAutomationStatus) error {

var auto imagev1.ImageUpdateAutomation
if err := r.Get(ctx, req.NamespacedName, &auto); err != nil {
Copy link
Member

Choose a reason for hiding this comment

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

This can set the status of a different version of the object than the one we're reconciling. For that reason, I think this is a fragile fix, even if it doesn't cause other problems.

@stefanprodan stefanprodan merged commit daad724 into fluxcd:main Mar 23, 2021
@squaremo
Copy link
Member

I would like to have at least seen a test before this was merged.

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.

Controller logs resource conflict error messages
3 participants