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

[BUG] security plugin integration tests for 2.0.1 and 2.1.0 flaky #612

Closed
dblock opened this issue Nov 21, 2023 · 2 comments · Fixed by #584
Closed

[BUG] security plugin integration tests for 2.0.1 and 2.1.0 flaky #612

dblock opened this issue Nov 21, 2023 · 2 comments · Fixed by #584
Labels
bug Something isn't working

Comments

@dblock
Copy link
Member

dblock commented Nov 21, 2023

What is the bug?

Integration tests seem to fail often with 2.0.1 and 2.1.0 in security plugin tests. Server responds with 500s.

How can one reproduce the bug?

https://github.com/opensearch-project/opensearch-py/actions/runs/6947817680/job/18902465761
https://github.com/opensearch-project/opensearch-py/actions/runs/6949254612/job/18906963187

test_opensearchpy/test_server_secured/test_security_plugin.py::TestSecurityPlugin::test_update_audit_configuration FAILED [ 45%]
test_opensearchpy/test_server_secured/test_security_plugin.py::TestSecurityPlugin::test_update_role FAILED [ 48%]
test_opensearchpy/test_server_secured/test_security_plugin.py::TestSecurityPlugin::test_update_user FAILED [ 51%]
test_opensearchpy/test_async/test_server_secured/test_security_plugin.py::TestSecurityPlugin::test_create_role FAILED [ 54%]
test_opensearchpy/test_async/test_server_secured/test_security_plugin.py::TestSecurityPlugin::test_create_role_with_body_param_empty PASSED [ 58%]
test_opensearchpy/test_async/test_server_secured/test_security_plugin.py::TestSecurityPlugin::test_create_user FAILED [ 61%]
test_opensearchpy/test_async/test_server_secured/test_security_plugin.py::TestSecurityPlugin::test_create_user_with_body_param_empty PASSED [ 64%]
test_opensearchpy/test_async/test_server_secured/test_security_plugin.py::TestSecurityPlugin::test_create_user_with_role FAILED [ 67%]
test_opensearchpy/test_async/test_server_secured/test_security_plugin.py::TestSecurityPlugin::test_delete_role FAILED [ 70%]
test_opensearchpy/test_async/test_server_secured/test_security_plugin.py::TestSecurityPlugin::test_delete_user FAILED [ 74%]
test_opensearchpy/test_async/test_server_secured/test_security_plugin.py::TestSecurityPlugin::test_get_role FAILED [ 77%]
test_opensearchpy/test_async/test_server_secured/test_security_plugin.py::TestSecurityPlugin::test_get_user FAILED [ 80%]
test_opensearchpy/test_async/test_server_secured/test_security_plugin.py::TestSecurityPlugin::test_health PASSED [ 83%]
test_opensearchpy/test_async/test_server_secured/test_security_plugin.py::TestSecurityPlugin::test_health_check PASSED [ 87%]
test_opensearchpy/test_async/test_server_secured/test_security_plugin.py::TestSecurityPlugin::test_update_audit_config FAILED [ 90%]
test_opensearchpy/test_async/test_server_secured/test_security_plugin.py::TestSecurityPlugin::test_update_audit_configuration FAILED [ 93%]
test_opensearchpy/test_async/test_server_secured/test_security_plugin.py::TestSecurityPlugin::test_update_role FAILED [ 96%]
test_opensearchpy/test_async/test_server_secured/test_security_plugin.py::TestSecurityPlugin::test_update_user FAILED [100%]
______________ TestSecurityPlugin.test_update_audit_configuration ______________

self = <test_opensearchpy.test_server_secured.test_security_plugin.TestSecurityPlugin testMethod=test_update_audit_configuration>

    def test_update_audit_configuration(self) -> None:
>       response = self.client.security.update_audit_configuration(
            body=self.AUDIT_CONFIG_SETTINGS
        )

test_opensearchpy/test_server_secured/test_security_plugin.py:214: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
opensearchpy/client/utils.py:181: in _wrapped
    return func(*args, params=params, headers=headers, **kwargs)
opensearchpy/client/security.py:976: in update_audit_configuration
    return self.transport.perform_request(
opensearchpy/transport.py:448: in perform_request
    raise e
opensearchpy/transport.py:409: in perform_request
    status, headers_response, data = connection.perform_request(
opensearchpy/connection/http_urllib3.py:290: in perform_request
    self._raise_error(
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <Urllib3HttpConnection: https://instance:9200>, status_code = 500
raw_data = '{"status":"INTERNAL_SERVER_ERROR","message":"Error [instance][172.18.0.2:9300][indices:data/write/bulk[s][p]]"}'

What is the expected behavior?

Integration tests to be reliable.

@dblock dblock added bug Something isn't working untriaged Need triage and removed untriaged Need triage labels Nov 21, 2023
@github-actions github-actions bot added the untriaged Need triage label Nov 21, 2023
@saimedhi saimedhi removed the untriaged Need triage label Nov 21, 2023
@dblock dblock changed the title [BUG] integration tests for 2.0.1 flaky [BUG] security plugin integration tests for 2.0.1 and 2.1.0 flaky Nov 21, 2023
@peternied
Copy link
Member

peternied commented Nov 21, 2023

I looked at the run, can't see the contents of the opensearch.log - that would be where the root cause of the issue could be found as it will include exception information for troubleshooting. Can the test runs be updated to capture that information?

@dblock
Copy link
Member Author

dblock commented Nov 22, 2023

Might be related to opensearch-project/security#1961. Will look at extracting the OpenSearch logs, thanks @peternied.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants