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

Solr native support fixes #1703 #2026

Merged
merged 1 commit into from Dec 3, 2020
Merged

Conversation

zbendhiba
Copy link
Contributor

[ ] An issue should be filed for the change unless this is a trivial change (fixing a typo or similar). One issue should ideally be fixed by not more than one commit and the other way round, each commit should fix just one issue, without pulling in other changes.
[ ] Each commit in the pull request should have a meaningful and properly spelled subject line and body. Copying the title of the associated issue is typically enough. Please include the issue number in the commit message prefixed by #.
[ ] The pull request description should explain what the pull request does, how, and why. If the info is available in the associated issue or some other external document, a link is enough.
[ ] Phrases like Fix # or Fixes # will auto-close the named issue upon merging the pull request. Using them is typically a good idea.
[ ] Please run mvn process-resources -Pformat (and amend the changes if necessary) before sending the pull request.
[ ] Contributor guide is your good friend: https://camel.apache.org/camel-quarkus/latest/contributor-guide.html

Copy link
Contributor

@ppalaga ppalaga left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great test coverage, @zbendhiba, thanks a lot! Looks good, some comments/questions inline.

<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<systemPropertyVariables>
<!-- force the locale as we want to explicitly test message interpolation -->
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The comment is maybe a leftover and can be removed?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes I'll do that

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done !!

<configuration>
<systemPropertyVariables>
<!-- force the locale as we want to explicitly test message interpolation -->
<javax.net.ssl.trustStore>${solr.trust-store}</javax.net.ssl.trustStore>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will not work OotB on the platform, where the tests are run from test jars and the local resources are not available. I see that this also cannot be configured to pull the trust store from the jar, because the system property expects a local file. Hence a special step will be needed on the platform to unpack the test jar and set the trust store accordingly. Maybe we could make creating that preprocessing step easier by some changes here. Let me file a followup for that.

<properties>
<quarkus.package.type>native</quarkus.package.type>
<quarkus.native.additional-build-args>-H:IncludeResources=.*ssl/.*,-J-Djavax.net.ssl.trustStore=${solr.trust-store},
-J-Djavax.net.ssl.trustStorePassword=${solr.trust-store-password}</quarkus.native.additional-build-args>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there any reason not to put this as quarkus.native.additional-build-args to application.properties? Maybe because the local path has to be absolute?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes!! that's the problem. I've actually copied that way of adding these attribute from one of the tests in quarkus project

Copy link
Contributor

@ppalaga ppalaga left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @zbendhiba!

I'd take care for the follow up #2029 because I'd like to experiment with some options and I am not sure which one of them will work.

@ppalaga
Copy link
Contributor

ppalaga commented Nov 26, 2020

Are you looking at the test failure, @zbendhiba ?

@zbendhiba
Copy link
Contributor Author

@ppalaga I can't tell if the error comes from this

👍 Caused by: io.quarkus.bootstrap.resolver.maven.DeploymentInjectionException: io.quarkus.bootstrap.resolver.maven.BootstrapMavenException: Failed to read descriptor of io.quarkus:quarkus-resteasy-jackson-deployment🫙1.10.0.Final
....
Caused by: org.eclipse.aether.transfer.ArtifactTransferException: Could not transfer artifact io.quarkus:quarkus-resteasy-jackson-deployment:pom:1.10.0.Final from/to central (https://repo.maven.apache.org/maven2): Transfer failed for https://repo.maven.apache.org/maven2/io/quarkus/quarkus-resteasy-jackson-deployment/1.10.0.Final/quarkus-resteasy-jackson-deployment-1.10.0.Final.pom
or from the code.
If those variables javax.net.ssl.trustStore, javax.net.ssl.trustStorePassword set on pom.xml are not recognized, we can have the same exception on SSL handshake. But we should have first the logs of the app starting, and 7/20 tests failing.

@ppalaga ppalaga merged commit 9217ba9 into apache:master Dec 3, 2020
@zbendhiba zbendhiba deleted the 1703-solr branch December 3, 2020 08:09
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.

None yet

3 participants