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

fix opensearch multiregion support #7237

Merged
merged 1 commit into from Nov 24, 2022
Merged

Conversation

alexrashed
Copy link
Member

When creating an OpenSearch domain in a different region than the default one, the startup monitor failed (since it selected the wrong store, and in turn did not find the domain to change the status for). As a result, the Processing status is never set to false (indicating that the domain creation was successful / has finished).

This PR addresses this issue by:

  • Explicitly setting the region when using OpensearchProvider.get_store outside of a request-scoped thread (i.e. the startup monitor thread).
  • Raising an AssertionError in case OpensearchProvider.get_store does not get an explicit region nor is run in a request-scoped thread (i.e. get_region_from_request_context returns None).

@alexrashed alexrashed temporarily deployed to localstack-ext-tests November 23, 2022 16:57 Inactive
@github-actions
Copy link

LocalStack integration with Pro

       3 files  ±0         3 suites  ±0   1h 15m 58s ⏱️ + 1m 14s
1 500 tests ±0  1 270 ✔️ ±0  230 💤 ±0  0 ±0 
2 120 runs  ±0  1 638 ✔️ ±0  482 💤 ±0  0 ±0 

Results for commit 08efb4e. ± Comparison against base commit 9770dc7.

Copy link
Member

@silv-io silv-io left a comment

Choose a reason for hiding this comment

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

Good catch! LGTM. Have you tested how this affects ES?

@coveralls
Copy link

Coverage Status

Coverage increased (+0.008%) to 82.922% when pulling 08efb4e on fix-opensearch-multiregion into 9770dc7 on master.

@alexrashed
Copy link
Member Author

Good catch! LGTM. Have you tested how this affects ES?

Yes, I actually discovered the issues when using the ES API. 🙂

@alexrashed alexrashed merged commit 0aa9ffb into master Nov 24, 2022
@alexrashed alexrashed deleted the fix-opensearch-multiregion branch November 24, 2022 08:04
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

3 participants