-
Notifications
You must be signed in to change notification settings - Fork 500
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
7000 mpconfig pid doi hdl #8828
Conversation
2a58db7
to
1f04c0e
Compare
Good catch by @landreev - the HandleNet properties are missing their aliases! |
…CONFIG IQSS#7000 - Add scopes and settings to JvmSettings for strictness and fast retrieval with MPCONFIG - Rename settings to live under scope "dataverse.pid.ezid|datacite", so they are more aligned to our other settings. This could change again in the future, depending on what other devs feel where they should be located. - Add aliases to make settings backward compatible - in the current state of Dataverse code, only one PID provider can be used at the same time and the double alias is with the deprecated, non-public EZID provider. - Replace SystemConfig.getDataciteRestApiUrlString() with aliases and a default in microprofile-config.properties - Inline with the current setup and docs, make the DataCite MDS API URl default to the Test Fabrica, mds.test.datacite.org
Test execution in PersistentIdentifierServiceBeanTest requires to construct an EZID provider. The providers constructor tries to login with the service, which is not relevant for the test. Providing EZID configuration settings via a src/test/resource/META-INF/microprofile-config.properties file makes the warnings go away about missing config options and also avoids sending requests to the real service for every test execution.
- Refactoring the DOI related JVM settings and cross links - Updated some facts and external links in their descriptions
Add necessary changes to lookup Handle.Net PID provider details via MicroProfile instead of system properties. The options where scoped within JvmSettings and renamed for better readability.
- Documented the renaming and option to retrieve the data via MPCONFIG - Added cross links to other sections - Added references to tech docs of Handle.Net - Add more context information to the three settings
1f04c0e
to
0db9648
Compare
a14ab28
to
f3969cf
Compare
This adds the missing MPCONFIG option to configure the base URL for the permalink provider, which has been added after the initial work for providers happened.
This relates to IQSS#9486, but with the switch of the properties to come from MPCONFIG, this is much easier to do. We do create the provider object in any case, because otherwise the stateless EJB mechanism will be very unhappy. We do not login if there is no password and username given, so avoid the exceptions. We only log a warning if only one of both is given (which is clearly an error).
I'm putting this back on the table. @mreekie automation dropped this into "Ready for review", could you move it to the sprint column? Thx! (I am not allowed to do this for some unclear reason...?) About sizing: this does not need a resizing, it's still a 10. The overall important added stuff was that Permalink provider is now configurable via MPCONFIG as well as the others. |
@poikilotherm This is fine. Let's leave it be. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@poikilotherm great work on refactoring and cleaning up the code. Off to QA!
@kcondon the code looks good but please advised that I only did the lightest of testing, just check the defaults for the FAKE and perma providers. Both worked just fine as shown in the screenshot below. I did not touch DataCite, Handle, or EZID.
// FIXME: Even before changing to MPCONFIG retrieval, this was pinned to be DataCite specific! | ||
// Should this be extended to EZID and other PID systems like Handle? | ||
String baseUrl = JvmSettings.DATACITE_REST_API_URL.lookup(); | ||
String username = JvmSettings.DATACITE_USERNAME.lookup(); | ||
String password = JvmSettings.DATACITE_PASSWORD.lookup(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is fair. I added the PIDs API but hard coded it to DataCite. I would like to see it evolve to be useful across multiple PID providers.
Issues found:
|
This avoids a "NoSuchElementException" caused by a failing lookup. As we do a check for the necessity of a decryption anyway, this is the logical place to require the presence of the key.
What this PR does / why we need it:
This is a larger cleanup of many PID provider settings.
Relates to #7000
Which issue(s) this PR closes:
None.
Special notes for your reviewer:
This should be done but might need discussion if we want changes to the installer. (Password aliases etc)
Maybe extend like done for Solr (7000 mpconfig solr #8825) to enable protocol, provider, authority choose etc via MPCONFIG in backward compatible manner? (Much easier config for containers and those settings are VERY static - these shall never change for an installation or you'll be in trouble. Database Settings were introduced for dynamically changing settings? 🤔 )Too large for this PR.Suggestions on how to test this:
Play around with the settings described in the docs section and watch it work. It's not much of a change despite the renaming.
Does this PR introduce a user interface change? If mockups are available, please link/include them here:
Not really.
Is there a release notes update needed for this change?:
Not included. Let me know if we should write one now or latter (more mpconfig stuff coming). Technically, as the settings have aliases, nothing should change. There is no breaking change, just deprecated names.
Additional documentation:
Included.