-
Notifications
You must be signed in to change notification settings - Fork 16
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
[Issue #2327] Configure API/backend to work with OpenSearch #2450
Conversation
It should be working now. Lemme think |
I just manually kicked it off for a first attempt. |
I think that each individual commit that you want to deploy needs to include a change inside of |
def __call__(self, request): # type: ignore | ||
# Use HTTPBasicAuth's __call__ method to add a | ||
# username+password authorization header | ||
request = HTTPBasicAuth(self.username, self.password)(request) | ||
|
||
return self._sign_request(request) |
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.
Wow this was easy 💯
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.
🚀
Summary
Fixes #2327
Time to review: 5 mins
Changes proposed
Modified configuration to call OpenSearch with our current auth setup
Adjusted the names of several env vars to match the Terraform setup
Adjusted the number of records we upsert per batch to OpenSearch from 5k to 1k
Context for reviewers
We will have another pass of auth setup later, getting proper auth setup with OpenSearch requires we adjust some other infra setup to get the auth in OpenSearch itself working, so right now we're logging in with the user/pass of the cluster itself. As those changes will take a bit to setup, I've just commented out the AWS auth approach we will use later.
Additional information
In dev I ran the load job + queried the API and it all functions. Queries go to the search index as expected and responses look good. Not sure about caching/performance, but was getting 100-200ms for the requests to the API.
For future reference, a decent way to query this in Logs Insights:
Here is the final big log statement from running the job in dev: