Skip to content

Conversation

@poikilotherm
Copy link
Contributor

What this PR does / why we need it:

Automate the tedious task of updating the Solr Core when metadata blocks are changing in the DV application.

Which issue(s) this PR closes:

Special notes for your reviewer:
None

Suggestions on how to test this:
The easiest way is to uncomment the sidecar in the compose file, start an instance and load some metadata block via API.
You can verify the updated schema via the Solr Web UI.

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?:
Let me know if you'd like one

Additional documentation:
None

Added `solr-driver.sh` to enable automated Solr schema updates based on Dataverse metadata changes. Updated Dockerfile to include all Solr-related scripts for flexible deployment.
…d Solr schema updates

Updated admin guide and container guide to reference the newly added `solr-driver.sh` script for automating Solr schema modifications. Adjusted script parameters for clarity and added usage details.
@poikilotherm poikilotherm requested a review from pdurbin as a code owner November 7, 2025 13:46
@pdurbin pdurbin moved this to Ready for Triage in IQSS Dataverse Project Nov 7, 2025
@scolapasta scolapasta added the Size: 3 A percentage of a sprint. 2.1 hours. label Nov 12, 2025
@scolapasta scolapasta moved this from Ready for Triage to Ready for Review ⏩ in IQSS Dataverse Project Nov 12, 2025
@cmbz cmbz added FY26 Sprint 10 FY26 Sprint 10 (2025-11-05 - 2025-11-19) FY26 Sprint 11 FY26 Sprint 11 (2025-11-20 - 2025-12-03) labels Nov 20, 2025
@cmbz cmbz added the FY26 Sprint 12 FY26 Sprint 12 (2025-12-03 - 2025-12-17) label Dec 3, 2025
…proach IQSS#11959

Replaced query parameter-based authentication with a standardized header-based mechanism. Centralized logic for configuring Bearer Token and Unblock Key authentication, including support for file-based inputs with error handling.
…11959

Enhanced error and info log messages in schema fallback handling to include specific file paths for better clarity during troubleshooting.
@poikilotherm poikilotherm force-pushed the 11959-automate-solr-schema-updates branch from 9d0e104 to 58900c9 Compare December 17, 2025 14:16
…#11959

Simplified metadata synchronization flow by decoupling update checks from fetching logic. Introduced flags for better handling of pending updates and reduced redundant operations. Enhanced logging for clarity. This should better avoid potential race conditions.

Also, before the initial sync did not trigger an update, so the schema would have never been updated, even if the two schemas actually are different!
Now, we execute the schema processing, which will take care to not replace the schema if there's really no difference between them.
@cmbz cmbz added the FY26 Sprint 13 FY26 Sprint 13 (2025-12-17 - 2025-12-31) label Dec 17, 2025
- Reordered some startup checks for readability
- Added checks that source schema exists and is readable to permissions checks (if source and target are different)
- Cleaned up field application method:
    - Skip unnecessary additional tempfile
    - Remove nonsense cp from target to temp
- Fix handling of source and target: make source and target equal if no source path has been explicitly given. Otherwise, our logic in copying the source during application of the fields makes no sense, as it would not copy the target!
…QSS#11959

- Moved cleanup function to improve organization and ensure proper signal handling setup.
- Refactored schema backup process by introducing a dedicated filename generation method. (No longer rely on capturing the filename from an echo in the method, which makes logging in it much harder)
- Enhanced robustness by fixing issues with Solr authentication header encoding and improving metadata change logging.
- Addressed minor code consistency improvements and reduced redundancy.
@poikilotherm poikilotherm moved this from Ready for Review ⏩ to In Progress 💻 in IQSS Dataverse Project Dec 18, 2025
IQSS#11959

- Introduced `-v/--verbose` flag for enhanced logging control.
- Added `log_verbose` function for conditional info logging in verbose mode.
- Improved clarity of metadata fetch and update logs.
- Updated help text and environment variable documentation to reflect new verbose mode.
…mand handling in apply-db-settings.sh

Make sure not to pass an empty header argument (-H) to curl if no auth header is necessary.
…-settings.sh

Fixes variable assignment to ensure correct handling of API key file content. Was using a wrong variable name before.
@cmbz cmbz added the FY26 Sprint 14 FY26 Sprint 14 (2025-12-31 - 2026-01-14) label Dec 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

FY26 Sprint 10 FY26 Sprint 10 (2025-11-05 - 2025-11-19) FY26 Sprint 11 FY26 Sprint 11 (2025-11-20 - 2025-12-03) FY26 Sprint 12 FY26 Sprint 12 (2025-12-03 - 2025-12-17) FY26 Sprint 13 FY26 Sprint 13 (2025-12-17 - 2025-12-31) FY26 Sprint 14 FY26 Sprint 14 (2025-12-31 - 2026-01-14) Size: 3 A percentage of a sprint. 2.1 hours.

Projects

Status: In Progress 💻

Development

Successfully merging this pull request may close these issues.

Feature Request: Automate Schema Updates from Dataverse to Solr

3 participants