Skip to content

feat: route Prefect API through MW ApiGateway with httpx transport#117

Merged
simontaurus merged 1 commit intomainfrom
dev
May 7, 2026
Merged

feat: route Prefect API through MW ApiGateway with httpx transport#117
simontaurus merged 1 commit intomainfrom
dev

Conversation

@simontaurus
Copy link
Copy Markdown
Contributor

  • Add ApiGatewayTransport that rewrites Prefect URLs to ?path= format and injects MW session cookies + CSRF tokens
  • Monkey-patch httpx.AsyncClient in parent process for seamless routing
  • Add .pth startup hook for Prefect subprocesses (lazy MW login)
  • Auto-install hook into Lib/site-packages when ApiGateway URL detected
  • Fix event loop binding by creating fresh transport per request
  • Remove debug print statements, use logging.debug instead

- Add ApiGatewayTransport that rewrites Prefect URLs to ?path= format
  and injects MW session cookies + CSRF tokens
- Monkey-patch httpx.AsyncClient in parent process for seamless routing
- Add .pth startup hook for Prefect subprocesses (lazy MW login)
- Auto-install hook into Lib/site-packages when ApiGateway URL detected
- Fix event loop binding by creating fresh transport per request
- Remove debug print statements, use logging.debug instead
@simontaurus simontaurus merged commit 618130d into main May 7, 2026
1 check passed
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.

1 participant