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

Flyway callbacks can now access the Flyway instance #27770

Merged
merged 1 commit into from Sep 7, 2022

Conversation

gastaldi
Copy link
Contributor

@gastaldi gastaldi commented Sep 7, 2022

This prevents the following exception from happening when a Flyway Callback implementation attempts to access the Flyway object in Arc (using CDI.current().select(Flyway.class).get())

javax.enterprise.inject.CreationException: Synthetic bean instance for org.flywaydb.core.Flyway not initialized yet:
org_flywaydb_core_Flyway_3cb728d15a0a04006cc75d03f784feb2bba9a5fb
        - a synthetic bean initialized during RUNTIME_INIT must not be accessed during STATIC_INIT
        - RUNTIME_INIT build steps that require access to synthetic beans initialized during RUNTIME_INIT should consume the
SyntheticBeansRuntimeInitBuildItem

This prevents the following exception from happening when a Flyway Callback implementation attempts to access the Flyway object in Arc
(using `CDI.current().select(Flyway.class).get()`)

```
javax.enterprise.inject.CreationException: Synthetic bean instance for org.flywaydb.core.Flyway not initialized yet:
org_flywaydb_core_Flyway_3cb728d15a0a04006cc75d03f784feb2bba9a5fb
        - a synthetic bean initialized during RUNTIME_INIT must not be accessed during STATIC_INIT
        - RUNTIME_INIT build steps that require access to synthetic beans initialized during RUNTIME_INIT should consume the
SyntheticBeansRuntimeInitBuildItem
```

Add tests
@gastaldi gastaldi merged commit 1785044 into quarkusio:main Sep 7, 2022
@quarkus-bot quarkus-bot bot added this to the 2.13 - main milestone Sep 7, 2022
@gastaldi gastaldi deleted the flyway_synthetic_error branch September 7, 2022 06:09
@gsmet gsmet modified the milestones: 2.13 - main, 2.12.1.Final Sep 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants