quarkiverse / quarkus-temporal

Temporal (https://temporal.io/) is a developer-first, open source platform that ensures the successful execution of services and applications.
https://docs.quarkiverse.io/quarkus-temporal/dev
Apache License 2.0
6 stars 1 forks source link

No bean found for required type [interface io.quarkus.info.GitInfo] and qualifiers [[]] #118

Open teedjay opened 2 hours ago

teedjay commented 2 hours ago

I created a minimal Quarkus 3.15.1 app on Java 21 with only the temporal-extension and rest-jackson in it.

As soon as I add an @ActivityInterface or @WorkflowInterface it fails during startup with the error below (I'm coding this with quarkus:dev mode).

Caused by: jakarta.enterprise.inject.UnsatisfiedResolutionException: No bean found for required type [interface io.quarkus.info.GitInfo] and qualifiers [[]]
    at io.quarkus.arc.impl.InstanceImpl.bean(InstanceImpl.java:288)
    at io.quarkus.arc.impl.InstanceImpl.getInternal(InstanceImpl.java:309)
    at io.quarkus.arc.impl.InstanceImpl.get(InstanceImpl.java:190)
    at io.quarkiverse.temporal.WorkerFactoryRecorder.lambda$createWorkerOptions$2(WorkerFactoryRecorder.java:77)
    at java.base/java.util.Optional.orElseGet(Optional.java:364)
    at io.quarkiverse.temporal.WorkerFactoryRecorder.createWorkerOptions(WorkerFactoryRecorder.java:77)
    at io.quarkiverse.temporal.WorkerFactoryRecorder.createWorker(WorkerFactoryRecorder.java:92)
    at io.quarkus.deployment.steps.TemporalProcessor$setupWorkerFactory1871931185.deploy_0(Unknown Source)
    at io.quarkus.deployment.steps.TemporalProcessor$setupWorkerFactory1871931185.deploy(Unknown Source)
    ... 11 more

I tried adding the quarkus-info extension (which I know contain the GitInfo interface), but same issue occurs.

As a workaround I added a scoped bean implementing the GitInfo interface in my code :

@ApplicationScoped
public class SuperGitInfo implements GitInfo { ... implementations ... } 

Is this a known issue, that the extensions require a GitInfo bean to be present, or am I missing some other required extension?

melloware commented 2 hours ago

@teedjay thanks for the report we will look into it.

melloware commented 2 hours ago

@rmanibus we probably need to handle this when Git is not there which is when you just do a CodeStart and do mvn quarkus:dev the project is NOT a Git Project.

teedjay commented 2 hours ago

Thanks for fast feedback and this great little extension! I'll use git init as a workaround instead while playing with your extension.

melloware commented 2 hours ago

we have a crazy full working demo if you want to see how it all works: https://github.com/melloware/quarkus-temporal-petstore

melloware commented 2 hours ago

@all-contributors add @teedjay for bug

allcontributors[bot] commented 2 hours ago

@melloware

I've put up a pull request to add @teedjay! :tada:

teedjay commented 2 hours ago

we have a crazy full working demo if you want to see how it all works: https://github.com/melloware/quarkus-temporal-petstore

I saw the Quarkus Insight video yesterday, great demo, showing a "real world" example. That's actually the reason for playing around with it today 🤭

rmanibus commented 2 hours ago

Yeah I guess we could do something for this not to fail. This is related to the build id feature (we are defaulting build id with the latest commit sha)

rmanibus commented 2 hours ago

Glad you liked the demo 😁

melloware commented 2 hours ago

Yep I think we need to log a Warning if Git NOT available and provide a fallback ID like maybe something the user can set?

melloware commented 1 hour ago

PR submitted