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

[release-3.8] Use older versions of jsonschema and urllib3 for Lambda Layer #5874

Closed
wants to merge 1 commit into from

Conversation

hanwen-pcluste
Copy link
Contributor

@hanwen-pcluste hanwen-pcluste commented Nov 22, 2023

Use older versions of jsonschema and urllib3 for Lambda Layer

Pcluster API execution fails if using the latest version of the packages.

The root cause of both issues are because Lambda Function environment has older boto3/botocore versions than latest released versions on PyPi.
Specifically, when we prepare lambda layers, the dependencies are installed according to new boto3/botocore versions. When running the Lambda function, the older boto3/botocore are not compatible with the dependencies we provide in Lambda layers.

Signed-off-by: Hanwen [email protected]

Checklist

  • Make sure you are pointing to the right branch.
  • If you're creating a patch for a branch other than develop add the branch name as prefix in the PR title (e.g. [release-3.6]).
  • Check all commits' messages are clear, describing what and why vs how.
  • Make sure to have added unit tests or integration tests to cover the new/modified code.
  • Check if documentation is impacted by this change.

Please review the guidelines for contributing and Pull Request Instructions.

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

@hanwen-pcluste hanwen-pcluste requested review from a team as code owners November 22, 2023 00:14
Copy link

codecov bot commented Nov 22, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (531d7ea) 90.03% compared to head (eb87266) 90.06%.
Report is 8 commits behind head on release-3.8.

Additional details and impacted files
@@               Coverage Diff               @@
##           release-3.8    #5874      +/-   ##
===============================================
+ Coverage        90.03%   90.06%   +0.02%     
===============================================
  Files              180      180              
  Lines            15652    15654       +2     
===============================================
+ Hits             14093    14099       +6     
+ Misses            1559     1555       -4     
Flag Coverage Δ
unittests 90.06% <ø> (+0.02%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

gmarciani
gmarciani previously approved these changes Nov 22, 2023
@hanwen-pcluste hanwen-pcluste force-pushed the release-3.8 branch 2 times, most recently from 3c785a8 to 153a05e Compare November 22, 2023 16:42
@hanwen-pcluste hanwen-pcluste added the skip-changelog-update Disables the check that enforces changelog updates in PRs label Nov 22, 2023
Pcluster API execution fails if using the latest version of the packages.

* jsonschema introduced breaking changes in 4.18.0 in July 2023. Therefore, we use version 4.17.3. aws/aws-cdk#26300
* urllib released 2.0 in May 2023. Pcluster API has been released with urllib 1.x. Therefore, we use version 1.x.

The root cause of both issues are because Lambda Function environment has older boto3/botocore versions than latest released versions on PyPi.
Specifically, when we prepare lambda layers, the dependencies are installed according to new boto3/botocore versions. When running the Lambda function, the older boto3/botocore are not compatible with the dependencies we provide in Lambda layers.

Signed-off-by: Hanwen <[email protected]>
@hanwen-pcluste
Copy link
Contributor Author

Seems like Lambda Function is gradually upgrading their runtime. We may don't have to merge the PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
skip-changelog-update Disables the check that enforces changelog updates in PRs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants