Skip to content

Conversation

@gmazoyer
Copy link
Contributor

@gmazoyer gmazoyer commented Aug 25, 2025

This is a simple change that adds a warning when using a client's method with the named parameter raise_for_error set. This parameter must be removed later.

Summary by CodeRabbit

  • Documentation

    • Documented deprecation of explicitly setting raise_for_error (now optional); guidance to use try/except for custom HTTP error handling and note that GraphQL errors still raise regardless.
  • Chores

    • Emit deprecation warnings when raise_for_error is provided (non-null) in both sync and async client calls.
    • Made raise_for_error optional: unset or true → HTTP errors raised; false → HTTP errors not raised.

@coderabbitai
Copy link

coderabbitai bot commented Aug 25, 2025

Walkthrough

Added warnings import and a new helper raise_for_error_deprecation_warning(value: bool | None). Updated many public async and sync signatures (execute_graphql, query_gql_query, get_diff_summary, allocate_next_ip_address, allocate_next_ip_prefix) to accept raise_for_error: bool | None = None across InfrahubClient and InfrahubClientSync. When raise_for_error is None or True HTTP errors are raised via resp.raise_for_status(), when False they are not; GraphQL errors still raise GraphQLError. A DeprecationWarning is emitted if raise_for_error is not None. Added changelog entry deprecating raise_for_error=False.

Tip

🔌 Remote MCP (Model Context Protocol) integration is now available!

Pro plan users can now connect to remote MCP servers from the Integrations page. Connect with popular remote MCPs such as Notion and Linear to add more context to your reviews and chats.

✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch gma-20250825-ihs154

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbit in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbit in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbit gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbit read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbit help to get the list of available commands.

Other keywords and placeholders

  • Add @coderabbit ignore or @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbit summary or Summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbit or @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@codecov
Copy link

codecov bot commented Aug 25, 2025

Codecov Report

❌ Patch coverage is 66.66667% with 4 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
infrahub_sdk/client.py 66.66% 2 Missing and 2 partials ⚠️
@@             Coverage Diff             @@
##           develop     #508      +/-   ##
===========================================
- Coverage    75.83%   75.75%   -0.09%     
===========================================
  Files          100      100              
  Lines         9303     8854     -449     
  Branches      1826     1733      -93     
===========================================
- Hits          7055     6707     -348     
+ Misses        1756     1671      -85     
+ Partials       492      476      -16     
Flag Coverage Δ
integration-tests 34.68% <33.33%> (-1.42%) ⬇️
python-3.10 48.20% <50.00%> (-1.31%) ⬇️
python-3.11 48.22% <50.00%> (-1.29%) ⬇️
python-3.12 48.20% <50.00%> (-1.29%) ⬇️
python-3.13 48.18% <50.00%> (-1.31%) ⬇️
python-3.9 46.87% <25.00%> (-1.06%) ⬇️
python-filler-3.12 25.09% <16.66%> (+0.81%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
infrahub_sdk/client.py 69.64% <66.66%> (+0.15%) ⬆️

... and 8 files with indirect coverage changes

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

@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Aug 25, 2025

Deploying infrahub-sdk-python with  Cloudflare Pages  Cloudflare Pages

Latest commit: 74dffe1
Status: ✅  Deploy successful!
Preview URL: https://49831d03.infrahub-sdk-python.pages.dev
Branch Preview URL: https://gma-20250825-ihs154.infrahub-sdk-python.pages.dev

View logs

@gmazoyer gmazoyer marked this pull request as ready for review August 25, 2025 12:38
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (1)
tests/unit/sdk/test_client.py (1)

805-835: Use realistic GraphQL error shape and assert the message; optionally validate the raised error content.

GraphQL errors are typically dict objects with a message field, e.g. {"errors": [{"message": "foo"}]}. Mocking as a bare list of strings works with current code but diverges from spec and from how you extract messages elsewhere (e.g., error.get("message") patterns).

Recommended tweaks in this test:

  • Mock errors as a list of dicts with a message.
  • When asserting the non-raising path, assert response[0]["message"] == "foo".
  • Optionally, capture the exception and assert its .errors payload.

Apply within this hunk:

-    httpx_mock.add_response(method="POST", json={"errors": ["foo"]}, is_reusable=True)
+    httpx_mock.add_response(method="POST", json={"errors": [{"message": "foo"}]}, is_reusable=True)
@@
-    if client_type == "standard":
-        with pytest.raises(GraphQLError):
-            await clients.standard.execute_graphql(query=query, raise_for_error=True)
+    if client_type == "standard":
+        with pytest.raises(GraphQLError) as excinfo:
+            await clients.standard.execute_graphql(query=query, raise_for_error=True)
@@
-        with pytest.raises(GraphQLError):
-            clients.sync.execute_graphql(query=query, raise_for_error=True)
+        with pytest.raises(GraphQLError) as excinfo:
+            clients.sync.execute_graphql(query=query, raise_for_error=True)
@@
-    assert response
-    assert response[0] == "foo"
+    assert response
+    assert response[0]["message"] == "foo"
+    # Optional: validate error content on the raised path as well
+    # assert excinfo.value.errors[0]["message"] == "foo"

Nice-to-have: add a sibling test that sets status_code=400 with the same error body to ensure HTTP status isn’t raised when raise_for_error=False (since raise_for_status() is gated by the flag).

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between c1a1fb0 and 003fb3a.

📒 Files selected for processing (2)
  • infrahub_sdk/client.py (2 hunks)
  • tests/unit/sdk/test_client.py (2 hunks)
🧰 Additional context used
📓 Path-based instructions (4)
**/*.py

📄 CodeRabbit inference engine (CLAUDE.md)

When implementing Infrahub checks, subclass InfrahubCheck and override validate(data); do not implement or rely on a check() method

Files:

  • infrahub_sdk/client.py
  • tests/unit/sdk/test_client.py
infrahub_sdk/client.py

📄 CodeRabbit inference engine (CLAUDE.md)

infrahub_sdk/client.py: Use HTTPX for transport with proxy support (single proxy or HTTP/HTTPS mounts)
Support authentication via API tokens or JWT with automatic refresh

Files:

  • infrahub_sdk/client.py
tests/unit/**/*.py

📄 CodeRabbit inference engine (CLAUDE.md)

Place and write unit tests under tests/unit/ (isolated component tests)

Files:

  • tests/unit/sdk/test_client.py
tests/**/*.py

📄 CodeRabbit inference engine (CLAUDE.md)

Use the custom pytest plugin (infrahub_sdk.pytest_plugin) fixtures for clients, configuration, and Infrahub-specific testing

Files:

  • tests/unit/sdk/test_client.py
🧠 Learnings (2)
📚 Learning: 2025-08-24T13:35:12.974Z
Learnt from: CR
PR: opsmill/infrahub-sdk-python#0
File: CLAUDE.md:0-0
Timestamp: 2025-08-24T13:35:12.974Z
Learning: Applies to infrahub_sdk/client.py : Use HTTPX for transport with proxy support (single proxy or HTTP/HTTPS mounts)

Applied to files:

  • tests/unit/sdk/test_client.py
📚 Learning: 2025-08-24T13:35:12.974Z
Learnt from: CR
PR: opsmill/infrahub-sdk-python#0
File: CLAUDE.md:0-0
Timestamp: 2025-08-24T13:35:12.974Z
Learning: Applies to tests/**/*.py : Use the custom pytest plugin (infrahub_sdk.pytest_plugin) fixtures for clients, configuration, and Infrahub-specific testing

Applied to files:

  • tests/unit/sdk/test_client.py
🧬 Code graph analysis (2)
infrahub_sdk/client.py (1)
infrahub_sdk/exceptions.py (1)
  • GraphQLError (40-46)
tests/unit/sdk/test_client.py (2)
infrahub_sdk/exceptions.py (1)
  • GraphQLError (40-46)
infrahub_sdk/client.py (2)
  • execute_graphql (877-959)
  • execute_graphql (1623-1705)
🔇 Additional comments (2)
infrahub_sdk/client.py (1)

1699-1702: I’ve added scripts to extract and compare the error-handling blocks for both the async and sync execute_graphql methods. Once results are available, we can confirm whether the sync variant still returns a union type and lacks the updated docstring or guards, and then update the review accordingly.

tests/unit/sdk/test_client.py (1)

7-7: LGTM: GraphQLError import is needed for the new tests.

@ogenstad
Copy link
Contributor

We'd want a news fragment for this as well to indicate the bug that was addressed.

@gmazoyer gmazoyer changed the title IHS-154 Do not raise error when raise_for_error = False IHS-154 Deprecate using raise_for_error = False Aug 26, 2025
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🧹 Nitpick comments (4)
infrahub_sdk/client.py (4)

905-910: Point deprecation warning at the caller

Use stacklevel=2 so the warning points to user code.

-            warnings.warn(
+            warnings.warn(
                 "Using `raise_for_error` is deprecated, use `try/except` to handle errors.",
                 DeprecationWarning,
-                stacklevel=1,
+                stacklevel=2,
             )

1656-1661: Point sync deprecation warning at caller

Same stacklevel adjustment.

-            warnings.warn(
+            warnings.warn(
                 "Using `raise_for_error` is deprecated, use `try/except` to handle errors.",
                 DeprecationWarning,
-                stacklevel=1,
+                stacklevel=2,
             )

888-892: Minor typo in docstring

“reacheable” → “reachable”.

-        If retry_on_failure is True, the query will retry until the server becomes reacheable.
+        If retry_on_failure is True, the query will retry until the server becomes reachable.

1170-1176: DeprecationWarning on raise_for_error will surface at call sites

We’ve confirmed there are multiple call sites where helpers still pass raise_for_error through, for example:

  • infrahub_sdk/client.py:1174, 1474, 2319, 2466, 2615
  • infrahub_sdk/ctl/validate.py:89
  • infrahub_sdk/ctl/utils.py:125

Each of these will now emit a DeprecationWarning at runtime. If that’s your intent—to remind consumers that raise_for_error is deprecated—you can leave them as-is. Otherwise, I recommend removing the raise_for_error parameter from these helper calls in a follow-up PR to prevent unexpected warnings.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 25a32a2 and 261a13e.

📒 Files selected for processing (1)
  • infrahub_sdk/client.py (7 hunks)
🧰 Additional context used
📓 Path-based instructions (2)
**/*.py

📄 CodeRabbit inference engine (CLAUDE.md)

When implementing Infrahub checks, subclass InfrahubCheck and override validate(data); do not implement or rely on a check() method

Files:

  • infrahub_sdk/client.py
infrahub_sdk/client.py

📄 CodeRabbit inference engine (CLAUDE.md)

infrahub_sdk/client.py: Use HTTPX for transport with proxy support (single proxy or HTTP/HTTPS mounts)
Support authentication via API tokens or JWT with automatic refresh

Files:

  • infrahub_sdk/client.py
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (6)
  • GitHub Check: integration-tests-latest-infrahub
  • GitHub Check: unit-tests (3.12)
  • GitHub Check: unit-tests (3.13)
  • GitHub Check: unit-tests (3.11)
  • GitHub Check: unit-tests (3.10)
  • GitHub Check: Cloudflare Pages
🔇 Additional comments (5)
infrahub_sdk/client.py (5)

7-7: Import for deprecation warnings — OK

Necessary and scoped import.


885-887: Signature change to Optional[bool] matches the deprecation direction

Good move to detect explicit usage via None default.


933-935: HTTP error raising gate — OK, but note behavior change when False

When False, 401/403/404 won’t be mapped to AuthenticationError/URLNotFoundError via raise_for_status; document this as it differs from the default path.

Would you like me to add a short note to the docstring explaining this edge case?


1636-1638: Sync signature parity — OK

Matches async variant and supports the same deprecation strategy.


1684-1686: HTTP error raising gate (sync) — OK, with same note

Behavior matches async; consider documenting the different exception mapping when False.

If desired, I can open a follow-up to align error-mapping behavior or explicitly document it.

gmazoyer and others added 3 commits August 27, 2025 15:50
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
@ogenstad
Copy link
Contributor

When looking through the SDK for other reasons I realise we have a number of methods that's using this raise_for_error for example .allocate_next_ip_prefix(), I think we need to deprecate those as well and avoid calling this deprecated parameter from those other methods as well.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (11)
infrahub_sdk/client.py (11)

887-971: raise_for_error=False can lead to silent HTTP errors and KeyError; map auth/404 and guard ‘data’ access

With raise_for_error=False, HTTPX won’t raise, so 401/403/404 bypass existing handlers and later response["data"] can KeyError. Map those statuses even when not raising, and guard missing ‘data’.

@@
-        if not resp:
+        if not resp:
             raise Error("Unexpected situation, resp hasn't been initialized.")
 
-        response = decode_json(response=resp)
+        if raise_for_error is False:
+            if resp.status_code in (401, 403):
+                response = decode_json(response=resp)
+                messages = [error.get("message") for error in response.get("errors", [])]
+                raise AuthenticationError(" | ".join(messages) or "Authentication error")
+            if resp.status_code == 404:
+                raise URLNotFoundError(url=url)
+
+        response = decode_json(response=resp)
@@
-        return response["data"]
+        data = response.get("data")
+        if data is None:
+            raise Error("Unexpected GraphQL response: missing 'data'.")
+        return data

1157-1167: Mirror minimal HTTP error mapping for query endpoints when raise_for_error=False

Avoid returning a body that callers assume is OK when it’s a 401/403/404.

         resp = await self._post(
@@
-        if raise_for_error in (None, True):
-            resp.raise_for_status()
+        if raise_for_error in (None, True):
+            resp.raise_for_status()
+        else:
+            if resp.status_code in (401, 403):
+                response = decode_json(response=resp)
+                messages = [error.get("message") for error in response.get("errors", [])]
+                raise AuthenticationError(" | ".join(messages) or "Authentication error")
+            if resp.status_code == 404:
+                raise URLNotFoundError(url=url)
 
         return decode_json(response=resp)

1186-1195: Use .get to avoid KeyError on DiffTree

Prevents a crash if upstream response body lacks DiffTree (e.g., non-2xx when raise_for_error=False).

-        diff_tree = response["DiffTree"]
+        diff_tree = response.get("DiffTree")

1336-1339: Harden mutation result access

Guard when mutation key is missing or ok is false; avoids KeyError.

-        if response[mutation_name]["ok"]:
-            resource_details = response[mutation_name]["node"]
+        result = response.get(mutation_name) or {}
+        if result.get("ok"):
+            resource_details = result["node"]
             return await self.get(kind=resource_details["kind"], id=resource_details["id"], branch=branch)
         return None

1450-1466: Harden IP prefix allocation result access

Same guard pattern as address allocation to avoid KeyError.

-        if response[mutation_name]["ok"]:
-            resource_details = response[mutation_name]["node"]
+        result = response.get(mutation_name) or {}
+        if result.get("ok"):
+            resource_details = result["node"]
             return await self.get(kind=resource_details["kind"], id=resource_details["id"], branch=branch)
         return None

Also applies to: 1485-1488


1637-1721: Same HTTP error handling bug in sync execute_graphql when raise_for_error=False

@@
-        if not resp:
+        if not resp:
             raise Error("Unexpected situation, resp hasn't been initialized.")
 
-        response = decode_json(response=resp)
+        if raise_for_error is False:
+            if resp.status_code in (401, 403):
+                response = decode_json(response=resp)
+                messages = [error.get("message") for error in response.get("errors", [])]
+                raise AuthenticationError(" | ".join(messages) or "Authentication error")
+            if resp.status_code == 404:
+                raise URLNotFoundError(url=url)
+
+        response = decode_json(response=resp)
@@
-        return response["data"]
+        data = response.get("data")
+        if data is None:
+            raise Error("Unexpected GraphQL response: missing 'data'.")
+        return data

2302-2312: Sync query_gql_query: map 401/403/404 when raise_for_error=False

-        if raise_for_error in (None, True):
-            resp.raise_for_status()
+        if raise_for_error in (None, True):
+            resp.raise_for_status()
+        else:
+            if resp.status_code in (401, 403):
+                response = decode_json(response=resp)
+                messages = [error.get("message") for error in response.get("errors", [])]
+                raise AuthenticationError(" | ".join(messages) or "Authentication error")
+            if resp.status_code == 404:
+                raise URLNotFoundError(url=url)

2331-2340: Use .get to avoid KeyError on DiffTree (sync)

-        diff_tree = response["DiffTree"]
+        diff_tree = response.get("DiffTree")

2477-2480: Harden mutation result access (sync address allocation)

-        if response[mutation_name]["ok"]:
-            resource_details = response[mutation_name]["node"]
+        result = response.get(mutation_name) or {}
+        if result.get("ok"):
+            resource_details = result["node"]
             return self.get(kind=resource_details["kind"], id=resource_details["id"], branch=branch)
         return None

2626-2629: Harden mutation result access (sync prefix allocation)

-        if response[mutation_name]["ok"]:
-            resource_details = response[mutation_name]["node"]
+        result = response.get(mutation_name) or {}
+        if result.get("ok"):
+            resource_details = result["node"]
             return self.get(kind=resource_details["kind"], id=resource_details["id"], branch=branch)
         return None

1-10: Add CHANGELOG entry for raise_for_error deprecation

Add a news fragment under the Unreleased section:

“Deprecate raise_for_error parameter usage; passing any value emits a DeprecationWarning; behavior unchanged for GraphQL errors.”

🧹 Nitpick comments (5)
infrahub_sdk/client.py (5)

109-116: Bump warning stacklevel and clarify deprecation message

Make the warning point to the user callsite (not the helper) and state eventual removal.

 def raise_for_error_deprecation_warning(value: bool | None) -> None:
     if value is not None:
         warnings.warn(
-            "Using `raise_for_error` is deprecated, use `try/except` to handle errors.",
+            "Using `raise_for_error` is deprecated and will be removed in a future release; use try/except to handle errors.",
             DeprecationWarning,
-            stacklevel=1,
+            stacklevel=3,
         )

1311-1314: Align docstring with execute_graphql semantics for raise_for_error

-            raise_for_error (bool, optional): Deprecated, raise an error if the HTTP status is not 2XX.
+            raise_for_error (bool | None, optional): Deprecated. Controls only HTTP status handling.
+                - None (default) or True: HTTP errors raise via resp.raise_for_status().
+                - False: HTTP errors are not automatically raised.
+              GraphQL errors always raise GraphQLError.

1463-1464: Sync wording across methods for deprecation text

-            raise_for_error (bool, optional): Deprecated, raise an error if the HTTP status is not 2XX.
+            raise_for_error (bool | None, optional): Deprecated. Controls only HTTP status handling.
+              None/True: HTTP errors raise; False: HTTP errors aren’t auto-raised. GraphQL errors always raise.

2454-2457: Fix incorrect docstring text for raise_for_error (sync address allocation)

-            raise_for_error (bool, optional): The limit for pagination.
+            raise_for_error (bool | None, optional): Deprecated. Controls only HTTP status handling.
+                None/True: HTTP errors raise; False: HTTP errors aren’t auto-raised. GraphQL errors always raise.

2603-2606: Fix incorrect docstring text for raise_for_error (sync prefix allocation)

-            raise_for_error (bool, optional): The limit for pagination.
+            raise_for_error (bool | None, optional): Deprecated. Controls only HTTP status handling.
+                None/True: HTTP errors raise; False: HTTP errors aren’t auto-raised. GraphQL errors always raise.
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 261a13e and 74dffe1.

📒 Files selected for processing (2)
  • changelog/493.changed.md (1 hunks)
  • infrahub_sdk/client.py (28 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • changelog/493.changed.md
🧰 Additional context used
📓 Path-based instructions (2)
**/*.py

📄 CodeRabbit inference engine (CLAUDE.md)

When implementing Infrahub checks, subclass InfrahubCheck and override validate(data); do not implement or rely on a check() method

Files:

  • infrahub_sdk/client.py
infrahub_sdk/client.py

📄 CodeRabbit inference engine (CLAUDE.md)

infrahub_sdk/client.py: Use HTTPX for transport with proxy support (single proxy or HTTP/HTTPS mounts)
Support authentication via API tokens or JWT with automatic refresh

Files:

  • infrahub_sdk/client.py
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: integration-tests-latest-infrahub
  • GitHub Check: unit-tests (3.13)
🔇 Additional comments (1)
infrahub_sdk/client.py (1)

966-970: Resolved: execute_graphql no longer returns a list; GraphQL errors now always raise

The previous union-return concern is addressed; callers can rely on dict or exception.

@gmazoyer gmazoyer requested a review from ogenstad September 1, 2025 07:55
Copy link
Contributor

@ogenstad ogenstad left a comment

Choose a reason for hiding this comment

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

Thank you for the updates!

@gmazoyer gmazoyer merged commit ed6673e into develop Sep 1, 2025
21 checks passed
@gmazoyer gmazoyer deleted the gma-20250825-ihs154 branch September 1, 2025 12:45
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.

bug: Using client execute_graphql with raise_for_error = False still raises

2 participants