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

Add support for stringArray and operationContextParams #3301

Merged

Conversation

alexgromero
Copy link
Contributor

@alexgromero alexgromero commented Nov 14, 2024

This PR introduces support for the stringArray type parameter and the new operationContextParams trait.

  • Support for stringArray Parameters: Adds the stringArray type, which allows a list of UTF-8 encoded strings.
  • New operationContextParams Trait: Introduces the operationContextParams trait, which defines context parameters that must be bound to values using a limited subset of JMESPath expressions. This trait targets an operation shape.
  • List support in lru_cache_weakref: Adds the ability to take lists as input to lru_cache_weakref. All inputs to a cache must be immutable, so this change is necessary to support caching stringArray types. Any future lists will need to be similarly cast to a tuple to take advantage of the cache, so this centralizes the logic.

@codecov-commenter
Copy link

codecov-commenter commented Nov 14, 2024

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

Attention: Patch coverage is 81.25000% with 3 lines in your changes missing coverage. Please review.

Project coverage is 93.18%. Comparing base (0af86dc) to head (c7b1f6a).
Report is 114 commits behind head on develop.

Files with missing lines Patch % Lines
botocore/regions.py 66.66% 3 Missing ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #3301      +/-   ##
===========================================
- Coverage    93.19%   93.18%   -0.01%     
===========================================
  Files           66       66              
  Lines        14376    14412      +36     
===========================================
+ Hits         13397    13430      +33     
- Misses         979      982       +3     

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

@alexgromero alexgromero force-pushed the add-string-array-context-param branch from b8f4f0d to 85adf28 Compare November 21, 2024 20:11
@alexgromero alexgromero changed the title Add string array context params Add support for stringArray and operationContextParams Nov 21, 2024
Copy link
Contributor

@jonathan343 jonathan343 left a comment

Choose a reason for hiding this comment

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

Looks like a great start! I left some feedback and questions that I think should be addressed. Let me know if you have any questions.

botocore/endpoint_provider.py Show resolved Hide resolved
botocore/endpoint_provider.py Show resolved Hide resolved
botocore/regions.py Show resolved Hide resolved
botocore/utils.py Show resolved Hide resolved
Comment on lines 4 to 6
"ResourceList": {
"type": "stringArray"
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Related to my pervious comment: We should included tests for string array parameters that define default values.

Copy link
Contributor

@jonathan343 jonathan343 left a comment

Choose a reason for hiding this comment

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

LGTM 🚀

@alexgromero alexgromero merged commit cacd0e9 into boto:develop Dec 6, 2024
40 checks passed
aws-sdk-python-automation added a commit that referenced this pull request Dec 9, 2024
* release-1.35.77:
  Bumping version to 1.35.77
  Update endpoints model
  Update to latest models
  Bump aws-actions/stale-issue-cleanup
  Bump codecov/codecov-action from 5.0.2 to 5.1.1
  Add support for stringArray and operationContextParams (#3301)
hswong3i pushed a commit to alvistack/boto-botocore that referenced this pull request Dec 10, 2024
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.

4 participants