fix(sdk): make okta SDK an optional extra to avoid downstream resolution conflicts#11159
Open
AdriiiPRodri wants to merge 1 commit into
Open
fix(sdk): make okta SDK an optional extra to avoid downstream resolution conflicts#11159AdriiiPRodri wants to merge 1 commit into
AdriiiPRodri wants to merge 1 commit into
Conversation
Contributor
|
✅ All necessary |
Contributor
|
✅ Conflict Markers Resolved All conflict markers have been successfully resolved in this pull request. |
c8d4fab to
8bc2dd7
Compare
Contributor
🔒 Container Security ScanImage: 📊 Vulnerability Summary
5 package(s) affected
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #11159 +/- ##
==========================================
+ Coverage 84.95% 88.70% +3.75%
==========================================
Files 1752 1398 -354
Lines 58077 42429 -15648
==========================================
- Hits 49338 37637 -11701
+ Misses 8739 4792 -3947 Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Context
The new Okta provider added in #11079 pulls
okta==3.4.2. That PyPI name is shared with a legacyokta0.0.x package that downstream consumers (e.g.cartography==0.135.0, used byprowler-cloud/prowler-cloud) still pin transitively asokta<1.0.0. As soon as #11079 hit master, every Docker build ofprowler-cloud/prowler-cloud/api(which pullsprowler @ git+...@master) started failing with:Description
Move
okta==3.4.2out of the core[project.dependencies]into a new[project.optional-dependencies] okta = ["okta==3.4.2"]extra so consumers that do not need the Okta provider can opt out and avoid the resolution conflict. The Okta SDK imports are already isolated toprowler/providers/okta/okta_provider.pyandprowler/providers/okta/lib/service/service.py, both of which are only loaded when the Okta provider is actually instantiated, so omitting the extra does not break import-time behavior elsewhere in the SDK.To keep CI, the SDK image and end-user installs working with the provider enabled, install everywhere the provider is exercised:
Dockerfile:poetry install --compile --all-extras.extrasinput on.github/actions/setup-python-poetry/action.yml(accepts a CSV list orall), threaded through topoetry installas-E .../--all-extras.sdk-tests.yml,sdk-security.yml,sdk-code-quality.yml: passextras: allso vulture/pylint/pytest can still importokta_provider.py.poetry.lockregenerated:oktaand its transitive deps (aenum,jwcrypto,pycryptodomex,pydash,xmltodict) marked optional withmarkers = "extra == \"okta\"".End users now need
pip install prowler[okta](orpoetry install --all-extras) to enable the Okta provider.Steps to review
pyproject.tomlmove:okta==3.4.2is gone from[project.dependencies]and present under[project.optional-dependencies] okta.poetry install --no-root --dry-run-> okta skipped.poetry install --no-root --all-extras --dry-run-> okta installed.--all-extras).extras: allso the Okta tests (tests/providers/okta) still resolvefrom okta.client import Client.poetry.lockonly changes okta and its transitive deps (optional + extra marker), no other version bumps.Checklist
tests/providers/oktastill run viaextras: all.)README.md(documentingpip install prowler[okta]for end users).prowler/CHANGELOG.md(Changed section under 5.27.0).SDK/CLI
License
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.