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

Test pysolr against multiple versions of Solr, fixes #223 #227

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

jnovinger
Copy link

@jnovinger jnovinger commented Nov 10, 2017

This PR adds test runs against Solr 5.x, 6.x, and 7.x for a standard, stand-alone Solr configuration as mentioned in #223 by @efagerberg . This PR adds a docker-compose.yml, Dockerfile, and Solr configuration skeleton for testing Pysolr against Solr 5.x, 6.x, and 7.x. Testing against Solr 4.x is unchanged and still implemented using the start-solr-test-server.sh script and a local download of Solr 4.

Due to time constraints, this does not include tests for Pysolr's SolrCloud support for Solr 5.x+. These tests have been marked as "failure allowed" in the Travis configuration, so that they don't break build status in the short-term.

This PR includes 2 commits, one that represents the bulk of the changes (including a skeleton Solr config) and one that removes much of the bloat (e.g. comments) from the Solr config as is reasonable. If you'd prefer, I can remove the second commit, but chose to add it to reduce the overall size of the PR.

@jnovinger
Copy link
Author

@acdha I am unclear on how the Apache license statements, present in the Solr config files, plays with Pysolr's choice of BSD license. If you have guidance on how to handle that, please let me know.

@jnovinger
Copy link
Author

I forgot to mention that there are some failing tests when Pysolr is pointed at a Solr 7.x instance. This appears to be because Solr 7.x+ returns JSON from admin endpoints, rather than XML. I looked at the failures briefly and was unable to tell from the responses if the actions actually completed successfully (e.g. a core was created). I marked all Solr 7.x tests as "failure allowed" as well, thinking that this may be better addressed later.

@acdha
Copy link
Collaborator

acdha commented Jan 9, 2018

@jnovinger can we support older versions of Solr by adding wt=json to the admin URLs? (It's been a long time since I've looked at those) I think by now it'd be reasonable to say that e.g. we only support Solr 5 or 6+ going forward since people with older Solr installs can use the current releases.

Copy link
Collaborator

@acdha acdha left a comment

Choose a reason for hiding this comment

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

How hard would it be to avoid including all of those config files? Ideally we would only modify the bundled files to avoid needing to keep them in-sync with the upstream Apache project, and that'd also avoid needing to deal with a repo having files released under a separate license.

@jnovinger
Copy link
Author

@acdha good questions, I'll take a look and let you know as soon as I can.

@stale
Copy link

stale bot commented Jun 5, 2018

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Jun 5, 2018
@stale stale bot closed this Jul 5, 2018
@acdha acdha reopened this Apr 1, 2019
@stale stale bot removed the stale label Apr 1, 2019
@stale
Copy link

stale bot commented Jun 30, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Jun 30, 2019
@jnovinger
Copy link
Author

Gah, please don't close this @stalebot. I've been thinking about this recently and meaning to revisit it.

@stale stale bot removed the stale label Jul 25, 2019
@stale
Copy link

stale bot commented Oct 23, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Oct 23, 2019
Copy link

@Andrew-Chen-Wang Andrew-Chen-Wang left a comment

Choose a reason for hiding this comment

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

Hey @jnovinger @acdha pinging just to see if this can be ramped up again. I'm working in a Python 3.8 environment and hopefully about to begin Solr usage with their somewhat latest stable version. Would be great to see multi-version Solr testing (and if unit testing can include Python 3.8 as a supported version, which shouldn't be an issue to me since it was a lot of performance gains from Python changelog with some new features)!

Just my two cents: when I'm running something like Elasticsearch in Travis, I'll just install it directly without using Docker. That might be able to cut down on some files. Not sure though so I've never used Solr yet.

@cclauss
Copy link
Contributor

cclauss commented Apr 26, 2023

Please rebase.

@jnovinger
Copy link
Author

I'll see if I can find some time to get this rebased soon and updated.

I haven't used Solr in a while, so I might be a little rusty.

@cclauss
Copy link
Contributor

cclauss commented Jun 27, 2023

@jnovinger Please rebase or close.

Adds a docker-compose.yml, Dockerfile, and Solr configuration skeleton
for testing Pysolr against Solr 5.x, 6.x, and 7.x. Testing against Solr
4.x is still implemented using the start-solr-test-server.sh script and
a local download of Solr 4.

Due to time constraints, this does not include tests for Pysolr's SolrCloud
support for Solr 5.x+. These tests have been marked as "failure allowed"
in the Travis configuration, so that they don't break build status in
the short-term.
@jnovinger jnovinger force-pushed the test/multiple-solr-versions branch from 73be94c to 8cc54ba Compare June 27, 2023 17:40
@jnovinger
Copy link
Author

@cclauss apologies for letting this get stale ... again. I've rebased it and will be able to take a look at getting it running correctly agains SOON:tm:. I have some PTO coming up at the end of this week and will dig in then.

@cclauss
Copy link
Contributor

cclauss commented Jun 27, 2023

Cool. To placate codespell, modify the last line of pyproject.toml from skip="./.*" to skip="./.*,*.xml" because spell checking XML files is probably a bad idea.

.travis.yml Outdated
@@ -0,0 +1,57 @@
sudo: required
Copy link
Contributor

Choose a reason for hiding this comment

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

Travis CI is no longer free to open source projects so we use GitHub Actions instead.

Copy link
Author

Choose a reason for hiding this comment

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

Yep, figured that would be where I need to do most of the work.

Honestly, I thought I told git to remove that file during the rebase. But, perhaps it's good to have for reference until the PR is ready for re-review. It will definitely be gone by then.

@cclauss cclauss removed the stale label Sep 15, 2023
@cclauss cclauss self-requested a review May 21, 2024 16:09
Copy link

@Andrew-Chen-Wang Andrew-Chen-Wang left a comment

Choose a reason for hiding this comment

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

Hi. I haven't touched Solr in awhile though, but happy to unblock as it's just tests

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

4 participants