Skip to content

af CLI: treat empty AIRFLOW_API_URL as explicit no-op#191

Open
jlaneve wants to merge 3 commits intomainfrom
julianlaneve/ai-262-af-cli-provide-a-way-to-disable-the-default-eed5
Open

af CLI: treat empty AIRFLOW_API_URL as explicit no-op#191
jlaneve wants to merge 3 commits intomainfrom
julianlaneve/ai-262-af-cli-provide-a-way-to-disable-the-default-eed5

Conversation

@jlaneve
Copy link
Copy Markdown
Contributor

@jlaneve jlaneve commented Apr 21, 2026

Setting AIRFLOW_API_URL="" now exits with a clear error instead of silently falling back to http://localhost:8080. This lets programmatic callers (automation, agent frameworks) signal "no Airflow is configured right now" without risking queries against whatever happens to be listening on localhost.

Unset AIRFLOW_API_URL still falls back to config → default, so existing behavior is preserved. Documented in --help and the README.

Fixes #188

jlaneve and others added 3 commits April 21, 2026 04:42
Setting AIRFLOW_API_URL="" now exits with a clear error instead of silently
falling back to DEFAULT_AIRFLOW_URL (http://localhost:8080). This lets
programmatic callers propagate "nothing is configured" without risking
queries against whatever happens to be listening on localhost.

Generated with [Linear](https://linear.app/astronomer/issue/AI-262/af-cli-provide-a-way-to-disable-the-default-localhost8080-fallback#agent-session-53f3680f)

Co-authored-by: linear[bot] <44709815+linear[bot]@users.noreply.github.com>
@jlaneve jlaneve marked this pull request as ready for review April 21, 2026 11:51
# (automation, agent frameworks) propagate "nothing is configured"
# without risking queries against whatever happens to be listening on
# localhost:8080.
airflow_url_env = os.environ.get("AIRFLOW_API_URL")
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think @schnie added this for working with local instances without configuring anything. @schnie could you review this please?

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.

af CLI: provide a way to disable the default localhost:8080 fallback

2 participants