Skip to content

Commit

Permalink
Merge branch 'main' into potiuk-patch-1
Browse files Browse the repository at this point in the history
  • Loading branch information
potiuk committed Jan 28, 2024
2 parents 20624ea + 03925b4 commit 5f66267
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 19 deletions.
12 changes: 5 additions & 7 deletions .github/workflows/build-images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,8 @@ jobs:
github.event.pull_request.head.sha ||
github.sha
}}"
if: github.repository == 'apache/airflow'
# TODO: restore me for final merge
# if: github.repository == 'apache/airflow'
steps:
- name: Discover PR merge commit
id: discover-pr-merge-commit
Expand Down Expand Up @@ -165,8 +166,7 @@ jobs:
needs: [build-info]
if: |
needs.build-info.outputs.ci-image-build == 'true' &&
github.event.pull_request.head.repo.full_name != 'apache/airflow' &&
github.repository == 'apache/airflow'
github.event.pull_request.head.repo.full_name != 'apache/airflow'
env:
DEFAULT_BRANCH: ${{ needs.build-info.outputs.default-branch }}
DEFAULT_CONSTRAINTS_BRANCH: ${{ needs.build-info.outputs.default-constraints-branch }}
Expand Down Expand Up @@ -239,8 +239,7 @@ jobs:
needs: [build-info, build-ci-images]
if: |
needs.build-info.outputs.prod-image-build == 'true' &&
github.event.pull_request.head.repo.full_name != 'apache/airflow' &&
github.repository == 'apache/airflow'
github.event.pull_request.head.repo.full_name != 'apache/airflow'
env:
DEFAULT_BRANCH: ${{ needs.build-info.outputs.default-branch }}
DEFAULT_CONSTRAINTS_BRANCH: ${{ needs.build-info.outputs.default-constraints-branch }}
Expand Down Expand Up @@ -318,8 +317,7 @@ jobs:
needs.build-info.outputs.upgrade-to-newer-dependencies != 'false' &&
github.event.pull_request.head.repo.full_name != 'apache/airflow' &&
needs.build-info.outputs.is-self-hosted-runner == 'true' &&
needs.build-info.outputs.is-airflow-runner == 'true' &&
github.repository == 'apache/airflow'
needs.build-info.outputs.is-airflow-runner == 'true'
env:
DEFAULT_BRANCH: ${{ needs.build-info.outputs.default-branch }}
DEFAULT_CONSTRAINTS_BRANCH: ${{ needs.build-info.outputs.default-constraints-branch }}
Expand Down
1 change: 1 addition & 0 deletions airflow/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
implement their own login mechanisms by providing an `airflow_login` module
in their PYTHONPATH. airflow_login should be based off the `airflow.www.login`
isort:skip_file
"""
from __future__ import annotations
Expand Down
7 changes: 1 addition & 6 deletions scripts/in_container/install_airflow_and_providers.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,6 @@
AIRFLOW_SOURCE_DIR = Path(__file__).resolve().parents[1]
DIST_FOLDER = Path("/dist")

# Make sure to add breeze to PYTHONPATH to be able to import breeze's code
sys.path.insert(0, str(AIRFLOW_SOURCE_DIR / "dev" / "breeze" / "src"))
from airflow_breeze.branch_defaults import DEFAULT_AIRFLOW_CONSTRAINTS_BRANCH # noqa E402


def get_provider_name(package_name: str) -> str:
return ".".join(package_name.split("-")[0].replace("apache_airflow_providers_", "").split("_"))
Expand Down Expand Up @@ -339,8 +335,7 @@ def find_installation_spec(
)
@click.option(
"--default-constraints-branch",
default=DEFAULT_AIRFLOW_CONSTRAINTS_BRANCH,
show_default=True,
required=True,
envvar="DEFAULT_CONSTRAINTS_BRANCH",
help="Default constraints branch to use",
)
Expand Down
7 changes: 1 addition & 6 deletions scripts/in_container/run_generate_constraints.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,6 @@

AIRFLOW_SOURCE_DIR = Path(__file__).resolve().parents[2]

# Make sure to add breeze to PYTHONPATH to be able to import breeze's code
sys.path.insert(0, str(AIRFLOW_SOURCE_DIR / "dev" / "breeze" / "src"))
from airflow_breeze.branch_defaults import DEFAULT_AIRFLOW_CONSTRAINTS_BRANCH # noqa E402

DEFAULT_BRANCH = os.environ.get("DEFAULT_BRANCH", "main")
PYTHON_VERSION = os.environ.get("PYTHON_MAJOR_MINOR_VERSION", "3.8")
GENERATED_PROVIDER_DEPENDENCIES_FILE = AIRFLOW_SOURCE_DIR / "generated" / "provider_dependencies.json"
Expand Down Expand Up @@ -401,8 +397,7 @@ def generate_constraints_no_providers(config_params: ConfigParams) -> None:
)
@click.option(
"--default-constraints-branch",
default=DEFAULT_AIRFLOW_CONSTRAINTS_BRANCH,
show_default=True,
required=True,
envvar="DEFAULT_CONSTRAINTS_BRANCH",
help="Branch to get constraints from",
)
Expand Down

0 comments on commit 5f66267

Please sign in to comment.