Skip to content
Open
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
8 changes: 7 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,13 @@ repos:
entry: ./scripts/ci/prek/check_shared_distributions_structure.py
language: python
pass_filenames: false
files: ^shared/.*$
files: >
(?x)
^shared/.*$||
^.*/pyproject.toml$|
^.*/_shared/.*$|
^airflow-core/.*.py$|
^task-sdk/.*.py$
- id: check-shared-distributions-usage
name: Check shared distributions usage
entry: ./scripts/ci/prek/check_shared_distributions_usage.py
Expand Down
1 change: 1 addition & 0 deletions airflow-core/src/airflow/cli/commands/task_command.py
Original file line number Diff line number Diff line change
Expand Up @@ -364,6 +364,7 @@ def task_test(args, dag: DAG | None = None) -> None:
# airflow.task would redirect to a file, but here we want it to propagate
# up to the normal airflow handler.

# TODO: move bulk of this logic into the SDK: http://github.com/apache/airflow/issues/54658
from airflow.sdk._shared.secrets_masker import SecretsMasker

SecretsMasker.enable_log_masking()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ def triggerer_run(skip_serve_logs: bool, capacity: int, triggerer_heartrate: flo
@providers_configuration_loaded
def triggerer(args):
"""Start Airflow Triggerer."""
# TODO: Decide what to do with Triggerer
from airflow.sdk._shared.secrets_masker import SecretsMasker

SecretsMasker.enable_log_masking()
Expand Down
1 change: 1 addition & 0 deletions airflow-core/src/airflow/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -644,6 +644,7 @@ def _configure_secrets_masker():
core_masker.sensitive_variables_fields = list(sensitive_fields)
core_masker.secret_mask_adapter = secret_mask_adapter

# TODO: this should be moved out when settings are moved to `shared`
Copy link
Contributor

Choose a reason for hiding this comment

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

I dont think I follow this one

from airflow.sdk._shared.secrets_masker import _secrets_masker as sdk_secrets_masker

sdk_masker = sdk_secrets_masker()
Expand Down
5 changes: 4 additions & 1 deletion dev/breeze/src/airflow_breeze/utils/selective_checks.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@ def __hash__(self):
r"^Dockerfile",
r"^scripts/ci/docker-compose",
r"^scripts/ci/kubernetes",
r"^scripts/ci/prek",
r"^scripts/docker",
r"^scripts/in_container",
r"^generated/provider_dependencies.json$",
Expand Down Expand Up @@ -1710,7 +1711,9 @@ def provider_dependency_bump(self) -> bool:
get_console().print(
"[warning]Only Release Managers should change >= conditions for apache-airflow-providers "
"dependencies.[/]\n\nIf you want to refer to a future version of the dependency, please add a "
"comment [info]'# use next version'[/info] in the line of the dependency instead.\n"
"comment [info]'# use next version'[/info] in the line of the dependency instead.\n\n"
"If there is already the same provider before the `# Additional devel dependencies` without"
"version, move the provider depedendy to required ones and add `# use next version` there."
)
get_console().print()
get_console().print(
Expand Down
4 changes: 2 additions & 2 deletions dev/breeze/tests/test_selective_checks.py
Original file line number Diff line number Diff line change
Expand Up @@ -1281,9 +1281,9 @@ def test_excluded_providers():
pytest.param(
("scripts/ci/prek/file.sh",),
{
"full-tests-needed": "false",
"full-tests-needed": "true",
},
id="No full tests needed when prek scripts change",
id="Full tests needed when prek scripts change",
)
),
(
Expand Down
Loading
Loading