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

applying boto3==1.34.35 in DeployFrontend action #1054

Merged
merged 2 commits into from
Feb 14, 2024

Conversation

anandsumit2000
Copy link
Contributor

@anandsumit2000 anandsumit2000 commented Feb 12, 2024

Feature or Bugfix

  • Bugfix
  • Refactoring

Detail

  • Fix towards "Pipeline Failure: DeployFrontEnd Stage - cannot import name 'is_s3express_bucket' from 'botocore.utils'"

    • Observed aforementioned error lately.
    • Explicitly added s3transfer==0.8.0 in DeployFrontend stage to fulfil this deficiency.
      • Build and Deploy successsful and Pipeline finished successfully.
    • Analysis of CodeBuild logs deduced a conclusion that irrespective of defining boto3==1.20.50 , botocore==1.34.39 was being pulled. However current version of botocore is 1.34.39. Logs claim that AWS CLI does not support 1.34.39. (Apologies, I forgot to pull logs).
      • So applied boto3==1.34.35 as a result stage pulled botocore botocore<1.35.0,>=1.34.35 in /root/.pyenv/versions/3.9.17/lib/python3.9/site-packages (from boto3==1.34.35) (1.34.35)
      • No new dependency conflicts discovered after this.
  • Hence Recommending the said version revision to boto3.

Relates

Security

Please answer the questions below briefly where applicable, or write N/A. Based on
OWASP 10.

N/A

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@dlpzx
Copy link
Contributor

dlpzx commented Feb 13, 2024

Thanks for opening a PR @anandsumit2000. I have been looking at your issue and it seems the root cause is a mismatch of boto and botocore versions as explained in this AWS re:post. We will do some testing with the current version using Amazon Linux 2_5

@anandsumit2000
Copy link
Contributor Author

Yes thats exactly the tldr of my PR.

@dlpzx
Copy link
Contributor

dlpzx commented Feb 13, 2024

Related issue opened in the boto repository: boto/botocore#3105

@dlpzx
Copy link
Contributor

dlpzx commented Feb 13, 2024

Hi @anandsumit2000, we read your PR sorry if it seemed otherwise. It is great when PRs are well described. I just wanted to point out that your conclusion from the CodeBuild logs analysis is the same one as the one provided by the AWS support team and it seems to be affecting Python 3.9 runtimes only. I tested data.all v2.2 that uses Amazon Linux 2 v5 and the pipeline runs successfully because the Python runtime is 3.11. We will do more testing on the last version and get back to you if the PR needs changes

@dlpzx
Copy link
Contributor

dlpzx commented Feb 14, 2024

Hi @anandsumit2000, I have added the upgraded version of boto3 to all other CodeBuild stages in pipeline.py. We tested these changes in some of our deployments so the PR is approved and ready to be merged!
Thanks for the troubleshooting, the logging and for opening a PR.

As next steps, we should also upgrade the version of boto3 used in the compute components of the backend and optimize the way we are managing boto versions: hardcoded in 4 different places + requirements.txt in diffferent places of the project.

Copy link
Contributor

@dlpzx dlpzx left a comment

Choose a reason for hiding this comment

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

Tested

@dlpzx dlpzx merged commit 54d444c into data-dot-all:main Feb 14, 2024
9 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.

2 participants