Skip to content

Ignore NotFound when deleting HelmChart - #1574

Open
ChaoHuang2018 wants to merge 1 commit into
fluxcd:mainfrom
ChaoHuang2018:fix/ignore-helmchart-delete-notfound
Open

Ignore NotFound when deleting HelmChart#1574
ChaoHuang2018 wants to merge 1 commit into
fluxcd:mainfrom
ChaoHuang2018:fix/ignore-helmchart-delete-notfound

Conversation

@ChaoHuang2018

Copy link
Copy Markdown

Fixes #1566.

reconcileDelete already treats NotFound from the initial HelmChart Get as completed cleanup. This change applies the same behavior to the following Delete call.

If the HelmChart is removed after Get succeeds but before Delete reaches the API server, the cleanup has still completed and Status.HelmChart can be cleared.

Changes:

  • ignore NotFound from r.client.Delete(ctx, &chart)
  • add a regression test for this race

Signed-off-by: ChaoHuang2018 <40215103+ChaoHuang2018@users.noreply.github.com>
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.

reconcileDelete should ignore HelmChart Delete NotFound after cached Get

1 participant