Skip to content

Commit b8fa945

Browse files
feat: Rollout crate/typos for operators (#874)
* chore: Generated commit to update templated files since the last template run up to stackabletech/operator-templating@0f53eec Reference-to: stackabletech/operator-templating@0f53eec (feat: Rollout crate/typos for operators) * chore: Add typos.toml and fix spelling findings --------- Co-authored-by: Maxi Wittich <maximilian.wittich@stackable.tech>
1 parent d9ed2c5 commit b8fa945

7 files changed

Lines changed: 64 additions & 5 deletions

File tree

‎.pre-commit-config.yaml‎

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,19 @@ default_language_version:
77
node: system
88

99
repos:
10+
# The word lists live in a per-repo `typos.toml`, which is not templated.
11+
# typos has no layered configuration (https://github.com/crate-ci/typos/issues/193).
12+
# A templated config can currently not be extended locally.
13+
- repo: https://github.com/crate-ci/typos
14+
rev: 00f422f3b19c57bc6338715ebfe3316d38768461 # v1.50.3
15+
hooks:
16+
- id: typos
17+
# Drop the upstream default `--write-changes` so the hook only
18+
# reports failures instead of writing changes.
19+
# Keep `--force-exclude` so the excludes in typos.toml still
20+
# apply to the paths prek passes in.
21+
args: ["--force-exclude"]
22+
1023
- repo: https://github.com/pre-commit/pre-commit-hooks
1124
rev: 3e8a8703264a2f4a69428a0aa4dcb512790b2c8c # 6.0.0
1225
hooks:

‎docs/modules/airflow/pages/getting_started/first_steps.adoc‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ Where:
6464
* `spec.clusterConfig.metadataDatabase`: specifies one of the supported database types (in this case, `postgresql`) along with references to the host, database and the secret containing the connection credentials.
6565
* the product version of the Docker image provided by Stackable must be set in `spec.image.productVersion`.
6666
* `spec.celeryExecutors`: deploy executors managed by Airflow's Celery engine.
67-
Alternatively you can use `kuberenetesExectors` that use Airflow's Kubernetes engine for executor management.
67+
Alternatively you can use `kubernetesExecutors` that use Airflow's Kubernetes engine for executor management.
6868
For more information see https://airflow.apache.org/docs/apache-airflow/stable/executor/index.html#executor-types).
6969
* `spec.celeryExecutors.resultBackend`: specifies one of the supported database types (in this case, `postgresql`) along with references to the host, database and the secret containing the connection credentials.
7070
* `spec.celeryExecutors.broker`: specifies one of the supported queue/broker types (in this case, `redis`) along with references to the host and the secret containing the connection credentials.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
= CRD Reference
22

3-
Find all CRD reference for the Stackable Operator for Apache Airfow at: {crd-ref}{crd-ref-release}&operator=airflow-operator.
3+
Find all CRD reference for the Stackable Operator for Apache Airflow at: {crd-ref}{crd-ref-release}&operator=airflow-operator.

‎docs/modules/airflow/pages/required-external-components.adoc‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,6 @@ Fully supported for production usage:
1212
NOTE: The SDP Airflow images do not bundle the MySQL provider for Airflow.
1313
If you need MySQL or MariaDB as an Airflow back-end, you will need to create a custom image to include this provider.
1414

15-
The Celery exectutor also requires:
15+
The Celery executor also requires:
1616

1717
* Redis (any stable version)

‎docs/modules/airflow/pages/troubleshooting/index.adoc‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ with DAG(
139139
----
140140

141141
Assume this DAG lies in the `dags` folder in the current directory.
142-
Testing this with `ruff` indicates one incompatability with Airflow 3.x and one deprecated operator:
142+
Testing this with `ruff` indicates one incompatibility with Airflow 3.x and one deprecated operator:
143143

144144
[source,bash]
145145
----

‎docs/modules/airflow/pages/usage-guide/mounting-dags.adoc‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ include::example$example-airflow-dags-configmap.yaml[]
2727
[WARNING]
2828
--
2929
If a DAG mounted via ConfigMap consists of modularized files, Python uses this as a "root" directory when looking for referenced files.
30-
If this is the case, then either the standard DAGs location should be used, or `PYTHONPATH` should be overriden to point to the new location (it is also necessary to include the logging configuration in the path) as shown below:
30+
If this is the case, then either the standard DAGs location should be used, or `PYTHONPATH` should be overridden to point to the new location (it is also necessary to include the logging configuration in the path) as shown below:
3131
[source,yaml]
3232
----
3333
envOverrides: &envOverrides

‎typos.toml‎

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# Configuration for typos (https://github.com/crate-ci/typos), run via the prek
2+
# hook in .pre-commit-config.yaml.
3+
4+
[files]
5+
# Bare `typos` skips hidden dirs by default, but prek passes explicit paths and
6+
# so does check them. Turn it off so both agree.
7+
ignore-hidden = false
8+
9+
extend-exclude = [
10+
# Ignore `.git`, which the above `ignore-hidden = false` would otherwise pull in.
11+
".git/",
12+
# Generated by crate2nix (`make regenerate-nix`). Already skipped by the prek
13+
# top-level `exclude`; listed here so a bare `typos` run agrees.
14+
"Cargo.nix",
15+
# Generated by `make regenerate-charts` from the Rust doc comments, which are
16+
# checked at their source. The rest is Kubernetes' own schema documentation.
17+
"extra/crds.yaml",
18+
]
19+
20+
[default]
21+
# typos has no native suppression directive
22+
# (https://github.com/crate-ci/typos/issues/316), so these regexes provide one.
23+
# A marker must sit in a comment: after `#`, `//` or `;` (free text may follow),
24+
# or inside a closed `<!-- -->`, `/* */` or `{# #}` (free text may precede the
25+
# closer). An unterminated `typos:ignore-block-start` suppresses nothing.
26+
#
27+
# Use one of the following when the word is correct at one place but would still be a typo elsewhere:
28+
#
29+
# # typos:ignore-line at the end of the line it applies to
30+
# # typos:ignore-next-line on its own line, above the offending line
31+
# # typos:ignore-block-start / typos:ignore-block-end around a block
32+
extend-ignore-re = [
33+
'(?Rm)^.*?(?:(?:^|[^{])(?:#|//|;)[ \t]*typos:ignore-line\b.*|(?:<!--[ \t]*typos:ignore-line\b.*?-->|/\*[ \t]*typos:ignore-line\b.*?\*/|\{#[ \t]*typos:ignore-line\b.*?#\})[ \t]*)$',
34+
'(?Rm)^[ \t]*(?:(?:#|//|;)[ \t]*typos:ignore-next-line\b.*|(?:<!--[ \t]*typos:ignore-next-line\b.*?-->|/\*[ \t]*typos:ignore-next-line\b.*?\*/|\{#[ \t]*typos:ignore-next-line\b.*?#\})[ \t]*)\r?\n.*$',
35+
'(?ms)(?:(?:^|[^{])(?:#|//|;)[ \t]*typos:ignore-block-start\b|<!--[ \t]*typos:ignore-block-start\b[^\n]*?-->|/\*[ \t]*typos:ignore-block-start\b[^\n]*?\*/|\{#[ \t]*typos:ignore-block-start\b[^\n]*?#\}).*?(?:(?:^|[^{])(?:#|//|;)[ \t]*typos:ignore-block-end\b|<!--[ \t]*typos:ignore-block-end\b[^\n]*?-->|/\*[ \t]*typos:ignore-block-end\b[^\n]*?\*/|\{#[ \t]*typos:ignore-block-end\b[^\n]*?#\})',
36+
# Hex suffix of a Keycloak client ID in commented-out OIDC test config.
37+
'OIDC_[0-9A-F]{16}_',
38+
]
39+
40+
# Before adding an entry in here, consider an in-place marker instead.
41+
# Every entry below gets a one-line comment saying what the word is.
42+
[default.extend-words]
43+
# Azure Kubernetes Service
44+
aks = "aks"
45+
# certifi, the Python CA bundle package that the operator appends the TLS CA to.
46+
certifi = "certifi"

0 commit comments

Comments
 (0)