Skip to content

Conversation

@petertriho
Copy link

This PR

  • Adds AWS SSM Provider for OpenFeature Python SDK

Notes

  • Had to relax types-requests versions due to resolution issue with boto3

@petertriho petertriho requested review from a team as code owners January 18, 2026 08:38
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @petertriho, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request significantly enhances the OpenFeature Python SDK by adding a new provider for AWS Systems Manager Parameter Store. This integration enables developers to leverage AWS SSM as a backend for managing feature flags, benefiting from its secure and centralized parameter management capabilities. The new provider is designed for flexibility, offering both synchronous and asynchronous operations, along with configurable caching mechanisms to ensure efficient flag retrieval. It also includes comprehensive support for various flag data types and handles the mapping of flag keys to SSM parameter names, making it a robust solution for feature flag management in AWS environments.

Highlights

  • New AWS SSM Provider: Introduces a new OpenFeature provider for Python that integrates with AWS Systems Manager (SSM) Parameter Store, allowing feature flags to be managed directly within SSM.
  • Synchronous and Asynchronous Support: The provider supports both synchronous and asynchronous flag evaluation, catering to different application architectures.
  • Configurable Caching: Includes flexible caching strategies (LRU and TTL) to optimize performance and reduce calls to AWS SSM, with the option to disable caching entirely.
  • Comprehensive Flag Type Handling: Supports all OpenFeature flag types (boolean, string, integer, float, object) with robust parsing logic and error handling for type mismatches or invalid formats.
  • Dependency Version Adjustment: Relaxed the version requirement for types-requests in existing providers (flipt, ofrep) to resolve a potential dependency conflict with boto3.
Ignored Files
  • Ignored by pattern: .github/workflows/** (1)
    • .github/workflows/build.yml
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a new provider for AWS Systems Manager (SSM) Parameter Store. The implementation is well-structured, separating concerns into a service layer for AWS interaction, parsers for type conversion, and the provider itself. The caching implementation is flexible, supporting both LRU and TTL strategies, and can be disabled. The provider supports both synchronous and asynchronous operations. The accompanying documentation is thorough, and the test coverage is excellent, including unit, integration, and async tests.

I have a few suggestions to further improve the code's maintainability and clarity by removing some redundant validation logic, improving type hints, and clarifying a documentation example. Overall, this is a high-quality contribution.

@petertriho
Copy link
Author

/gemini review

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a new aws-ssm provider for the OpenFeature Python SDK, a valuable addition for users leveraging AWS Parameter Store for feature flagging. The implementation is robust, featuring both synchronous and asynchronous support, configurable caching (LRU and TTL), and clear separation of concerns between the service layer, parsers, and the provider itself. The error handling is particularly well-done, mapping specific AWS errors to OpenFeature exceptions. The accompanying test suite is comprehensive, covering unit, integration, and caching scenarios, which provides high confidence in the provider's correctness. I've included a couple of minor suggestions to improve configuration file clarity and documentation. Overall, this is an excellent contribution.

"pytest>=8.4.0,<9.0.0",
"requests-mock>=1.12.0,<2.0.0",
"types-requests>=2.32.0,<3.0.0",
"types-requests>=2.28.0,<3.0.0",
Copy link
Member

Choose a reason for hiding this comment

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

Is this change necessary? This will cause the release notes to look weird, since they are generated for each artifact based on modified file paths.

Copy link
Author

@petertriho petertriho Jan 30, 2026

Choose a reason for hiding this comment

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

@toddbaert unfortunately, I think it is necessary, I can't get uv sync --all-packages to work without doing so.

I realised types-requests>=2.31.0,<3.0.0 works as well. The issue is on python 3 all the boto (boto3, aioboto3, moto) libraries requires urllib3<1.27.

I'm open to suggestions on how we can resolve this? Maybe I can open a separate PR to lower the types-requests dependencies first (and bump the versions)?

Copy link
Member

@toddbaert toddbaert Jan 30, 2026

Choose a reason for hiding this comment

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

@petertriho Yes, can you open a PR to make that change, make the title like chore: xxxx and make that change for the other 2 providers, then I will merge that and you can rebase on it.

"pytest>=8.4.0,<9.0.0",
"requests-mock>=1.12.0,<2.0.0",
"types-requests>=2.32.0,<3.0.0",
"types-requests>=2.28.0,<3.0.0",
Copy link
Member

Choose a reason for hiding this comment

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

@toddbaert
Copy link
Member

@petertriho can you add yourself in the component owners for maintenance purposes?

class _PatchedAWSResponseContent:
"""Patched version of `botocore.awsrequest.AWSResponse.content`."""

content: bytes | Awaitable[bytes]
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
content: bytes | Awaitable[bytes]
content: Union[bytes, Awaitable[bytes]]

I think this is needed for 3.9

Copy link
Member

Choose a reason for hiding this comment

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

(I think this is causing the CI failure)

Copy link
Author

Choose a reason for hiding this comment

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

Thanks, fixed

Copy link
Member

@toddbaert toddbaert left a comment

Choose a reason for hiding this comment

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

I left a few small nits.

I would merge this except for the changes in other packages (and what I think might be an issue for Python 3.9).

@petertriho Thanks a lot!

@codecov
Copy link

codecov bot commented Jan 29, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.39%. Comparing base (9ad25a4) to head (4c58d5a).
⚠️ Report is 3 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #331      +/-   ##
==========================================
- Coverage   95.53%   93.39%   -2.15%     
==========================================
  Files          16        6      -10     
  Lines         874      227     -647     
==========================================
- Hits          835      212     -623     
+ Misses         39       15      -24     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@petertriho
Copy link
Author

@petertriho can you add yourself in the component owners for maintenance purposes?

done

@petertriho petertriho marked this pull request as ready for review January 30, 2026 08:39
Had to relax `types-requests` versions due to resolution issue with boto3

Signed-off-by: Peter Tri Ho <mail@petertriho.com>
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.

5 participants