Skip to content

feat(modules): add OpenFGA module #762

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

Merged
merged 3 commits into from
Jul 21, 2025

Conversation

giggsoff
Copy link
Contributor

Add OpenFGA testcontainer module

Add OpenFGA testcontainer module

Signed-off-by: Petr Fedchenkov <[email protected]>
@cbernard-rm25
Copy link

This is super useful. I am trying to run something like this locally but not having much success. Would love to see this native to testcontainers-python.

@Tranquility2
Copy link
Contributor

Closed #806

@Tranquility2 Tranquility2 linked an issue Jul 2, 2025 that may be closed by this pull request
@Tranquility2
Copy link
Contributor

Tranquility2 commented Jul 2, 2025

So we got:

modules/openfga/tests/test_openfga.py:1: in <module>
    from testcontainers.openfga import OpenFGAContainer
modules/openfga/testcontainers/openfga/__init__.py:17: in <module>
    from openfga_sdk import ClientConfiguration
E   ImportError: cannot import name 'ClientConfiguration' from 'openfga_sdk'

looks like a completability issue.

Checking the lock file we get:

name = "openfga-sdk"
version = "0.1.1"

This is from Jan 18, 2023

@Tranquility2
Copy link
Contributor

Tranquility2 commented Jul 2, 2025

poetry add openfga_sdk==0.9.4

Updating dependencies
Resolving dependencies... (0.0s)

The current project's supported Python range (>=3.9,<4.0) is not compatible with some of the required packages Python requirement:
  - openfga-sdk requires Python >=3.10, so it will not be installable for Python >=3.9,<3.10

https://github.com/openfga/python-sdk/blob/main/CHANGELOG.md#v020

@alexanderankin
Copy link
Member

this is currently blocked by python3.9 support.

so because python3.9 is not supported the latest openfga sdk, and we support python3.9, poetry installs 0.1.1, which is not like 0.9.5 at all.

i think this is solved by simply dropping python3.9 support. i think this may also be solved by not installing openfga on python < 3.10

any thoughts?

@Tranquility2
Copy link
Contributor

@alexanderankin checkout #846

Copy link

codecov bot commented Jul 21, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Please upload report for BASE (main@ef65bd1). Learn more about missing BASE report.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #762   +/-   ##
=======================================
  Coverage        ?   83.90%           
=======================================
  Files           ?       13           
  Lines           ?      752           
  Branches        ?      122           
=======================================
  Hits            ?      631           
  Misses          ?       92           
  Partials        ?       29           

☔ 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.

@alexanderankin alexanderankin merged commit 0b7b482 into testcontainers:main Jul 21, 2025
15 checks passed
alexanderankin pushed a commit that referenced this pull request Jul 21, 2025
🤖 I have created a release *beep* *boop*
---


##
[4.12.0](testcontainers-v4.11.0...testcontainers-v4.12.0)
(2025-07-21)


### Features

* **main:** New Testcontainers Python Docs Site
([#822](#822))
([a6bdf0e](a6bdf0e))
* make config monkeypatchable, fix config related startup issues
([#833](#833))
([ff6a32d](ff6a32d))
* **modules:** add OpenFGA module
([#762](#762))
([0b7b482](0b7b482))
* set multiple variables via keyword args
([#804](#804))
([1532df5](1532df5))


### Bug Fixes

* **core:** mypy
([#810](#810))
([b816762](b816762))
* Enable mypy in the CI
([#842](#842))
([ef65bd1](ef65bd1))
* just use the getLogger API and do not override logger settings
([#836](#836))
([f467c84](f467c84))


### Documentation

* missing compose html from old docs
([#776](#776))
([d749fc6](d749fc6))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.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.

New Container: OpenFGA
4 participants