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-62345] Introduce FingerprintStorage API in core #4731

Merged
merged 100 commits into from
Jun 22, 2020

Conversation

stellargo
Copy link
Contributor

@stellargo stellargo commented May 18, 2020

See JENKINS-62345.
See JEP-226

Proposed changelog entries

Proposed upgrade guidelines

N/A

Submitter checklist

  • (If applicable) 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 must exist, be a Bug or Improvement, and be labeled as lts-candidate to be considered (see query).

@stellargo
Copy link
Contributor Author

stellargo commented May 18, 2020

This draft PR is what I will be working on for changes on the core side. I have made some basic adjustments as a start for moving the saving functionality to FileFingerprintStorage.
CC @oleg-nenashev @afalko @mikecirioli

@stellargo stellargo changed the title FingerprintStorage API for External Fingerprint Storage Introduce FingerprintStorage API in core May 18, 2020
@daniel-beck daniel-beck changed the title Introduce FingerprintStorage API in core [JENKINS-62345] Introduce FingerprintStorage API in core May 19, 2020
@stellargo stellargo marked this pull request as ready for review May 19, 2020 21:05
@stellargo stellargo marked this pull request as draft May 19, 2020 21:08
@stellargo stellargo marked this pull request as ready for review May 20, 2020 14:10
@stellargo stellargo marked this pull request as draft May 20, 2020 16:01
@stellargo stellargo force-pushed the external-fingerprint-storage branch from c778655 to 6b873a4 Compare May 20, 2020 17:04
@stellargo
Copy link
Contributor Author

Apologies for the force push, I really messed up the git history, so had to do it :(

@stellargo stellargo marked this pull request as ready for review May 20, 2020 17:41
@stellargo stellargo marked this pull request as draft May 20, 2020 19:45
@StefanSpieker
Copy link
Contributor

Shouldn't new files be better placed in the Jenkins namespace instead of hudson? I did not check if this has implications.

@stellargo stellargo force-pushed the external-fingerprint-storage branch from 1e3c1f4 to a98412f Compare May 22, 2020 12:13
@stellargo
Copy link
Contributor Author

@oleg-nenashev Thanks! Incorporated the changes :)

@stellargo stellargo requested a review from afalko June 13, 2020 13:16
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.

From what I see, it is ready to go. Thanks a lot for the hard work @stellargo !

Before we merge it, we need to prepare changelog entries for the pull request. See the Pull request template for examples. I would suggest two entries:

  • Developer API change for the new Fingerprint API and deprecating old File ones (CRUD, retrieving persisted facets)
  • New Experimental External Fingerprint Storage API (with a link to JEP and a reference implementation)

core/src/main/java/hudson/model/Fingerprint.java Outdated Show resolved Hide resolved
core/src/main/java/hudson/model/Fingerprint.java Outdated Show resolved Hide resolved
core/src/main/java/hudson/model/Fingerprint.java Outdated Show resolved Hide resolved
core/src/main/java/hudson/model/Fingerprint.java Outdated Show resolved Hide resolved
@oleg-nenashev oleg-nenashev requested review from a team and jglick June 16, 2020 08:46
@stellargo
Copy link
Contributor Author

Credentials plugin ran successfully without any failing tests on this PR's incremental build https://ci.jenkins.io/blue/organizations/jenkins/Plugins%2Fcredentials-plugin/detail/PR-153/1/pipeline

@stellargo
Copy link
Contributor Author

@oleg-nenashev Thank you for reviewing, I have added the suggested changelog entries. Kindly let me know if any more changes are required :)

@oleg-nenashev oleg-nenashev added developer Changes which impact plugin developers squash-merge-me Unclean or useless commit history, should be merged only with squash-merge labels Jun 16, 2020
@oleg-nenashev oleg-nenashev requested a review from timja June 17, 2020 15:10
@oleg-nenashev
Copy link
Member

We may merge it in 24 hours if there is no negative feedback. Please see the merge process documentation for more information about the merge process

@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 Jun 18, 2020
Copy link
Member

@timja timja 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,

I haven't ran it interactively.

no blockers, if you have time there's some minor improvements that could be made to docs and code style.

/**
* Pluggable fingerprint storage API for fingerprints.
*
* @author Sumit Sarin
Copy link
Member

Choose a reason for hiding this comment

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

This entire class needs an @since TODO, same with FileFingerprintStorage.

* The file we save our configuration.
* Loads a {@link Fingerprint} from the Storage with the given unique id.
* @return Loaded {@link Fingerprint}. {@code null} if the config file does not exist or
* malformed.
Copy link
Member

Choose a reason for hiding this comment

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

@since?

@daniel-beck daniel-beck mentioned this pull request Jul 27, 2020
6 tasks
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 squash-merge-me Unclean or useless commit history, should be merged only with squash-merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants