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

7457 introduce mpconfig #7463

Merged
merged 22 commits into from
Dec 10, 2020
Merged

Conversation

poikilotherm
Copy link
Contributor

@poikilotherm poikilotherm commented Dec 8, 2020

What this PR does / why we need it:
This PR paves the ground to finally enable using MicroProfile Config API within the application.
By providing two special config sources, we can rename settings but still stay backward compatible.
We can also start to migrate database settings to MPCONFIG where we see fit and still be backward compatible.
It will log using a deprecated setting, so we can stay with a setting for a while before removing it.

Which issue(s) this PR closes:

Closes #7457

Special notes for your reviewer:
None.

Suggestions on how to test this:
Actually this is not introducing a change, as we don't have aliases yet nor are we migrating a database setting here. This will be done for #7424 (PR forthcoming).

For now, you can take a look at the added unit tests and running a testcontainers test via mvn -P tc verify.

Does this PR introduce a user interface change? If mockups are available, please link/include them here:
Nope.

Is there a release notes update needed for this change?:
🔋 included.

Additional documentation:
None so far.

@poikilotherm poikilotherm added Type: Feature a feature request Feature: Developer Guide User Role: Sysadmin Installs, upgrades, and configures the system, connects via ssh labels Dec 8, 2020
@poikilotherm poikilotherm self-assigned this Dec 8, 2020
@poikilotherm poikilotherm marked this pull request as ready for review December 8, 2020 00:56
@pdurbin pdurbin self-assigned this Dec 8, 2020
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 saw this was in review so I took a quick look. I didn't run the suggested verify command. It sounds like more docs are coming, which is good.

I think I'm still a little confused about the "why". There's nice work here but what does it mean for people who run or develop Dataverse? What problems does it solve? I'm sure in time, all will be revealed. 😄

doc/sphinx-guides/source/developers/configuration.rst Outdated Show resolved Hide resolved
pom.xml Show resolved Hide resolved
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.

Can we get this to pass on Jenkins?

I'm seeing this error:

[ERROR] Errors:
[ERROR] AliasConfigSourceTest.getValue:25 » IllegalState javax.naming.NoInitialContext...
[ERROR] AliasConfigSourceTest.readImportTestAliasesFromFile:39 » IllegalState javax.na...

over at https://jenkins.dataverse.org/job/IQSS-Dataverse-Develop-PR/job/PR-7463/4/console

(mvn -P tc verify worked fine on my laptop.)

Also, while I'm in favor of small chunks generally, I'm eager to see how a fix for #7424 makes use of this groundwork, to make it more real. If it's possible to get a preview of that future pull request, it would be nice.

… JNDI could not be found or injected. Will result empty properties for this source. IQSS#7457
@coveralls
Copy link

coveralls commented Dec 8, 2020

Coverage Status

Coverage increased (+0.06%) to 19.46% when pulling f135050 on poikilotherm:7457-introduce-mpconfig into 0511c8a on IQSS:develop.

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.

This pull request doesn't seem to do any harm and the API test suite passes so I'm moving it to QA.

That said, other developers are quite welcome to take a look.

My overall take on this is that @poikilotherm is trying to move us toward modern technologies like the MicroProfile Config API which will ultimately make sysadmins happier with their options for configuring the application.

I did note the following from @poikilotherm in IRC but again, since the API test suite passed, deployment must have succeeded so I think we're all set.

Doh! I found the troubles with 7457 not deploying. It's just the same thing that broke tests, too. OK will need to transform the source into a bean and inject the datasource...

@poikilotherm
Copy link
Contributor Author

Sorry @pdurbin dragging this back to dev. I need to work around the dependency injection obstacles first. Will push soon.

@poikilotherm poikilotherm self-assigned this Dec 8, 2020
@poikilotherm
Copy link
Contributor Author

poikilotherm commented Dec 8, 2020

@pdurbin this is ready. I refactored it to use dependency injection plus adding monitoring, so we can catch potential race conditions. The docs have been extended once more, explaining a lot about the "why", release note added. Would be perfect to get this into 5.3 (#7439 / #7446 )

@poikilotherm
Copy link
Contributor Author

poikilotherm commented Dec 9, 2020

@donsizemore @pdurbin Jenkins fails with non-reachable SSH. I'm sure this isn't related to my changes. What now?

https://jenkins.dataverse.org/blue/organizations/jenkins/IQSS-Dataverse-Develop-PR/detail/PR-7463/11/pipeline/20

@pdurbin
Copy link
Member

pdurbin commented Dec 9, 2020

@poikilotherm I just clicked "build now" on Jenkins.

Meanwhile, I'll check out the further tweaks to the docs. Do you have any idea why they won't build? (And can you fix it?) Check this out:

Warning, treated as error:
/Users/pdurbin/github/iqss/dataverse/doc/sphinx-guides/source/developers/configuration.rst:96: WARNING: Definition list ends without a blank line; unexpected unindent.

@poikilotherm
Copy link
Contributor Author

Meanwhile, I'll check out the further tweaks to the docs. Do you have any idea why they won't build?

Sorry @pdurbin this slipped through. Was a bit early this morning. Whitespace removed, Sphinx happy.

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'm going to move this to QA but again, I'd be happy for another developer to take a look.

Question for @poikilotherm ... will all this fancy config stuff helps us solve #6953? 😄 I hope so!

@kcondon kcondon self-assigned this Dec 9, 2020
@kcondon kcondon merged commit c715a84 into IQSS:develop Dec 10, 2020
@poikilotherm poikilotherm deleted the 7457-introduce-mpconfig branch December 10, 2020 16:50
@djbrooke djbrooke added this to the 5.3 milestone Dec 11, 2020
pdurbin added a commit to GlobalDataverseCommunityConsortium/dataverse that referenced this pull request Mar 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature: Developer Guide Type: Feature a feature request User Role: Sysadmin Installs, upgrades, and configures the system, connects via ssh
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Introduce using MicroProfile Config API
5 participants