This is an automated email from the ASF dual-hosted git repository.
potiuk pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/main by this push:
new d7b85d9a0a Use inclusive words in apache airflow project (#23090)
d7b85d9a0a is described below
commit d7b85d9a0a09fd7b287ec928d3b68c38481b0225
Author: Edith Puclla <[email protected]>
AuthorDate: Mon May 9 16:52:29 2022 -0500
Use inclusive words in apache airflow project (#23090)
---
.pre-commit-config.yaml | 39 ++++++++++++++++------
airflow/sensors/base.py | 4 +--
airflow/utils/orm_event_handlers.py | 2 +-
.../commands/production_image_commands.py | 4 +--
scripts/ci/libraries/_sanity_checks.sh | 2 +-
scripts/in_container/run_system_tests.sh | 2 +-
tests/conftest.py | 2 +-
7 files changed, 37 insertions(+), 18 deletions(-)
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index c8ab403182..70c0c80d6e 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -429,19 +429,38 @@ repos:
- id: check-for-inclusive-language
language: pygrep
name: Check for language that we do not accept as community
- description: Please use "deny_list" or "allow_list" instead.
- entry: "(?i)(black|white)[_-]?list"
+ description: Please use more appropriate words for community
documentation.
+ entry: >
+ (?i)
+ (black|white)[_-]?list|
+ \bshe\b|
+ \bhe\b|
+ \bher\b|
+ \bhis\b|
+ \bmaster\b|
+ \bslave\b|
+ \bsanity\b|
+ \bdummy\b
pass_filenames: true
exclude: >
(?x)
- ^airflow/www/fab_security/manager\.py$|
- ^airflow/providers/apache/cassandra/hooks/cassandra\.py$|
- ^airflow/providers/apache/hive/operators/hive_stats\.py$|
- ^airflow/providers/apache/hive/.*PROVIDER_CHANGES_*|
- ^airflow/providers/apache/hive/.*README\.md$|
- ^tests/providers/apache/cassandra/hooks/test_cassandra\.py$|
-
^docs/apache-airflow-providers-apache-cassandra/connections/cassandra\.rst$|
- ^docs/apache-airflow-providers-apache-hive/commits\.rst$|
+ ^airflow/www/fab_security/manager.py$|
+ ^airflow/www/static/|
+ ^airflow/providers/|
+ ^tests/providers/apache/cassandra/hooks/test_cassandra.py$|
+
^docs/apache-airflow-providers-apache-cassandra/connections/cassandra.rst$|
+ ^docs/apache-airflow-providers-apache-hive/commits.rst$|
+ ^airflow/api_connexion/openapi/v1.yaml$|
+ ^tests/cli/commands/test_webserver_command.py$|
+ ^airflow/cli/commands/webserver_command.py$|
+ ^airflow/ui/yarn.lock$|
+ ^airflow/config_templates/default_airflow.cfg$|
+ ^airflow/config_templates/config.yml$|
+ ^docs/*.*$|
+ ^tests/providers/|
+ ^.pre-commit-config\.yaml$|
+ ^.*RELEASE_NOTES\.rst$|
+ ^.*CHANGELOG\.txt$|^.*CHANGELOG\.rst$|
git
- id: check-base-operator-usage
language: pygrep
diff --git a/airflow/sensors/base.py b/airflow/sensors/base.py
index 1a3bd72a33..5cbe009c82 100644
--- a/airflow/sensors/base.py
+++ b/airflow/sensors/base.py
@@ -157,10 +157,10 @@ class BaseSensorOperator(BaseOperator, SkipMixin):
f".{self.task_id}'; received '{self.mode}'."
)
- # Sanity check for poke_interval isn't immediately over MySQL's
TIMESTAMP limit.
+ # Quick check for poke_interval isn't immediately over MySQL's
TIMESTAMP limit.
# This check is only rudimentary to catch trivial user errors, e.g.
mistakenly
# set the value to milliseconds instead of seconds. There's another
check when
- # we actually try to reschedule to ensure database sanity.
+ # we actually try to reschedule to ensure database coherence.
if self.reschedule and _is_metadatabase_mysql():
if timezone.utcnow() +
datetime.timedelta(seconds=self.poke_interval) > _MYSQL_TIMESTAMP_MAX:
raise AirflowException(
diff --git a/airflow/utils/orm_event_handlers.py
b/airflow/utils/orm_event_handlers.py
index 23c99d8866..f3c08c9c07 100644
--- a/airflow/utils/orm_event_handlers.py
+++ b/airflow/utils/orm_event_handlers.py
@@ -43,7 +43,7 @@ def setup_event_handlers(engine):
cursor.execute("PRAGMA foreign_keys=ON")
cursor.close()
- # this ensures sanity in mysql when storing datetimes (not required for
postgres)
+ # this ensures coherence in mysql when storing datetimes (not required for
postgres)
if engine.dialect.name == "mysql":
@event.listens_for(engine, "connect")
diff --git
a/dev/breeze/src/airflow_breeze/commands/production_image_commands.py
b/dev/breeze/src/airflow_breeze/commands/production_image_commands.py
index a28bad62a3..7404c25231 100644
--- a/dev/breeze/src/airflow_breeze/commands/production_image_commands.py
+++ b/dev/breeze/src/airflow_breeze/commands/production_image_commands.py
@@ -417,7 +417,7 @@ def clean_docker_context_files(verbose: bool, dry_run:
bool):
def check_docker_context_files(install_packages_from_context: bool):
"""
- Sanity check - if we want to install from docker-context-files we expect
some packages there but if
+ Quick check - if we want to install from docker-context-files we expect
some packages there but if
we don't - we don't expect them, and they might invalidate Docker cache.
This method exits with an error if what we see is unexpected for given
operation.
@@ -459,7 +459,7 @@ def build_production_image(
* converts all the parameters received via kwargs into BuildProdParams
(including cache)
* prints info about the image to build
* removes docker-context-files if requested
- * performs sanity check if the files are present in docker-context-files
if expected
+ * performs quick check if the files are present in docker-context-files
if expected
* logs int to docker registry on CI if build cache is being executed
* removes "tag" for previously build image so that inline cache uses
only remote image
* constructs docker-compose command to run based on parameters passed
diff --git a/scripts/ci/libraries/_sanity_checks.sh
b/scripts/ci/libraries/_sanity_checks.sh
index 3e7a1f55fc..073bedfe70 100644
--- a/scripts/ci/libraries/_sanity_checks.sh
+++ b/scripts/ci/libraries/_sanity_checks.sh
@@ -143,7 +143,7 @@ function sanity_checks::go_to_airflow_sources {
}
#
-# Performs basic sanity checks common for most of the scripts in this directory
+# Performs basic quick checks common for most of the scripts in this directory
#
function sanity_checks::basic_sanity_checks() {
sanity_checks::assert_not_in_container
diff --git a/scripts/in_container/run_system_tests.sh
b/scripts/in_container/run_system_tests.sh
index f77a58f6ff..b708e8a2cf 100755
--- a/scripts/in_container/run_system_tests.sh
+++ b/scripts/in_container/run_system_tests.sh
@@ -17,7 +17,7 @@
# under the License.
#
-# Bash sanity settings (error on exit, complain for undefined vars, error when
pipe fails)
+# Bash coherence settings (error on exit, complain for undefined vars, error
when pipe fails)
set -euo pipefail
IN_CONTAINER_DIR=$(cd "$(dirname "$0")" || exit 1; pwd)
diff --git a/tests/conftest.py b/tests/conftest.py
index 5cbffc06f0..468da514b0 100644
--- a/tests/conftest.py
+++ b/tests/conftest.py
@@ -82,7 +82,7 @@ def trace_sql(request):
terminal_reporter =
request.config.pluginmanager.getplugin("terminalreporter")
# if no terminal reporter plugin is present, nothing we can do here;
- # this can happen when this function executes in a slave node
+ # this can happen when this function executes in a worker node
# when using pytest-xdist, for example
if terminal_reporter is None:
yield