Feature/flaskapi#7
Open
SaiKireeti2905 wants to merge 5 commits into
Open
Conversation
|
Your free trial has expired. To keep using Ellipsis, sign up at https://app.ellipsis.dev or contact us. |
Collaborator
Author
|
Don't merge this PR |
alishalbaf
added a commit
that referenced
this pull request
May 12, 2026
network.py - All async helpers now instantiate httpx.AsyncClient with follow_redirects=True to match sync requests' default. Without it the async path silently diverged on HTTP->HTTPS hops and any trailing-slash redirect (Copilot inline comments #1, #2, #5). - POST and PATCH success check switched from response.is_success (2xx only) to "not response.is_error" (<400) so behaviour matches sync requests.Response.ok exactly. Also closes the implicit-None return path on a 3xx end-state for PATCH that Copilot flagged on the original code (#4). - GET pagination loop switched from "not is_success" to "is_error" for the same reason (3xx pages should not silently break the loop). components.py - Dropped the unused make_async_get_request import (#6). - Tightened docstring: only the MinIO upload runs inside asyncio.to_thread, not the YAML parse or file read (#7). - async_register_component now raises CogflowComponentRegistryError when the registry check returns None (transport failure) instead of silently treating it as "no existing component" and risking a duplicate create during an intermittent registry outage (#8). tests - FakeAsyncResponse now exposes is_error derived from is_success so existing fixtures keep working without per-test changes. - New test_async_clients_follow_redirects pins down that every async helper instantiates httpx.AsyncClient with follow_redirects=True, so this divergence cannot be reintroduced. - New test_async_register_component_registry_unreachable covers the None-from-make_async_get_request_raw path. Copilot inline comment #3 (DELETE retries on 4xx/5xx through raise_for_status -> HTTPStatusError) is intentional: the sync make_delete_request behaves identically (RequestException is the base class, bare @Retry catches everything). The PR description will be updated separately to remove the misleading "transport-error-only" wording for DELETE.
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.
cogflow for flaskapi