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

Bump boto3 to 1.34.34 #27

Merged
merged 1 commit into from
Feb 5, 2024
Merged

Conversation

noCharger
Copy link
Contributor

@noCharger noCharger commented Feb 3, 2024

Description

This is to fix the doctest github action in sql plugin which failed since last Dec.

> Task :doctest:doctest FAILED
======================================================================
ERROR: test_docs (unittest.loader._FailedTest.test_docs)
----------------------------------------------------------------------
ImportError: Failed to import test module: test_docs
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/unittest/loader.py", line 137, in loadTestsFromName
    module = __import__(module_name)
             ^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/runner/work/sql/sql/doctest/test_docs.py", line 16, in <module>
    from opensearch_sql_cli.opensearch_connection import OpenSearchConnection
  File "/Users/runner/work/sql/sql/doctest/sql-cli/src/opensearch_sql_cli/opensearch_connection.py", line 6, in <module>
    import boto3
  File "/Users/runner/work/sql/sql/doctest/.venv/lib/python3.12/site-packages/boto3/__init__.py", line 16, in <module>
    from boto3.session import Session
  File "/Users/runner/work/sql/sql/doctest/.venv/lib/python3.12/site-packages/boto3/session.py", line 17, in <module>
    import botocore.session
  File "/Users/runner/work/sql/sql/doctest/.venv/lib/python3.12/site-packages/botocore/session.py", line 29, in <module>
    import botocore.configloader
  File "/Users/runner/work/sql/sql/doctest/.venv/lib/python3.12/site-packages/botocore/configloader.py", line 19, in <module>
    from botocore.compat import six
  File "/Users/runner/work/sql/sql/doctest/.venv/lib/python3.12/site-packages/botocore/compat.py", line 33, in <module>
    from botocore.vendored.six.moves import http_client
ModuleNotFoundError: No module named 'botocore.vendored.six.moves'

Root cause:
Boto3 has removed six in its later versions: boto/botocore#2806. However, the cli plugin is still utilizing a stale version. Furthermore, opensearch-py uses boto3 version 1.28 or higher. https://github.com/opensearch-project/opensearch-py/blob/94e33c68990fc62906f2dc7239c1eeb2eae3b79e/samples/pyproject.toml#L12

Verification:
This change is tested on sql plugin where all CI passed opensearch-project/sql#2499

Check List

  • New functionality includes testing.
    • All tests pass, including unit test, integration test and doctest
  • New functionality has been documented.
    • New functionality has javadoc added
    • New functionality has user manual doc added
  • Commits are signed per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

@noCharger noCharger changed the title test boto Bump boto3 to 1.34.34 Feb 3, 2024
Signed-off-by: Louis Chu <clingzhi@amazon.com>
@vamsimanohar vamsimanohar merged commit d4e7789 into opensearch-project:main Feb 5, 2024
5 checks passed
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.

3 participants