Skip to content

SOLR-18069: Add Maven build smoke test to verify published POMs#4227

Draft
dsmiley wants to merge 8 commits intoapache:mainfrom
dsmiley:copilot/solr-18069-create-integration-test
Draft

SOLR-18069: Add Maven build smoke test to verify published POMs#4227
dsmiley wants to merge 8 commits intoapache:mainfrom
dsmiley:copilot/solr-18069-create-integration-test

Conversation

@dsmiley
Copy link
Contributor

@dsmiley dsmiley commented Mar 19, 2026

https://issues.apache.org/jira/browse/SOLR-18069

Original PR in my fork done by CoPilot Agent: dsmiley#21

Didn't test/run this and I don't know what to think of the code. This is just a draft PR after all ;-)
I love that the maven aspects are factored out and individually runnable.
TBH I'm the last one to be writing python here. Ideally someone immediately takes over this. Or tells me to close this pile of crap ;-)

Copilot AI and others added 2 commits March 19, 2026 13:06
Co-authored-by: dsmiley <377295+dsmiley@users.noreply.github.com>
@dsmiley dsmiley requested a review from janhoy March 19, 2026 21:52
…TestExternalClient

Co-authored-by: dsmiley <377295+dsmiley@users.noreply.github.com>
Agent-Logs-Url: https://github.com/dsmiley/solr/sessions/eadb1a0d-dacb-4e40-9ea8-ab4bc8371ddf
@epugh
Copy link
Contributor

epugh commented Mar 23, 2026

I really like the upping of our game in validating things.

I wish we had a more general way of handling lots of kinds of "integration" or "system" tests like this one. We have some emerging tests in our bats infrastructure, and then some of these smokTest things like this.

Could this test have been based on a Docker based setup so that if I don't have a specific version of maven and gradle installed, that it would still work? It would be nice if running this was a constant thing, not a "and now it's release time" type thing.

I also am not sure about more and more directories at the root.. Could test-external-client be part of some sort of solr/system-tests? Or solr/smoke-tests? With other heavy/complex tests?

@janhoy
Copy link
Contributor

janhoy commented Mar 23, 2026

It would be nice if running this was a constant thing, not a "and now it's release time" type thing.

Wrt maven files, it is most crucial to avoid shipping something broken, so I'm good with release-time.

But I also agree that if it was wrappable in a gradle target, then any change to gradle files could trigger such a test in github actions. Since it involves actually running mvn I suspect it becomes awkward to do this inside JUnit framework, but perhaps as a TestContainer that depends on first building maven, lots of things could be done in that container.

Copy link
Contributor Author

@dsmiley dsmiley left a comment

Choose a reason for hiding this comment

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

Note there are multiple Jenkins CI jobs for the smoketester: https://ci-builds.apache.org/job/Solr/job/Solr-Smoketest-10.x/ -- that one is disabled for some reason.

The bit of Docker here was only so that we don't add an extra requirement to have Maven installed. Maybe I could add the "Maven Wrapper" instead. Or I could just remove that and it becomes optional (only run when mvn is on the path). After all, most envs that have Gradle will have Maven as well. BTW I didn't test this Docker apsect whatsoever.

Jan/Eric you both suggest more Docker usage for this particular test-external-client but I don't see the point as plainly it works without such. I don't think we should use it on the grounds for testing additional Maven/Gradle versions -- IMO that's overkill and additional maintenance burden.

@@ -83,10 +83,13 @@ static Path determineSourceHome() {
}

Path base = file.toAbsolutePath();
while (!Files.exists(base.resolve("solr/test-framework/build.gradle")) && null != base) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is a subtle difference that I bet nobody will notice. Not the null check but the path. Notice I removed the leading "solr/" component, and then some lines below here, I removed adding the "solr/" back on when we return, as it becomes pointless. On one hand, this subtle difference is a micro-optimization -- why iterate to the root of the project when we can iterate and stop at the "solr/" child and then reach success one iteration sooner. My real motivation is that this is absolutely critical for test-external-client, which uses ExternalPaths. We want that project to experience what any project outside Solr would see -- null for all paths here. So @epugh that answers why it's critical that test-external-client be at the root, or at least not inside solr/.

@dsmiley
Copy link
Contributor Author

dsmiley commented Mar 23, 2026

I could see that Docker could be used to execute the build of this little project in order to provide total detachment/isolation from the source tree, thus making it needless for me to be a little clever in ExternalPaths regarding the leading "solr/".

@dsmiley
Copy link
Contributor Author

dsmiley commented Mar 23, 2026

BTW I generalized the scope. The PR title suggests this is only about published POMs. That is one thing this little project indirectly checks, the other thing that is checked is that solr-test-framework can actually be used externally. Hence I called this dir "test-external-client".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants