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

In some scenarios, log is not being injected results in NPE, replacin… #249

Closed
wants to merge 1 commit into from

Conversation

rareddy
Copy link
Contributor

@rareddy rareddy commented Apr 5, 2021

…g with static one.

@rareddy rareddy requested a review from shawkins April 5, 2021 16:05
@shawkins
Copy link
Contributor

shawkins commented Apr 5, 2021

@rareddy can you elaborate on the scenario, and did you check with @FroMage or anyone else with the quarkus team?

@rareddy
Copy link
Contributor Author

rareddy commented Apr 5, 2021

no, I did not. even though we have @UnlessBuildProfile("prod") this bean is invoked in prod profile and when you try to use it that is when you will see the NPE

@shawkins
Copy link
Contributor

shawkins commented Apr 5, 2021

Invoked in the prod profile? What profile was the image built in? For example was it built in test and then run in prod? I would expect this bean to not exist if the image were built in something other than prod.

@rareddy
Copy link
Contributor Author

rareddy commented Apr 5, 2021

yep, even you build in prod it was there

@shawkins
Copy link
Contributor

shawkins commented Apr 5, 2021

@rareddy what command(s) did you use to build/deploy?

@rareddy
Copy link
Contributor Author

rareddy commented Apr 5, 2021

mvn clean package -DskipTests -Dquarkus.container-image.build=true -Dquarkus.kubernetes.deploy=true -Dquarkus.container-image.push=true -Dquarkus.container-image.registry=docker.io -Dquarkus.container-image.username=xxx -Dquarkus.container-image.password=xxx -Dquarkus.kubernetes-client.trust-certs=true -Dsso.enabled=false -Dquarkus.kubernetes-config.enabled=true -Dquarkus.kubernetes.image-pull-policy=Always -Dquarkus.kubernetes.namespace=kas-fleetshard

@shawkins
Copy link
Contributor

shawkins commented Apr 5, 2021

I don't know if we need a fix here because we don't expect this scenario to work in the first place (of course my misspelling should be corrected). This definitely appears to be a quarkus bug. UnlessBuildProfile is not fully honored if the bean is marked with Path. Can you raise this as a quarkus issue?

@rareddy
Copy link
Contributor Author

rareddy commented Apr 5, 2021

quarkusio/quarkus#16243

@rareddy rareddy closed this Apr 5, 2021
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.

2 participants