-
Notifications
You must be signed in to change notification settings - Fork 4
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
Force repo config #122
Force repo config #122
Conversation
- Make sure users of the library do add critical configuration like earliest date - We still have some sensible defaults e.g. for list sizes - Make it a requirement to set a configuration when creating the repository - As the configuration is sealed and non-modifiable now, retrieve a builder from it again to modify and inject into a repository instance - Add more tests for the configuration builder - Move the "defaults()" thing to the test class, as people should not be using it when implementing a repository
… in config builder
Thank you! Will add review shortly. Since the PR is ready, we don't really need a separate issue requesting this change, do we? (And same for the other PR for the "earlier than the earliest datestamp"?) |
Ok 🤫 Don't tell anyone we did not create an issue first. |
DeletedRecord deleteMethod; | ||
Integer maxListIdentifiers = 100; | ||
Integer maxListSets = 100; | ||
Integer maxListRecords = 100; |
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.
Probably a stupid question, but why do we need these default values hard-coded here? - considering that we have microprofile config defaults for these?
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 has been a hardcoded default before and is also recommended within the OAI PMH implementation guidelines, too.
Yes, Dataverse has its own defaults. But anyone looking to reuse this library might have a different opinion, etc.
I do not want to add another dependency on MPConfig to this library, so I think leaving the 100 in place is a reasonable compromise between defaults, backward compatibility and reusability.
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.
In my defense, I did acknowledge early on it was a stupid question. (I was literally confusing what we do in the Dataverse code base and what you do in this library - sorry).
Enable from parameter to be older than earliest date
Kudos, SonarCloud Quality Gate passed! |
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.
All seems prudent. Thank you.
Crossing fingers, merging now! |
@landreev said we better force people to configure everything, so hard to track bugs like IQSS/dataverse#9309 don't happen as easily.