Skip to content

feat: add Astro CLI reverse proxy discovery for local Airflow#165

Open
josh-fell wants to merge 1 commit intomainfrom
josh-fell/af-reverse-proxy
Open

feat: add Astro CLI reverse proxy discovery for local Airflow#165
josh-fell wants to merge 1 commit intomainfrom
josh-fell/af-reverse-proxy

Conversation

@josh-fell
Copy link
Copy Markdown
Contributor

Summary

  • Adds reverse proxy route discovery to LocalDiscoveryBackend, checking ~/.astro/proxy/routes.json and global config for proxy port before falling back to port scanning
  • Introduces helper functions in constants.py for resolving ASTRO_HOME, proxy routes path, and global config path
  • Refactors discover_airflow_url in __main__.py to return proxy-matched URLs with source indication
  • Adds comprehensive tests for proxy discovery, port fallback, and coexistence scenarios

Test plan

  • Unit tests for proxy port reading (default and custom)
  • Unit tests for missing/invalid routes.json handling
  • Tests for proxy + port-scan coexistence
  • Tests for discover_airflow_url proxy match and fallthrough paths

🤖 Generated with Claude Code

@josh-fell josh-fell force-pushed the josh-fell/af-reverse-proxy branch from 1cf2d64 to eda600f Compare March 20, 2026 17:22
@josh-fell josh-fell force-pushed the josh-fell/af-reverse-proxy branch from eda600f to 5032dad Compare April 7, 2026 17:44
@josh-fell josh-fell requested a review from schnie April 7, 2026 17:44
@josh-fell josh-fell marked this pull request as ready for review April 7, 2026 17:44
@josh-fell josh-fell force-pushed the josh-fell/af-reverse-proxy branch from 5032dad to 0682cf8 Compare April 7, 2026 18:33
…very

The routes.json hostname field already contains the full hostname
(e.g. providence.sirius.localhost), so appending .localhost again
produced invalid URLs like http://providence.sirius.localhost.localhost:6563.

Also fix existing port-scan tests to pass a nonexistent proxy_routes_path
so they don't accidentally pick up real routes.json entries on the host.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@josh-fell josh-fell force-pushed the josh-fell/af-reverse-proxy branch from 0682cf8 to efeb4a6 Compare April 7, 2026 18:35
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