Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Dockerfile.ci
Original file line number Diff line number Diff line change
Expand Up @@ -1040,11 +1040,11 @@ function start_api_server_with_examples(){
echo
echo "${COLOR_BLUE}Starting airflow api server${COLOR_RESET}"
echo
airflow api-server --port 9091 --daemon
airflow api-server --port 8080 --daemon
echo
echo "${COLOR_BLUE}Waiting for api-server to start${COLOR_RESET}"
echo
check_service_connection "Airflow api-server" "run_nc localhost 9091" 100
check_service_connection "Airflow api-server" "run_nc localhost 8080" 100
EXIT_CODE=$?
if [[ ${EXIT_CODE} != 0 ]]; then
echo
Expand Down
6 changes: 3 additions & 3 deletions airflow/config_templates/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -534,7 +534,7 @@ core:
version_added: 3.0.0
type: string
example: ~
default: "http://localhost:9091/execution/"
default: "http://localhost:8080/execution/"
database:
description: ~
options:
Expand Down Expand Up @@ -1321,7 +1321,7 @@ api:
version_added: ~
type: string
example: ~
default: "http://localhost:9091"
default: "http://localhost:8080"
host:
description: |
The ip specified when starting the api server
Expand All @@ -1335,7 +1335,7 @@ api:
version_added: ~
type: string
example: ~
default: "9091"
default: "8080"
workers:
description: |
Number of workers to run on the API server
Expand Down
2 changes: 1 addition & 1 deletion airflow/ui/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Manually:

- Have the `dev-mode` environment variable enabled
- Run `pnpm install && pnpm dev`
- Note: Make sure to access the UI via the Airflow localhost port (9091 or 29091) and not the vite port (5173)
- Note: Make sure to access the UI via the Airflow localhost port (8080 or 28080) and not the vite port (5173)

## More

Expand Down
2 changes: 1 addition & 1 deletion airflow/ui/src/router.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ export const routerConfig = [
},
];

const baseUrl = document.querySelector("base")?.href ?? "http://localhost:9091/";
const baseUrl = document.querySelector("base")?.href ?? "http://localhost:8080/";
const basename = new URL(baseUrl).pathname;

export const router = createBrowserRouter(routerConfig, { basename });
2 changes: 1 addition & 1 deletion airflow/utils/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ def build_airflow_dagrun_url(dag_id: str, run_id: str) -> str:
Build airflow dagrun url using base_url and provided dag_id and run_id.

For example:
http://localhost:9091/dags/hi/runs/manual__2025-02-23T18:27:39.051358+00:00_RZa1at4Q
http://localhost:8080/dags/hi/runs/manual__2025-02-23T18:27:39.051358+00:00_RZa1at4Q
"""
baseurl = conf.get("api", "base_url")
return f"{baseurl}/dags/{dag_id}/runs/{run_id}"
Expand Down
6 changes: 3 additions & 3 deletions chart/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -4962,7 +4962,7 @@
],
"examples": [
{
"port": 9091
"port": 8080
}
]
}
Expand Down Expand Up @@ -5190,7 +5190,7 @@
"examples": [
{
"name": "api-server",
"port": 9091,
"port": 8080,
"targetPort": "api-server"
},
{
Expand Down Expand Up @@ -8186,7 +8186,7 @@
"apiServer": {
"description": "API server port.",
"type": "integer",
"default": 9091
"default": 8080
},
"workerLogs": {
"description": "Worker logs port.",
Expand Down
2 changes: 1 addition & 1 deletion chart/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2541,7 +2541,7 @@ ports:
statsdScrape: 9102
pgbouncer: 6543
pgbouncerScrape: 9127
apiServer: 9091
apiServer: 8080

# Define any ResourceQuotas for namespace
quotas: {}
Expand Down
2 changes: 1 addition & 1 deletion clients/python/test_python_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@

# Configure HTTP basic authorization: Basic
configuration = airflow_client.client.Configuration(
host="http://localhost:9091/public", username="admin", password="admin"
host="http://localhost:8080/public", username="admin", password="admin"
)

# Make sure in the [core] section, the `load_examples` config is set to True in your airflow.cfg
Expand Down
10 changes: 5 additions & 5 deletions contributing-docs/03_contributors_quick_start.rst
Original file line number Diff line number Diff line change
Expand Up @@ -505,7 +505,7 @@ Using Breeze

Ports are forwarded to the running docker containers for webserver and database
* 12322 -> forwarded to Airflow ssh server -> airflow:22
* 29091 -> forwarded to Airflow api server API -> airflow:9091
* 28080 -> forwarded to Airflow api server API -> airflow:8080
* 25555 -> forwarded to Flower dashboard -> airflow:5555
* 25433 -> forwarded to Postgres database -> postgres:5432
* 23306 -> forwarded to MySQL database -> mysql:3306
Expand All @@ -514,7 +514,7 @@ Using Breeze
Direct links to those services that you can use from the host:

* ssh connection for remote debugging: ssh -p 12322 airflow@127.0.0.1 (password: airflow)
* API server: http://127.0.0.1:29091
* API server: http://127.0.0.1:28080
* Flower: http://127.0.0.1:25555
* Postgres: jdbc:postgresql://127.0.0.1:25433/airflow?user=postgres&password=airflow
* Mysql: jdbc:mysql://127.0.0.1:23306/airflow?user=root
Expand Down Expand Up @@ -575,12 +575,12 @@ Using Breeze
:select-layout tiled


2. Now you can access airflow web interface on your local machine at |http://localhost:29091| with user name ``admin``
2. Now you can access airflow web interface on your local machine at |http://localhost:28080| with user name ``admin``
and password ``admin``

.. |http://localhost:29091| raw:: html
.. |http://localhost:28080| raw:: html

<a href="http://localhost:29091" target="_blank">http://localhost:29091</a>
<a href="http://localhost:28080" target="_blank">http://localhost:28080</a>

.. raw:: html

Expand Down
7 changes: 3 additions & 4 deletions dev/breeze/doc/03_developer_tasks.rst
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ When you run Airflow Breeze, the following ports are automatically forwarded:
.. code-block::

* 12322 -> forwarded to Airflow ssh server -> airflow:22
* 29091 -> forwarded to Airflow FastAPI API -> airflow:9091
* 28080 -> forwarded to Airflow API server or webserver -> airflow:8080
* 25555 -> forwarded to Flower dashboard -> airflow:5555
* 25433 -> forwarded to Postgres database -> postgres:5432
* 23306 -> forwarded to MySQL database -> mysql:3306
Expand All @@ -124,7 +124,7 @@ You can connect to these ports/databases using:
.. code-block::

* ssh connection for remote debugging: ssh -p 12322 airflow@127.0.0.1 pw: airflow
* FastAPI API: http://127.0.0.1:29091
* API server or webserver: http://127.0.0.1:28080
* Flower: http://127.0.0.1:25555
* Postgres: jdbc:postgresql://127.0.0.1:25433/airflow?user=postgres&password=airflow
* Mysql: jdbc:mysql://127.0.0.1:23306/airflow?user=root
Expand Down Expand Up @@ -152,8 +152,7 @@ database client:
You can change the used host port numbers by setting appropriate environment variables:

* ``SSH_PORT``
* ``WEBSERVER_HOST_PORT`` - for Airflow 2 web UI when --use-airflow-version is used
* ``API_SERVER_HOST_PORT``
* ``WEB_HOST_PORT`` - API server for Airflow 3, or webserver port for Airflow 2 when --use-airflow-version is used
* ``POSTGRES_HOST_PORT``
* ``MYSQL_HOST_PORT``
* ``MSSQL_HOST_PORT``
Expand Down
3 changes: 1 addition & 2 deletions dev/breeze/src/airflow_breeze/global_constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -334,8 +334,7 @@ def get_default_platform_machine() -> str:
REDIS_HOST_PORT = "26379"
SSH_PORT = "12322"
VITE_DEV_PORT = "5173"
WEBSERVER_HOST_PORT = "28080"
API_SERVER_HOST_PORT = "29091"
WEB_HOST_PORT = "28080"

CELERY_BROKER_URLS_MAP = {"rabbitmq": "amqp://guest:guest@rabbitmq:5672", "redis": "redis://redis:6379/0"}
SQLITE_URL = "sqlite:////root/airflow/sqlite/airflow.db"
Expand Down
14 changes: 4 additions & 10 deletions dev/breeze/src/airflow_breeze/params/shell_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
ALLOWED_POSTGRES_VERSIONS,
ALLOWED_PYTHON_MAJOR_MINOR_VERSIONS,
APACHE_AIRFLOW_GITHUB_REPOSITORY,
API_SERVER_HOST_PORT,
CELERY_BROKER_URLS_MAP,
CELERY_EXECUTOR,
DEFAULT_CELERY_BROKER,
Expand All @@ -60,7 +59,7 @@
TESTABLE_CORE_INTEGRATIONS,
TESTABLE_PROVIDERS_INTEGRATIONS,
USE_AIRFLOW_MOUNT_SOURCES,
WEBSERVER_HOST_PORT,
WEB_HOST_PORT,
GithubEvents,
GroupOfTests,
get_airflow_version,
Expand Down Expand Up @@ -507,7 +506,7 @@ def env_variables_for_docker_commands(self) -> dict[str, str]:
_set_var(_env, "AIRFLOW_VERSION", self.airflow_version)
_set_var(_env, "AIRFLOW__CELERY__BROKER_URL", self.airflow_celery_broker_url)
_set_var(_env, "AIRFLOW__CORE__EXECUTOR", self.executor)
_set_var(_env, "AIRFLOW__API__BASE_URL", f"http://localhost:{API_SERVER_HOST_PORT}")
_set_var(_env, "AIRFLOW__API__BASE_URL", f"http://localhost:{WEB_HOST_PORT}")
if self.executor == EDGE_EXECUTOR:
_set_var(
_env, "AIRFLOW__CORE__EXECUTOR", "airflow.providers.edge.executors.edge_executor.EdgeExecutor"
Expand All @@ -524,11 +523,7 @@ def env_variables_for_docker_commands(self) -> dict[str, str]:
"attempt={{ try_number|default(ti.try_number) }}.log",
)

# Dev Airflow 3 runs API on FastAPI transitional
port = 9091
if self.use_airflow_version and self.use_airflow_version.startswith("2."):
# Airflow 2.10 runs it in the webserver atm
port = 8080
port = 8080
_set_var(_env, "AIRFLOW__EDGE__API_URL", f"http://localhost:{port}/edge_worker/v1/rpcapi")
_set_var(_env, "ANSWER", get_forced_answer() or "")
_set_var(_env, "BACKEND", self.backend)
Expand Down Expand Up @@ -617,8 +612,7 @@ def env_variables_for_docker_commands(self) -> dict[str, str]:
_set_var(_env, "VERBOSE", get_verbose())
_set_var(_env, "VERBOSE_COMMANDS", self.verbose_commands)
_set_var(_env, "VERSION_SUFFIX_FOR_PYPI", self.version_suffix_for_pypi)
_set_var(_env, "WEBSERVER_HOST_PORT", None, WEBSERVER_HOST_PORT)
_set_var(_env, "API_SERVER_HOST_PORT", None, API_SERVER_HOST_PORT)
_set_var(_env, "WEB_HOST_PORT", None, WEB_HOST_PORT)
_set_var(_env, "_AIRFLOW_RUN_DB_TESTS_ONLY", self.run_db_tests_only)
_set_var(_env, "_AIRFLOW_SKIP_DB_TESTS", self.skip_db_tests)
self._generate_env_for_docker_compose_file_if_needed(_env)
Expand Down
4 changes: 2 additions & 2 deletions dev/breeze/src/airflow_breeze/utils/cdxgen.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ def start_cdxgen_server(application_root_path: Path, run_in_parallel: bool, para
fork_cdxgen_server(application_root_path)
else:
for i in range(parallelism):
fork_cdxgen_server(application_root_path, port=9091 + i)
fork_cdxgen_server(application_root_path, port=8080 + i)
time.sleep(1)
get_console().print("[info]Waiting for cdxgen server to start")
time.sleep(3)
Expand Down Expand Up @@ -115,7 +115,7 @@ def fork_cdxgen_server(application_root_path, port=9090):
def get_port_mapping(x):
# if we do not sleep here, then we could skip mapping for some process if it is handle
time.sleep(1)
return multiprocessing.current_process().name, 9091 + x
return multiprocessing.current_process().name, 8080 + x


def get_cdxgen_port_mapping(parallelism: int, pool: Pool) -> dict[str, int]:
Expand Down
9 changes: 3 additions & 6 deletions dev/breeze/src/airflow_breeze/utils/visuals.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,12 @@
from __future__ import annotations

from airflow_breeze.global_constants import (
API_SERVER_HOST_PORT,
FLOWER_HOST_PORT,
MYSQL_HOST_PORT,
POSTGRES_HOST_PORT,
REDIS_HOST_PORT,
SSH_PORT,
WEBSERVER_HOST_PORT,
WEB_HOST_PORT,
)
from airflow_breeze.utils.path_utils import AIRFLOW_SOURCES_ROOT

Expand Down Expand Up @@ -82,22 +81,20 @@

Ports are forwarded to the running docker containers for webserver and database
* {SSH_PORT} -> forwarded to Airflow ssh server -> airflow:22
* {API_SERVER_HOST_PORT} -> forwarded to Airflow api server API -> airflow:9091
* {WEB_HOST_PORT} -> forwarded to Airflow api server (Airflow 3) or webserver (Airflow 2) -> airflow:8080
* {FLOWER_HOST_PORT} -> forwarded to Flower dashboard -> airflow:5555
* {POSTGRES_HOST_PORT} -> forwarded to Postgres database -> postgres:5432
* {MYSQL_HOST_PORT} -> forwarded to MySQL database -> mysql:3306
* {REDIS_HOST_PORT} -> forwarded to Redis broker -> redis:6379
* {WEBSERVER_HOST_PORT} -> forwarded to Airflow 2 (only Airflow 2) web server API -> airflow:8080

Direct links to those services that you can use from the host:

* ssh connection for remote debugging: ssh -p {SSH_PORT} airflow@127.0.0.1 (password: airflow)
* API server: http://127.0.0.1:{API_SERVER_HOST_PORT}
* API server or webserver: http://127.0.0.1:{WEB_HOST_PORT}
* Flower: http://127.0.0.1:{FLOWER_HOST_PORT}
* Postgres: jdbc:postgresql://127.0.0.1:{POSTGRES_HOST_PORT}/airflow?user=postgres&password=airflow
* Mysql: jdbc:mysql://127.0.0.1:{MYSQL_HOST_PORT}/airflow?user=root
* Redis: redis://127.0.0.1:{REDIS_HOST_PORT}/0
* Airflow 2 web server: http://127.0.0.1:{WEBSERVER_HOST_PORT}

[info]* How can I add my stuff in Breeze:[/]

Expand Down
2 changes: 1 addition & 1 deletion docker_tests/test_docker_compose_quick_start.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
DAG_RUN_ID = "test_dag_run_id"


def api_request(method: str, path: str, base_url: str = "http://localhost:9091/public", **kwargs) -> dict:
def api_request(method: str, path: str, base_url: str = "http://localhost:8080/public", **kwargs) -> dict:
response = requests.request(
method=method,
url=f"{base_url}/{path}",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Web Stack

Sometimes you want to deploy the backend and frontend behind a
variable url path prefix. To do so, you can configure the url :ref:`config:api__base_url`
for instance, set it to ``http://localhost:29091/d12345``. All the APIs routes will
for instance, set it to ``http://localhost:28080/d12345``. All the APIs routes will
now be available through that additional ``d12345`` prefix. Without rebuilding
the frontend, XHR requests and static file queries should be directed to the prefixed url
and served successfully.
Expand Down
6 changes: 3 additions & 3 deletions docs/apache-airflow/howto/docker-compose/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ x-airflow-common:
AIRFLOW__CORE__LOAD_EXAMPLES: 'true'
AIRFLOW__API__AUTH_BACKENDS: >-
airflow.providers.fab.auth_manager.api.auth.backend.basic_auth,airflow.api.auth.backend.session
AIRFLOW__WORKERS__EXECUTION_API_SERVER_URL: 'http://airflow-apiserver:9091/execution/'
AIRFLOW__WORKERS__EXECUTION_API_SERVER_URL: 'http://airflow-apiserver:8080/execution/'
# yamllint disable rule:line-length
# Use simple http server on scheduler for health checks
# See https://airflow.apache.org/docs/apache-airflow/stable/administration-and-deployment/logging-monitoring/check-health.html#scheduler-health-check-server
Expand Down Expand Up @@ -121,9 +121,9 @@ services:
<<: *airflow-common
command: api-server
ports:
- "9091:9091"
- "8080:8080"
healthcheck:
test: ["CMD", "curl", "--fail", "http://localhost:9091/public/version"]
test: ["CMD", "curl", "--fail", "http://localhost:8080/public/version"]
interval: 30s
timeout: 10s
retries: 5
Expand Down
10 changes: 5 additions & 5 deletions helm_tests/airflow_core/test_api_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -595,7 +595,7 @@ def test_default_service(self):
"release": "release-name",
}
assert jmespath.search("spec.type", docs[0]) == "ClusterIP"
assert {"name": "api-server", "port": 9091} in jmespath.search("spec.ports", docs[0])
assert {"name": "api-server", "port": 8080} in jmespath.search("spec.ports", docs[0])

def test_overrides(self):
docs = render_chart(
Expand Down Expand Up @@ -631,7 +631,7 @@ def test_overrides(self):
"port": "{{ .Values.ports.apiServer }}",
}
],
[{"name": "release-name", "protocol": "UDP", "port": 9091}],
[{"name": "release-name", "protocol": "UDP", "port": 8080}],
),
([{"name": "only_sidecar", "port": "{{ int 9000 }}"}], [{"name": "only_sidecar", "port": 9000}]),
(
Expand All @@ -640,7 +640,7 @@ def test_overrides(self):
{"name": "sidecar", "port": 80, "targetPort": "sidecar"},
],
[
{"name": "api-server", "port": 9091},
{"name": "api-server", "port": 8080},
{"name": "sidecar", "port": 80, "targetPort": "sidecar"},
],
),
Expand Down Expand Up @@ -714,7 +714,7 @@ def test_defaults(self):
assert jmespath.search("spec.ingress[0].from", docs[0]) == [
{"namespaceSelector": {"matchLabels": {"release": "myrelease"}}}
]
assert jmespath.search("spec.ingress[0].ports", docs[0]) == [{"port": 9091}]
assert jmespath.search("spec.ingress[0].ports", docs[0]) == [{"port": 8080}]

@pytest.mark.parametrize(
"ports, expected_ports",
Expand All @@ -726,7 +726,7 @@ def test_defaults(self):
{"port": 80},
],
[
{"port": 9091},
{"port": 8080},
{"port": 80},
],
),
Expand Down
2 changes: 1 addition & 1 deletion kubernetes_tests/test_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
from urllib3.exceptions import MaxRetryError
from urllib3.util.retry import Retry

CLUSTER_FORWARDED_PORT = os.environ.get("CLUSTER_FORWARDED_PORT") or "9091"
CLUSTER_FORWARDED_PORT = os.environ.get("CLUSTER_FORWARDED_PORT") or "8080"
KUBERNETES_HOST_PORT = (os.environ.get("CLUSTER_HOST") or "localhost") + ":" + CLUSTER_FORWARDED_PORT
EXECUTOR = os.environ.get("EXECUTOR")

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ def test_login_callback_successful(self):
response = client.post("/auth/login_callback", follow_redirects=False)
assert response.status_code == 303
assert "location" in response.headers
assert response.headers["location"].startswith("http://localhost:9091/?token=")
assert response.headers["location"].startswith("http://localhost:8080/?token=")

def test_login_callback_unsuccessful(self):
with conf_vars(
Expand Down
Loading
Loading