IQSS/9471- support delayed setting of :DoiProvider #9472
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What this PR does / why we need it:
This PR creates a fix that is expected to change further with the work to support multiple providers at once is done. The fix for DOI providers to allow new installs (with no settings to start) to avoid deciding which bean is configured until the :DoiProvider setting exists works by moving the code that previously ran (in #8674) in @PostConstruct methods to determine if a give Provider was the active one to an isConfigured() method that will return true for the one bean configured once the :DoiProvider setting exists.
Which issue(s) this PR closes:
Closes #9471
Special notes for your reviewer:
Lots of discussion at https://iqss.slack.com/archives/C010LA04BCG/p1679663888250749. Nominally the ~root cause here was the use of a Setting rather than jvm-option to decide which bean is active combined with a new check to determine if a provider is allowed to mint new DOIs. The latter isn't technically needed yet as only one PidProvider can run at present but the code was added in anticipation of upcoming work to allow multiple providers. As more discussion is needed (probably a tech hour) for that (including how everything moves to microprofile config options, whether PidProviders can mint new PIDs or just maintain existing ones, etc.) the fix here is a relatively simple one to restore the previous capability to allow the :DoiProvider setting to be set after Payara is up and running.
Suggestions on how to test this:
Either start a new instance from scratch (clean database) and confirm that dataset creation/publication works, and/or delete the :DoiProvider setting, restart Payara, and verify that after setting the :DoiProvider again, that dataset creation/publication works.
The fix is generic to all DOI PIDProviders and affects whether the configured one is active or not, so exhaustive testing beyond smoke tests that PermaLinks and Handles, and DataCite, EZID, and FAKE all work, and that File PIDs work for all providers also, may not be useful.
Does this PR introduce a user interface change? If mockups are available, please link/include them here:
Is there a release notes update needed for this change?:
Doesn't really change anything not covered in #8674 already.
Additional documentation: