Skip to content

MODEUS-243: Remove aggregator settings and fields - #239

Merged
elsenhans merged 9 commits into
masterfrom
MODEUS-243-remove-aggregator-settings-and-fields
Oct 12, 2026
Merged

elsenhans merged 9 commits into
masterfrom
MODEUS-243-remove-aggregator-settings-and-fields

Conversation

@elsenhans

@elsenhans elsenhans commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

MODEUS-243

Purpose

MODEUS-243: Remove the aggregator settings and the aggregator fields of the UDP. Migrate existing aggregator UDPs.

Approach

  • Remove the aggregator-settings interface: RAML, schemas, AggregatorSettingsAPI, ExportObject and aggregatorsettings.* permissions
  • Remove harvestVia and aggregator from udprovider.json, the indexes, the searchable/orderable lists and the CQL examples
  • Bump interface usage-data-providers to 4.0 and the module to 6.0.0 (breaking changes)
  • New migration script migration/6.0.0/migrate_remove_aggregator.sql:
    • drops the aggregator triggers, functions, usage_data_providers_custom_aggregatorid_idx and the aggregator_settings table first (all IF EXISTS, the script also runs on fresh installs)
    • sets harvestingStatus to inactive for UDPs with harvestVia = "aggregator"
    • removes harvestVia and aggregator from all UDPs
  • Migration appends an "Umbrellaleaf upgrade" note with the deactivation and the vendor code to the description of UDPs

Upgrade notes

  • Export /aggregator-settings and /aggregator-settings/{id}/exportcredentials before upgrading; the data is dropped
  • UDPs harvested via aggregator are deactivated and have to be re-configured manually
  • MODEUSHARV-187: makes the harvester work without harvestVia. Must be deployed before or together with this module, since the current harvester fails on every UDP without harvestVia
  • MODEUSHARV-186 and UIEUS-564: switch the harvester and ui-erm-usage to usage-data-providers 4.0. Release as one set with this PR, since the module dependency check accepts 4.0 only when every consumer requires it

Tests

  • Removed the aggregator tests and fixtures, adapted UsageDataProvidersIT, SQLTriggersIT, CustomIndexesIT and the samples
  • Added MigrateRemoveAggregatorIT: Recreates the aggregator objects and UDPs of 5.2.0, runs the tenant upgrade to 6.0.0 and checks that aggregator UDPs are deactivated, SUSHI UDPs stay active and all aggregator objects are gone

@elsenhans
elsenhans requested review from a team and alb3rtino October 7, 2026 08:43
@alb3rtino
alb3rtino marked this pull request as draft October 7, 2026 17:53
@alb3rtino

Copy link
Copy Markdown
Contributor

Looking good so far. Moving it to draft so it doesn't get merged accidentally, as this work is waiting to be merged together with MODEUSHARV-186 and UIEUS-564. ☝️

@alb3rtino alb3rtino left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

We need to discuss how to handle the migration. Two things:

  • Deactivated aggregator providers lose their vendorCode.
  • Deactivated aggregator providers can't be distinguished from providers that had been inactive before the migration.

Comment thread mod-erm-usage-server/src/main/java/org/folio/rest/util/Constants.java Outdated
Comment thread mod-erm-usage-server/src/main/java/org/folio/rest/util/Constants.java Outdated
@elsenhans
elsenhans requested a review from alb3rtino October 9, 2026 13:16
@alb3rtino
alb3rtino marked this pull request as ready for review October 9, 2026 16:17
elsenhans added a commit to folio-org/ui-erm-usage that referenced this pull request Oct 12, 2026
…and erm-usage-harvester 3.0 (#655)

## Description
[UIEUS-564](https://folio-org.atlassian.net/browse/UIEUS-564)

Follow-up to https://folio-org.atlassian.net/browse/UIEUS-562 once
`mod-erm-usage` and `mod-erm-usage-harvester` are released without the
aggregator fields: `ui-erm-usage` stops writing
`harvestingConfig.harvestVia` and requires the new interface versions.
Blocked until both backend releases exist.

## Approach
- Remove `withHarvestVia` (util, test, calls in `UDPCreateRoute` and
`UDPEditRoute`) and the constant `HARVEST_VIA_SUSHI`
- The UI no longer writes `harvestingConfig.harvestVia`
- Remove `?aggregator=false` from all `erm-usage-harvester/impl`
requests
- Require `usage-data-providers 4.0` and `erm-usage-harvester 3.0`
- Remove `harvestVia` from the test fixtures
- `UDPEditRoute` save test (no longer expects `harvestVia`)

## Dependencies
- need to be merged together with: 
folio-org/mod-erm-usage#239 and 
folio-org/mod-erm-usage-harvester#232

[UIEUS-564]:
https://folio-org.atlassian.net/browse/UIEUS-564?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ

---------

Co-authored-by: elsenhans <elsenhans@users.noreply.github.com>
@sonarqubecloud

Copy link
Copy Markdown

@elsenhans
elsenhans merged commit 25e26d0 into master Oct 12, 2026
30 checks passed
@elsenhans
elsenhans deleted the MODEUS-243-remove-aggregator-settings-and-fields branch October 12, 2026 07:38
elsenhans added a commit to folio-org/mod-erm-usage-harvester that referenced this pull request Oct 12, 2026
…r 3.0), require usage-data-providers 4.0 (#232)

## Description

Drop `isAggregator` and `?aggregator` (erm-usage-harvester 3.0), require
usage-data-providers 4.0

[MODEUSHARV-186](https://folio-org.atlassian.net/browse/MODEUSHARV-186)

## Approach

- Bump `mod-erm-usage-client` to `6.0.0`, the `mod-erm-usage` release
without `harvestVia`, `aggregator` and `AggregatorSettingsClient`.
- Module descriptor:
  - require `usage-data-providers` 4.0
- provide `erm-usage-harvester` 3.0 (major bump because fields and a
query parameter are removed)
- `GET /erm-usage-harvester/impl`:
  - remove the `aggregator` query parameter
- `ErmUsageHarvesterAPI` always returns all available implementations
(no aggregator parameter anymore)
- `serviceImplementation.json`: remove `isAggregator` and
`configurationParameters`
- Tests:
- remove the `?aggregator=true/false` cases from
`ErmUsageHarvesterAPITest`
- remove the `harvestVia` and aggregator tests from
`ServiceEndpointFactoryTest`
  - remove `harvestVia` from `TestUtil` and `HarvestingIT`
- Test fixtures:
- remove `harvestVia` from `usage-data-provider.json` and
`usage-data-providers.json`
- drop the "without harvestVia" provider, instead of 3 `totalRecords`
they are just 2 now.
- Docs:
- remove `isAggregator` and `configurationParameters` from the README
`/impl` example


## Dependencies

- CI fails until `mod-erm-usage-client` 6.0.0 is published
- need to be merged together with
[MODEUSHARV-243](folio-org/mod-erm-usage#239)
and UIEUS-564

[MODEUSHARV-186]:
https://folio-org.atlassian.net/browse/MODEUSHARV-186?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ

---------

Co-authored-by: elsenhans <elsenhans@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants