Skip to content

Conversation

@codingBenVdS
Copy link

BNPPFSLA-1125 [Update] Solr IntegrationTests

# This is the 1st commit message:

BNPPFSLA-1125 [Update] SolrIntegrationTests

# This is the commit message #2:

 BNPPFSLA-1125 [test]

# This is the commit message #3:

 BNPPFSLA-1125 [test] with simple timeout

# This is the commit message #4:

BNPPFSLA-1125 [test] create backups with static names for new solr restore test

# This is the commit message #5:

BNPPFSLA-1125 [test] without name for auto recovery of solr

# This is the commit message #6:

BNPPFSLA-1125 [test]

# This is the commit message #7:

BNPPFSLA-1125 [test] we only keep 2 backups,...

# This is the commit message #8:

BNPPFSLA-1125 [test] solr doesnt delete the created backups due to setting explicit name? TDI

# This is the commit message #9:

BNPPFSLA-1125 [test] no last count

# This is the commit message #10:

BNPPFSLA-1125 [Update] solr backup it

# This is the commit message #11:

BNPPFSLA-1125 [Add] docker-compose
 BNPPFSLA-1125 [test]

 BNPPFSLA-1125 [test] with simple timeout

BNPPFSLA-1125 [test] create backups with static names for new solr restore test

BNPPFSLA-1125 [test] without name for auto recovery of solr

BNPPFSLA-1125 [test]

BNPPFSLA-1125 [test] we only keep 2 backups,...

BNPPFSLA-1125 [test] solr doesnt delete the created backups due to setting explicit name? TDI

BNPPFSLA-1125 [test] no last count

BNPPFSLA-1125 [Update] solr backup it

BNPPFSLA-1125 [Add] docker-compose

BNPPFSLA-1125 [test]

BNPPFSLA-1125 [test]
@codingBenVdS codingBenVdS force-pushed the BNPPFSLA-1125 branch 2 times, most recently from 30b7445 to f2951dc Compare September 16, 2025 13:49
# - S3_PATH_STYLE_ACCESS_ENABLED=true
# - RESTORE_FROM_BACKUP=true
# - RESTORE_BACKUP_NAME=my-alfresco-backup-20251006
# - RESTORE_BACKUP_PATH=bucket
Copy link
Author

Choose a reason for hiding this comment

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

I'd leave this in as an example for anyone on how to actually setup a working FIXED_SNAPSHOT restore...

  • Breaks when doing e.g. RESTORE_BACKUP_NAME="my-alfresco-backup-20251006" or if you try to pass the path of the snapshot instead of the bucket name...

Copy link

Choose a reason for hiding this comment

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

Then please add the reason as a comment.

Copy link
Author

@codingBenVdS codingBenVdS left a comment

Choose a reason for hiding this comment

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

for reviewers

… can test the restore from a chosen backup.

  * Solr has a special startup script and with the right ENV vars: RESTORE_BACKUP_NAME, RESTORE_BACKUP_PATH & RESTORE_FROM_BACKUP=true will restore the chosen S3-backup.
  * Core-issue is that imported docker-solr container contains an old SOLR-BACKUP.
  * This has to be removed on docker level.
  * Build itself does need to include the jackson/joda libraries.
@WimCrols
Copy link

WimCrols commented Oct 9, 2025

Ok, I got to ask... What is the story behind the commit with commit message # This is a combination of 11 commits.? :)

@codingBenVdS
Copy link
Author

This was due to some testing with setting up a second SOLR container that runs the backup command on startup with a fixed-snapshot.
In the end i can just reuse the old solr-container and run the same command as would run on startup and simply check the restore status.
(Starting up the container with the properties as we do in acc/prod, do the same as the direct curl, but the restore status is no longer available when running the test itself) So in conclusion: second solr wasnt needed, and useless for the tests

dependsOn(configurations.backupJar)

if (flavor == "solr6") {
// Remove the old imported solr-backup from docker-solr:
Copy link

Choose a reason for hiding this comment

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

But where do both sets of dependencies come from? I assume from gradle. Can't we avoid pulling in the incorrect deps there? Removing it afterwards here feels like a hack.

Copy link

Choose a reason for hiding this comment

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

As discussed with @codingBenVdS and @RVanhuysseXenit, we will merge docker-solr and solr-backup instead.


@Test
@Order(3)
void testRestorePointInTimeScriptEndpoint() {
Copy link

Choose a reason for hiding this comment

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

Great you added integration test 👍

# - S3_PATH_STYLE_ACCESS_ENABLED=true
# - RESTORE_FROM_BACKUP=true
# - RESTORE_BACKUP_NAME=my-alfresco-backup-20251006
# - RESTORE_BACKUP_PATH=bucket
Copy link

Choose a reason for hiding this comment

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

Then please add the reason as a comment.

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.

4 participants