question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Provide a way to use a custom ResourceProvider

See original GitHub issue

Hey folks,

In Quarkus we have a Flyway extension that is configured with the locations to the migration scripts at build time. The locations cannot be changed at runtime, meaning that the locations are always known to us at build time thus, making runtime classpath scanning for them redundant (at best).

I looked at the code in order to see if we could configure Flyway to use a custom ResourceProvider (which Quarkus would setup with the proper locations), but short of sub-classing Flyway and overriding execute, I didn’t see any way of doing so.

It would be great for us if such a configuration point were possible. WDYT? If you like the idea, I can provide a PR using whatever design you think it best.

Thanks!

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:4
  • Comments:9 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
geoandcommented, May 20, 2020

That’s what I had in mind as well

0reactions
KPhicommented, Jul 22, 2020

We’re trying to get a ResourceProvider running in an OSGi environment. However, we are encountering issues with implementing the interface, as the class org.flywaydb.core.internal.resource.LoadableResource referenced in the public signature is not exported via the library’s MANIFEST.MF file.

Access restriction: The type 'LoadableResource' is not API (restriction on required library 'org.flywaydb.core_6.5.1.jar')

In theory, we could implement the interface in the org.flywaydb.core, put it into a dedicated bundle and attach it as a fragment to the library. Then we would need to have the ability to reference the class as a string, which is possible for the FluentConfiguration.resolvers() method but not implemented for FluentConfiguration.resourceProvider(). This solution has other issues, however (think loading resources from different bundles), and is no real alternative anyway. Does someone have an example on how we can get this to work in OSGi?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Azure Custom Resource Providers Overview - Microsoft Learn
Custom resource providers are a list of contracts between Azure and endpoints. This contract describes how Azure should interact with an ...
Read more >
Custom resources - AWS CloudFormation
The custom resource provider processes the AWS CloudFormation request and returns a response of SUCCESS or FAILED to the pre-signed URL. The custom...
Read more >
Advanced Custom Resources with AWS CDK - Medium
As the AWS documentation explains: “Custom resources provide a way for you to write custom provisioning logic in CloudFormation template and ...
Read more >
Custom resource provider considerations - Progress Software
Perform this procedure, if you use a custom resource provider that implements the IResourceProvider interface.
Read more >
AWS::CloudFormation::CustomResource - 亚马逊云科技
Custom resources provide a way for you to write custom provisioning logic in CloudFormation template and have CloudFormation run it during a stack...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found