Repository navigation
Conversation
…radle task Agent-Logs-Url: https://github.com/dsmiley/solr/sessions/94099a7f-cb38-4fa1-ae7b-d2e5076caafd Co-authored-by: dsmiley <377295+dsmiley@users.noreply.github.com>
|
Developed with Copilot Agent. TODO: update the smoketester python script to call this gradle task. Or maybe simply update that Jenkins job to call it. |
|
I am somewhat ambivalent about this... I guess I am worried that by carving this into it's own test infrastructure, that we end up never running it. I worry it will become like some of the Nightly tests, that never get run by us locally and therefore when they do get run they break, which is frustrating, and or no one pays attention to the errors. Thinking out loud...
What do you think the criteria SHOULD be for moving items into |
| environment BATS_LIB_PREFIX: "$nodeProjectDir/node_modules" | ||
| } | ||
|
|
||
| task testSmokeBats(type: BatsTask) { |
There was a problem hiding this comment.
how much of the below lines of code could be refactored out so we don't list this code twice, once for iTest and a second time for testSmokeBats?
There was a problem hiding this comment.
Yeah I don't like repetition; I suspected it but didn't look. I may try to reduce it.
What I want to see happen (separate issue/PR) is what I said in my dev list email -- this tech becoming a kind of gradle build infra that can be used wherever we want -- not just specifically where it lives now. If we do that, then I would imagine a new gradle task type for BATS for Solr that would have such vars built-in and we wouldn't need to say much to add a new gradle target using it.
|
A failure here only needs to be caught at release time, so I'm okay with the risk of us collectively not noticing till then. Even in saying that, I'm implying that absolutely nobody ever reviews the state of our jenkins jobs. While somewhat true, and a freaking crying shame, I think that should be solved independently out of scope of this conversation. @iamsanjay and I are discussing ideas to address that. I don't think we should expect GHA/PR to be our total coverage of tests, albeit certainly the vast majority -- yes.
We'll always have some tests that are not fast so we need to deal with it. Personally I'm not interested in optimizing this specific test further but go for it if you are so inclined.
Did you see my dev-list thread?: For this rolling upgrade test, Docker isn't the point but is a practical implementation choice.
Shrug; I'm not moving this out because it uses Docker. I'm moving it out both because it's expensive and because a failure here is very unlikely and it's acceptible to be caught at release time. But it's very important for an eventual failure here to be noticed by us before a release is made. I think "smoke" fits the bill. I was looking at our smoke tester, and I wonder if much of it could be converted to bats tests. So that also was a factor for me choosing to create a new "testSmokeBats" target & directory, even though it only has one test there now. |
|
Admittedly I did a faux pax. The description is entirely LLM generated; I should have reviewed it; sorry! It over-emphasizes the Docker nature of the test. That isn't the point. |
|
I'd prefer perhaps a TestContainers centered JUnit test for the same. Claude can refactor it in a minute... I feel it gives better tools for robustness and it could be flagged as |
Can you elaborate? If we do a JUnit conversion, I'd rather wait for a SolrTestRule & SolrBackend that is Docker backed to exist, as we'll need that for other backwards-compatibility testing anyway. I should have something eventually; some of the infra is WIP. |
Well, you can script retry / wait loops etc in bats, but if we scaffold some test helpers to start/stop solr in docker as part of a JUnit test, then we could piggy back on existing infra for all of this. And we get to run tests in parallel.
Yea, I see lots of movement in test framework base clasess. Don't fully grasp the entire landscape of Rule vs base class etc, but yea, starting Solr in a Testcontainer seems like something that should be a foundational capability.. |
janhoy
left a comment
There was a problem hiding this comment.
To me, this is OK as an intermediate step, perhaps towards a more robust JUnit test for the same. Feel free to fold in and then continue in followup PRs as needs arise.
|
I don't love it. We have more and more tests in our regular I wonder if what we really need is:
The more categories of tests we define, the less that any outside of |
|
Tests may be fragmented, for sure. But I agree with David that there are types of tests that we can accept being run mainly during the modification of a cetain feature and before each release. If RAT tests were heavy and slow that would be a good candidate. Same with these upgrade tests, they need only prevent that we ship something that is broken. And if we can run such tests weekly or nightly in CI, we also get some feedback without haling each PR run forever. The fact that noone cares about the failure logs of nightly is a different problem. I wonder if we could give |
|
🤖 BATS is going away: CATS (SOLR-18642, #5323) has replaced it on |
|
I would think so! I am very excited about having rolling upgrades as a "normal part of testing" solr ;-). |
See dsmiley#27
test_rolling_upgrade.batsrequires Docker and published images, making it unsuitable for the standardintegrationTestsrun. Since bats does not recurse into subdirectories, moving the file is sufficient to exclude it.Changes
test/smoke/test_rolling_upgrade.bats— moved fromtest/into a newtest/smoke/subdirectory;integrationTests(which runsbats test/) will no longer discover itbuild.gradle— adds atestSmokeBatstask (typeBatsTask,testDir = 'test/smoke') with the same env-var setup asintegrationTests, intended for standalone invocation (e.g. fromsmokeTestRelease.pywhen Docker is present)