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

[JENKINS-28379] Allow FingerprintFacet to block the deletion of Fingerprint #4478

Merged

Conversation

stellargo
Copy link
Contributor

@stellargo stellargo commented Feb 6, 2020

See JENKINS-28379.

Proposed changelog entries

Proposed upgrade guidelines

N/A

Submitter checklist

  • JIRA issue is well described
  • Changelog entries and upgrade guidelines are appropriate for the audience affected by the change (users or developer, depending on the change). Examples
    • Fill-in the Proposed changelog entries section only if there are breaking changes or other changes which may require extra steps from users during the upgrade
  • Appropriate autotests or explanation to why this change has no tests
  • For dependency updates: links to external changelogs and, if possible, full diffs

Desired reviewers

@mention

Maintainer checklist

Before the changes are marked as ready-for-merge:

  • There are at least 2 approvals for the pull request and no outstanding requests for change
  • Conversations in the pull request are over OR it is explicit that a reviewer does not block the change
  • Changelog entries in the PR title and/or Proposed changelog entries are correct
  • Proper changelog labels are set so that the changelog can be generated automatically
  • If the change needs additional upgrade steps from users, upgrade-guide-needed label is set and there is a Proposed upgrade guidelines section in the PR title. (example)
  • If it would make sense to backport the change to LTS, a JIRA issue should exist and be labeled as lts-candidate

@rsandell
Copy link
Member

What is the current use case for this? Can you provide a downstream PR with an example for where you need it?

@MRamonLeon
Copy link
Contributor

@oleg-nenashev do you think this feature is still needed? thanks

@stellargo
Copy link
Contributor Author

stellargo commented Feb 13, 2020

@MRamonLeon I am quoting below Oleg's response on Gitter.

The codebase around fingerprints in Jenkins was quite stable over past 4 years, so old tickets should be still relevant. Let me know if you need any additional pointers.

I would just add a new API method for keeping fingerprint forever, e.g. FingerprintFacet#isKeepFingerprintForever() which defaults to false. Then any Facet implementation can check the flag. At the same time the Jenkins core will be able to consult with facets before deleting a fingerprnt

Copy link
Member

@oleg-nenashev oleg-nenashev left a comment

Choose a reason for hiding this comment

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

I am not sure you want to introduce a new field for fingerprintDeletionBlocked at all. There is no API consumers at the moment. Maybe it is better to just implement an overridable isFingerprintDeletionBlocked() which returns false by default.

P.S: Sorry for the late reviews, catching up

@stellargo stellargo force-pushed the fingerprintFacetBlockDeletion branch from 0a07375 to 25c3eb4 Compare February 17, 2020 05:49
Copy link
Member

@oleg-nenashev oleg-nenashev left a comment

Choose a reason for hiding this comment

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

Looks good to me, thanks @stellargo !

@oleg-nenashev oleg-nenashev added the developer Changes which impact plugin developers label Feb 17, 2020
@stellargo stellargo force-pushed the fingerprintFacetBlockDeletion branch 2 times, most recently from 987bc66 to 8815fbc Compare February 19, 2020 14:53
@stellargo stellargo force-pushed the fingerprintFacetBlockDeletion branch from 8815fbc to 50cc8ce Compare February 19, 2020 14:56
@alecharp
Copy link
Member

@stellargo please, don't force-push on PR when it war already review by some people: it's hard to track the changes.

Copy link
Member

@alecharp alecharp left a comment

Choose a reason for hiding this comment

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

I have no problem with the PR but asking few syntax improvements. Also would like to open the discussion about the return null and the need for the annotation on the public API.

@stellargo
Copy link
Contributor Author

@alecharp Thanks for the review! I’ve made the requested changes. Let me know if anything more is required.

Copy link
Member

@oleg-nenashev oleg-nenashev left a comment

Choose a reason for hiding this comment

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

Thanks for addressing the comments. I believe we can merge it, just a single comment about the naming

@stellargo
Copy link
Contributor Author

Thanks @oleg-nenashev , I have made the requested changes.

@stellargo stellargo force-pushed the fingerprintFacetBlockDeletion branch from a00e466 to 7ace7a7 Compare February 25, 2020 12:32
Copy link
Member

@oleg-nenashev oleg-nenashev left a comment

Choose a reason for hiding this comment

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

I plan to merge it tomorrow if no negative feedback

@oleg-nenashev oleg-nenashev added the ready-for-merge The PR is ready to go, and it will be merged soon if there is no negative feedback label Feb 28, 2020
@oleg-nenashev
Copy link
Member

ATH is stuck due to infra issues. I will ignore it and merge the PR. It was passing before

@oleg-nenashev oleg-nenashev merged commit 631f8ba into jenkinsci:master Mar 1, 2020
@oleg-nenashev
Copy link
Member

Thanks for your contribution @stellargo !

@stellargo
Copy link
Contributor Author

Thanks @oleg-nenashev and everyone who guided me through it. I learnt a lot :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
developer Changes which impact plugin developers ready-for-merge The PR is ready to go, and it will be merged soon if there is no negative feedback
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants