Skip to content
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

migration script folders prefixed with 'migration' are taken into account mistakenly #36

Closed
nilskuhn opened this issue Mar 24, 2021 · 1 comment · Fixed by #37
Closed
Assignees
Labels
bug Something isn't working

Comments

@nilskuhn
Copy link

I am using different folders of migration scripts for different Spring profiles in my application. In each profiles yml config, I do configure the folders via setting spring.elasticsearch.evolution.locations. If one of these folders name is prefixed with migration, it is taken into account mistakenly, no matter what is configured.

Given the following two Spring profiles, I would have expected, profile 1 only taking scripts within es/migration into account, whereas profile 2 should take both configured folders into account:

# Profile 1:
spring:
  elasticsearch:
    evolution:
      locations:
        - classpath:es/migration
# Profile 2: 
spring:
  elasticsearch:
    evolution:
      locations:
        - classpath:es/migration
        - classpath:es/migration-stage-dev  

Contrary to my expectation, even in profile 1, scripts from both folders are taken into account. If I rename folder es/migration-stage-dev into es/m-stage-dev everything works as expected.

@xtermi2 xtermi2 self-assigned this Mar 24, 2021
xtermi2 added a commit that referenced this issue Mar 26, 2021
@xtermi2 xtermi2 linked a pull request Mar 26, 2021 that will close this issue
@xtermi2 xtermi2 added the bug Something isn't working label Mar 26, 2021
@xtermi2
Copy link
Collaborator

xtermi2 commented Mar 26, 2021

I can reproduce this issue. As a quick fix you can add a trailing / like this: classpath:es/migration/
But I also plan to release a new version today.

xtermi2 added a commit that referenced this issue Mar 26, 2021
…location

fixes #36: strict scan classpath location
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants