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

quarkus.test.native-image-profile seems to be not reflected with Quarkus main #45083

Closed
rsvoboda opened this issue Dec 12, 2024 · 8 comments · Fixed by #45100
Closed

quarkus.test.native-image-profile seems to be not reflected with Quarkus main #45083

rsvoboda opened this issue Dec 12, 2024 · 8 comments · Fixed by #45100
Labels
area/native-image kind/bug Something isn't working
Milestone

Comments

@rsvoboda
Copy link
Member

rsvoboda commented Dec 12, 2024

Describe the bug

quarkus.test.native-image-profile seems to be not reflected with Quarkus main

security-openid-connect-client-quickstart is failing and it uses this property in https://github.com/quarkusio/quarkus-quickstarts/blob/main/security-openid-connect-client-quickstart/src/main/resources/application.properties#L14 to control port number

security-openid-connect-client-quickstart works well with Quarkus 3.17.4

When native binary is executed in the test INFO [io.quarkus] (main) Profile prod activated. appears in the log

WARN [io.qua.run.con.ConfigRecorder] (main) The profile 'prod' used to build the native image is different from the runtime profile 'test'. This may lead to unexpected results. is the thing that should appear in the log as quarkus.test.native-image-profile=test is set in the application properties

Expected behavior

security-openid-connect-client-quickstart passes with Quarkus main

Actual behavior

security-openid-connect-client-quickstart fails with Quarkus main, prod mode is used in execution and quarkus.test.native-image-profile=test is not reflected

How to Reproduce?

Make sure GraalVM or Mandrel is available, e.g. using sdk use java 23.1.5.r21-mandrel
Run

git clone https://github.com/quarkusio/quarkus-quickstarts -b development
cd quarkus-quickstarts/security-openid-connect-client-quickstart
#FAIL
mvn clean verify -Dnative -Dquarkus.platform.version=999-SNAPSHOT
#PASS
mvn clean verify -Dnative -Dquarkus.platform.version=3.17.4

Output of uname -a or ver

macOS

Output of java -version

Java 21

Quarkus version or git rev

Quarkus main fc237a6

Build tool (ie. output of mvnw --version or gradlew --version)

No response

Additional information

No response

@rsvoboda rsvoboda added area/native-image kind/bug Something isn't working labels Dec 12, 2024
Copy link

quarkus-bot bot commented Dec 12, 2024

/cc @Karm (mandrel), @galderz (mandrel), @zakkak (mandrel,native-image)

@rsvoboda
Copy link
Member Author

CC @sberyozkin

@rsvoboda rsvoboda changed the title quarkus.test.native-image-profile seem to be not reflected with Quarkus main quarkus.test.native-image-profile seems to be not reflected with Quarkus main Dec 12, 2024
@sberyozkin
Copy link
Member

Hi @rsvoboda Thanks, @gsmet pinged me about it, and pointed out that it started failing about 4 days back from 9th Dec, I had a look at commits and could not find anything obvious in the commit history...
I have to admit I'm not sure where in the Quarkus code I should look atround, so I'd appreciate some guidance where to start looking further, let me CC @geoand, @radcortez. My only idea right now, is to check if using @TestHttpResource annotation can do better

@sberyozkin
Copy link
Member

sberyozkin commented Dec 12, 2024

OK, the plan is to go via https://github.com/quarkusio/quarkus/commits/main/test-framework, run the test against different code views, and try to narrow down something :-)

@rsvoboda
Copy link
Member Author

rsvoboda commented Dec 12, 2024

I found it, it's caused by a47ad60 / #42715

cc @sberyozkin @gsmet @radcortez

@radcortez
Copy link
Member

I'll have a look.

@sberyozkin
Copy link
Member

Hey @rsvoboda Thanks a million, as I haven't got to it yet.

Thanks @radcortez, good news it is on main only :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/native-image kind/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants