-
Notifications
You must be signed in to change notification settings - Fork 7
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
Search integration configured as a service (PP-93) #1554
Conversation
0e47244
to
cc42d6f
Compare
70dac7b
to
2e13d10
Compare
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #1554 +/- ##
==========================================
- Coverage 90.05% 89.90% -0.16%
==========================================
Files 248 249 +1
Lines 29196 29021 -175
Branches 6635 6607 -28
==========================================
- Hits 26293 26091 -202
- Misses 1916 1934 +18
- Partials 987 996 +9
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
0904efb
to
9662c1d
Compare
7eed479
to
5d1f8d3
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me!
A few comments related to parenthesizing of multiple context managers and a possible extraneous file.
I also note that self-test functionality and some testing for misconfigured search configuration has been removed; however, that appears to be intentional.
with admin_librarian_fixture.request_context_with_library_and_admin( | ||
"/" | ||
), admin_librarian_fixture.ctrl.wired_container(): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor: Now that Python 3.10 is our minimum, we should now be able to make this a little more readable with parenthesized context managers:
with (
admin_librarian_fixture.request_context_with_library_and_admin("/"),
admin_librarian_fixture.ctrl.wired_container(),
):
with admin_librarian_fixture.request_context_with_library_and_admin( | ||
"/" | ||
), admin_librarian_fixture.ctrl.wired_container(): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor: parenthesize context managers.
with circulation_fixture.request_context_with_library( | ||
"/" | ||
), circulation_fixture.wired_container(): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor: parenthesize context managers.
@@ -96,7 +89,7 @@ def test_feed( | |||
# Make a real OPDS feed and poke at it. | |||
with circulation_fixture.request_context_with_library( | |||
"/?entrypoint=Book&size=10" | |||
): | |||
), circulation_fixture.wired_container(): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor: parenthesize context managers.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need this file?
5d1f8d3
to
bdd3513
Compare
Description
This PR updates Opensearch to be configured as a service via environment variables, rather then in the database. This means that Opensearch is not necessary to run the CM, it won't start without the necessary environment variables set. Opensearch is required for the CM to function currently, but the code will start without it, so that it can be configured. Now that it is configured via environment variables, it needs to be supplied.
The new environment variable is:
PALACE_SEARCH_URL
and the environment variable to configure the URL used when running unit tests is updated toPALACE_TEST_SEARCH_URL
.Now that we require Opensearch to be running to start the CM instance, the github actions workflow is updated to use the
docker-compose.yml
to start the CM for testing. This makes sure all the services are started and thatdocker-compose.yml
stays up to date.Motivation and Context
🚨 Note: This is ready for review, but it cannot be merged until:
Need update for admin UIRemove search service components (PP-848) circulation-admin#100Need update for playbook to deploy the new environment variablehttps://github.com/ThePalaceProject/hosting-playbook/pull/560This is part of PP-4, and will make it easier to configure the elasticsearch service without having to manually write settings to the database and removes the reliance on external integration settings.
How Has This Been Tested?
Checklist