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

Omit potential NotFound when cleaning up the Affinity Assistant #3212

Merged

Conversation

jlpettersson
Copy link
Member

Changes

The PipelineRun reconciler cleanup the affinity assistant
when the PipelineRun is completed. If the cleanup-function
is called more than once, the DELETE request will return
a NotFound response. It does not make sense to return NotFound
responses as an error, since this is what we want to achieve.

Closes #3205
/kind bug

Submitter Checklist

These are the criteria that every PR should meet, please check them off as you
review them:

  • Includes tests (if functionality changed/added)
  • Includes docs (if user facing)
  • Commit messages follow commit message best practices
  • Release notes block has been filled in or deleted (only if no user facing changes)

See the contribution guide for more details.

Double check this list of stuff that's easy to miss:

Reviewer Notes

If API changes are included, additive changes must be approved by at least two OWNERS and backwards incompatible changes must be approved by more than 50% of the OWNERS, and they must first be added in a backwards compatible way.

Release Notes

Omit potential NotFound events when cleaning up the Affinity Assistant

The PipelineRun reconciler cleanup the affinity assistant
when the PipelineRun is completed. If the cleanup-function
is called more than once, the DELETE request will return
a NotFound response. It does not make sense to return NotFound
responses as an error, since this is what we want to achieve.
@tekton-robot tekton-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. kind/bug Categorizes issue or PR as related to a bug. labels Sep 11, 2020
@tekton-robot tekton-robot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Sep 11, 2020
@bobcatfish
Copy link
Collaborator

Thanks for fixing this @jlpettersson !

It seems like cleanupAffinityAssistants is called regardless of whether or not the affinity assistant is enabled, is it possible to avoid calling it when the assistant is disabled?

Side note if at all possible let's move toward not having functions on the reconciler and having a separate affinity assistant package we can unit test (if we make more updates here)

/approve
/lgtm

@tekton-robot tekton-robot added lgtm Indicates that a PR is ready to be merged. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Sep 11, 2020
@tekton-robot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: bobcatfish, sbwsg

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@tekton-robot tekton-robot merged commit 204a403 into tektoncd:master Sep 11, 2020
@abudavis
Copy link

Any ideas when the fix for this would be presented on the Pipeline Operator on Openshift 4.5?

@bharathvenkatrajan
Copy link

bharathvenkatrajan commented Sep 14, 2020

@abudavis I am having the same issue on the openshift pipeline operator 1.1.1 on Openshift 4.5. Is there a workaround for this?

@bobcatfish bobcatfish added the needs-cherry-pick Indicates a PR needs to be cherry-pick to a release branch label Sep 14, 2020
@bobcatfish bobcatfish removed the needs-cherry-pick Indicates a PR needs to be cherry-pick to a release branch label Sep 14, 2020
@vdemeester
Copy link
Member

@abudavis @bharathvenkatrajan this will be available in OpenShift Pipelines 1.2 (released in a few weeks).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. kind/bug Categorizes issue or PR as related to a bug. lgtm Indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Failed to delete StatefulSet "affinity-assistant-9edfd8d72f" not found
6 participants