Skip to content

feat: adding Save/Load FGA Resources Details MGMT APIs #562

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 2 commits into from
May 8, 2025

Conversation

yosiharan
Copy link
Contributor

@yosiharan yosiharan commented May 7, 2025

Related Issues

Required for: https://github.com/descope/etc/issues/9671

Related PRs

Depends on: https://github.com/descope/managementservice/pull/2083

Description

Adding support for Save & Load FGA Resources Details MGMT APIs

Must

  • Tests
  • Documentation (if applicable)

@yosiharan yosiharan marked this pull request as draft May 7, 2025 12:09
Copy link

github-actions bot commented May 7, 2025

Coverage report

The coverage rate went from 97.9% to 97.91% ⬆️

100% of new lines are covered.

Diff Coverage details (click to unfold)

descope/management/common.py

100% of new lines are covered (100% of the complete file).

descope/management/fga.py

100% of new lines are covered (100% of the complete file).

@yosiharan yosiharan requested review from orius123 and guyp-descope May 7, 2025 12:20
@yosiharan yosiharan marked this pull request as ready for review May 7, 2025 20:01
@yosiharan yosiharan requested a review from Copilot May 8, 2025 07:01
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds support for Save and Load FGA Resources Details Management APIs. It includes new client methods in the management module, corresponding endpoints in the common module, and tests covering both success and error scenarios.

  • Added load_resources_details and save_resources_details methods to DescopeClient.
  • Introduced corresponding endpoints in common.py.
  • Implemented tests for both success and error cases for the new APIs.

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
tests/management/test_fga.py Added tests for load and save FGA resources details API behavior.
descope/management/fga.py Implemented API client methods for loading and saving resource details.
descope/management/common.py Added new endpoint definitions for loading and saving resources.
Comments suppressed due to low confidence (1)

tests/management/test_fga.py:231

  • [nitpick] The variable name 'ids' is ambiguous given the context; renaming it to 'resource_identifiers' may improve clarity and consistency with the API method signature.
            ids = [

@yosiharan yosiharan enabled auto-merge (squash) May 8, 2025 07:07
@yosiharan yosiharan requested a review from omercnet May 8, 2025 07:07
@yosiharan yosiharan merged commit f073bf6 into main May 8, 2025
20 checks passed
@yosiharan yosiharan deleted the fga-resources-metadata branch May 8, 2025 10:12
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.

2 participants