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

7000 mpconfig fqdn & siteUrl #8826

Merged
merged 6 commits into from
Dec 20, 2022
Merged

Conversation

poikilotherm
Copy link
Contributor

@poikilotherm poikilotherm commented Jun 30, 2022

What this PR does / why we need it:
This pull request is simply swapping the former retrieval of the setting for FQDN and/or Site URL to MPCONFIG.
The code has been de-duplicated in some places that had the fqdn/siteUrl logic repeated. Those dups have been replaced with SystemConfig calls.

This PR does not address the changes requested in #6636 by request of @pdurbin for a smaller scope and less brain overload.
As this PR reuses existing config settings and does no renaming, this is 100% backward compatible.
Nonetheless, I really tried to make the description of the two settings in the config guide more comprehensible.

Relates to #6636
Relates to #7000

Which issue(s) this PR closes:
None.

Special notes for your reviewer:
It is again a good and simple start to see how the pieces laid out in #8823 are coming together.

Suggestions on how to test this:
Play around with the settings described in the added docs and watch it work. You could try an env var for a change (although in a classic installation, these might be hard to change for the Payara appserver...)

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?:
Maybe? Dunno. The actual behaviour did not change as requested, this is not a solution to #6636.

Additional documentation:
Included.

@poikilotherm poikilotherm added Component: Code Infrastructure formerly "Feature: Code Infrastructure" Feature: Installation Guide User Role: Sysadmin Installs, upgrades, and configures the system, connects via ssh labels Jun 30, 2022
…CONFIG IQSS#7000

- Add both settings to JvmSettings to enable lookup
- Refactor SystemConfig.getDataverseSiteUrlStatic to use MPCONFIG,
  but keep current behaviour of constructing the URL from FQDN or
  DNS reverse lookup. (Out of scope here, see IQSS#6636)
- Replace clones of the method in Xrecord, DdiExportUtil,
  HandlenetServiceBean with direct usages of the static method
  to avoid unnecessary duplicated code.
- Refactor SchemaDotOrgExporterTest with @JvmSetting for site url.
- Remove unused constants from SystemConfig
- Added default for container usage within "ct" profile, so we avoid
  extra lookups/settings for development usage.

See also IQSS#6636
- Notes about MPCONFIG usage.
- Rewording to make it more clear how this shall be used.
For unknown reasons, the test assumed the site url / fqdn
to be "https://librascholar.org", which might be coming
from some test order side effect.

Now the test sets the site URL setting to have control over
the generated data.

On a related note, this meant to upgrade the test from JUnit4
to JUnit5 plus some minor code cleanups.
@coveralls
Copy link

coveralls commented Sep 19, 2022

Coverage Status

Coverage decreased (-0.004%) to 19.993% when pulling 82a33e4 on poikilotherm:7000-mpconfig-fqdn into be48cfd on IQSS:develop.

@mreekie mreekie added the bk2211 label Nov 1, 2022
@pdurbin pdurbin added the Size: 3 A percentage of a sprint. 2.1 hours. label Dec 2, 2022
@mreekie
Copy link

mreekie commented Dec 14, 2022

added to sprint Dec 15, 2022

@pdurbin
Copy link
Member

pdurbin commented Dec 16, 2022

@poikilotherm can you please resolve the merge conflicts? Thanks!

@poikilotherm
Copy link
Contributor Author

@poikilotherm can you please resolve the merge conflicts? Thanks!

I did! 😸

@pdurbin
Copy link
Member

pdurbin commented Dec 19, 2022

I'm running "build now" in Jenkins, hoping that this error goes away:

java.lang.AssertionError: expected:<201> but was:<500>
at edu.harvard.iq.dataverse.api.HarvestingClientsIT.testHarvestingClientRun(HarvestingClientsIT.java:184)

Copy link
Member

@pdurbin pdurbin left a comment

Choose a reason for hiding this comment

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

I didn't test this but the code changes make sense, the docs look good, and all API tests are passing (I did have to re-run them due to the new harvest client tests). Sending to QA. Thanks, @poikilotherm.

IQSS/dataverse (TO BE RETIRED / DELETED in favor of project 34) automation moved this from Ready for Review to QA ✅ Dec 19, 2022
@kcondon kcondon self-assigned this Dec 20, 2022
@kcondon kcondon merged commit e6c033b into IQSS:develop Dec 20, 2022
IQSS/dataverse (TO BE RETIRED / DELETED in favor of project 34) automation moved this from QA ✅ to Done 🚀 Dec 20, 2022
@poikilotherm
Copy link
Contributor Author

Woo-hoo! Thanks y'all, as always!

@pdurbin pdurbin added this to the 5.13 milestone Dec 21, 2022
@poikilotherm poikilotherm deleted the 7000-mpconfig-fqdn branch May 21, 2023 19:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Code Infrastructure formerly "Feature: Code Infrastructure" Feature: Installation Guide Size: 3 A percentage of a sprint. 2.1 hours. User Role: Sysadmin Installs, upgrades, and configures the system, connects via ssh
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

None yet

5 participants