Informatievlaanderen / VSDS-LDESServer4J

Linked Data Event Streams Server for Java
https://informatievlaanderen.github.io/VSDS-LDESServer4J
European Union Public License 1.2
10 stars 8 forks source link

Upgrade LDES Collection creates un-linked/unreachable fragments #567

Closed xdxxxdx closed 1 year ago

xdxxxdx commented 1 year ago

Prerequisite: Tags for sprint 25

Scenario:

  1. follow the step-by-step solution as described at: https://github.com/Informatievlaanderen/VSDS-LDES-E2E-testing/tree/main/demos/021.server-upgrade-with-nifi
  2. After Test-Set Up, a time-based fragment is created on the old LDES Server: http://localhost:8080/devices-by-time?generatedAtTime=2023-05-03T12:57:23.799Z Capture
  3. Continue the test steps -> remove the old server -> start new server -> restart HTTP Sender.

Current result: When starting the new LDES server, a new fragment is created at the same time. : http://localhost:8080/devices/devices-by-time?generatedAtTime=2023-05-03T13:00:49.127Z. The root point of the new LDES Server is pointing to the newly created fragment, image There is no relation in this new fragment linking back the old LDES Server fragment(s): in the current case: http://localhost:8080/devices-by-time?generatedAtTime=2023-05-03T12:57:23.799Z

image

ldesfragment collection: please see: ldesfragment.zip

Expected result: The fragments created by the old LDES Server: http://localhost:8080/devices-by-time?generatedAtTime=2023-05-03T12:57:23.799Z should not be unreachable.

xdxxxdx commented 1 year ago

This issue is resolved by the commit: https://github.com/Informatievlaanderen/VSDS-LDES-E2E-testing/commit/ad89651a00c27ca5ff34efd820180de9d77d49c5#diff-cd33eaf9722589860ffa7c8121f9dd6e96739f9c37fd1d399146cc7445a66142

With adding 'MONGOCK_MIGRATIONSCANPACKAGE_2=be.vlaanderen.informatievlaanderen.ldes.server.infra.mongo.mongock.changeset3' to the docker file.

After the server upgrade: the URL of the fragment is modified to the new ldes serve format

_id of the ldesfragment collection On LDES_OLD_SERVER_TAG=20221107t0923

image

On /ldes-server:20230424T0954: is changed to: image

@WLefever-Cegeka @rorlic , Please have a look at this, and see if it is expected behavior. Cause in the https://github.com/Informatievlaanderen/VSDS-LDESServer4J/tree/main/ldes-server-infra-mongo/mongock-changeset-3. There is no doc indicating the _idof the fragment will also be changed. Thanks

Tomvbe commented 1 year ago

Closing this, as it is expected behavior that was not added in changeset-3 but in changeset-4.

https://github.com/Informatievlaanderen/VSDS-LDESServer4J/tree/main/ldes-server-infra-mongo/mongock-changeset-4

xdxxxdx commented 1 year ago

Need to wait for the falling E2E: https://github.com/Informatievlaanderen/VSDS-LDES-E2E-testing/issues/295

xdxxxdx commented 1 year ago

Validated on ldes/ldes-server:1.1.0-SNAPSHOT