Move helm-tests/ to chart/tests/ and merge pyproject.toml into chart's#66371
Open
potiuk wants to merge 2 commits intoapache:mainfrom
Open
Move helm-tests/ to chart/tests/ and merge pyproject.toml into chart's#66371potiuk wants to merge 2 commits intoapache:mainfrom
potiuk wants to merge 2 commits intoapache:mainfrom
Conversation
The Helm chart Python tests previously lived as their own workspace member at `helm-tests/` with a dedicated `apache-airflow-helm-tests` package. The chart sources and tests are inseparable in practice, so this collapses them into a single `chart` workspace member: the test files move under `chart/tests/`, and `helm-tests/pyproject.toml` is merged into `chart/pyproject.toml` (which adopts the helm-tests pytest config, the `mypy` dependency-group, and the test-only deps on `apache-airflow-devel-common` and `apache-airflow-providers-cncf-kubernetes`). Names that are user/CI-visible are intentionally preserved: * `breeze testing helm-tests` — command name unchanged. * `mypy-helm-tests` — prek hook id unchanged (now lives in `chart/.pre-commit-config.yaml`, pointing at `chart/tests`). * `run-helm-tests` — selective-checks output / CI gate, unchanged. * `helm-tests.yml` — CI workflow file, unchanged. * The directory `chart/tests/helm_tests/` keeps the Python package name `helm_tests` so test imports / module paths don't shift. Path references updated everywhere they pointed at the old layout: root `pyproject.toml` (workspace members, `[tool.uv.sources]`, `apache-airflow-helm-chart = false` constraint rows, ruff per-file ignores, mypy include path, dev dependency-group); `.github/CODEOWNERS` (folded the `/helm-tests/` line into the existing `/chart/` entry — same owners); `.github/dependabot.yml` and `dev/update_github_branch_config.py`; breeze internals (`global_constants.all_helm_test_packages`, `run_tests.TEST_GROUP_TO_TEST_FOLDERS[GroupOfTests.HELM]`, `run_tests.find_pytest_arguments`, `docker_command_utils` mounts, `selective_checks` regexes); `scripts/ci/docker-compose/local.yml` and `scripts/ci/prek/run_mypy_full_dist_local_venv_or_breeze_in_ci.py` (with a `FOLDER_TO_PROJECT["chart/tests"] = "chart"` override since `chart/tests` is not its own uv project); `dev/ide_setup/setup_idea.py`; root `.pre-commit-config.yaml` exclusions; docs in `contributing-docs/testing/helm_unit_tests.rst` and `dev/breeze/doc/ci/04_selective_checks.md`; existing breeze unit tests in `dev/breeze/tests/test_*.py`. `uv.lock` regenerated. NOTE: developers running `breeze` via `uvx --from dev/breeze` may need a one-time `uv cache clean` (or `touch dev/breeze/pyproject.toml`) after pulling this commit so uvx rebuilds breeze from the current source — uvx caches by content hash and will otherwise serve a stale breeze that still references the old `helm-tests/tests/helm_tests` path.
Locally building the chart with `breeze release-management
prepare-helm-chart-package` after the helm-tests → chart/tests move
revealed that the published chart `.tgz` was bundling four files that
chart consumers do not need and that we did not realise had been
shipping for a while:
* `pyproject.toml` (workspace-member metadata for the chart's pytest /
mypy config — irrelevant to consumers)
* `.pre-commit-config.yaml` (local dev/CI hook config)
* `docs/` (chart documentation source — rendered to
airflow.apache.org/docs/helm-chart/, not needed inside the .tgz)
* `newsfragments/` (towncrier source for building RELEASE_NOTES.rst at
release time)
Add all four to `chart/.helmignore` so they are no longer bundled.
To make sure this doesn't drift again, add a small verification script
`scripts/ci/verify_helm_chart_package.py` that:
* Reads the packaged `.tgz` and asserts the top-level entries match an
explicit allowlist (Chart.yaml, values.yaml, templates/, etc.). Any
newly-introduced top-level file fails the check until it is either
added to the allowlist (chart-relevant) or to `.helmignore` (dev-only).
* Runs `helm lint` against the same `.tgz`.
Wire the script into the existing `tests-helm-release` job in
`.github/workflows/helm-tests.yml`, right after
`prepare-helm-chart-package` produces the artifact and before signing,
so a regression in the packaged set fails CI immediately.
The script is also runnable locally:
uv run scripts/ci/verify_helm_chart_package.py dist/airflow-1.22.0.tgz
Miretpl
approved these changes
May 5, 2026
jscheffl
approved these changes
May 5, 2026
Contributor
jscheffl
left a comment
There was a problem hiding this comment.
Some merge conflicts now... but otherwise - cool! Thanks for the cleanup!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The Helm chart Python tests previously lived as their own workspace
member at
helm-tests/with a dedicatedapache-airflow-helm-testspackage. The chart sources and tests are inseparable in practice, so
this collapses them into a single
chartworkspace member: the testfiles move under
chart/tests/, andhelm-tests/pyproject.tomlismerged into
chart/pyproject.toml. The chart pyproject adopts theformer helm-tests pytest config, the
mypydependency-group, and thetest-only deps on
apache-airflow-devel-commonandapache-airflow-providers-cncf-kubernetes.What stays (user/CI-visible names)
Intentionally not renamed in this PR — that would have a much wider
ripple in CI/release tooling than the directory move itself:
breeze testing helm-tests— command name unchanged.mypy-helm-tests— prek hook id unchanged (now lives inchart/.pre-commit-config.yaml, with the entry pointing at the newchart/testsfolder).run-helm-tests— selective-checks output / CI gate variable.helm-tests.yml— CI workflow file.chart/tests/helm_tests/keeps the Python packagename
helm_testsso test imports and--test-type Xargumentsdon't shift.
What changed
pyproject.toml: workspace member ("helm-tests"→"chart"),[tool.uv.sources],apache-airflow-helm-chart = falseconstraintrows, ruff per-file ignores, mypy include path, dev dependency-group.
.github/CODEOWNERS: folded the/helm-tests/line into theexisting
/chart/entry (same owners, just absorbs the test path)..github/dependabot.ymlanddev/update_github_branch_config.py:/helm-tests→/chart.global_constants.all_helm_test_packages,run_tests.TEST_GROUP_TO_TEST_FOLDERS[GroupOfTests.HELM],run_tests.find_pytest_arguments(drop the now-redundant innertests/segment),docker_command_utilsmounts (thehelm-testsmount is gone;chart/was already mounted),selective_checksregexes(
HELM_FILES,ALL_HELM_TESTS_PYTHON_FILES,ALL_SOURCE_FILES).scripts/ci/docker-compose/local.yml: drop the redundanthelm-testsbind mount.scripts/ci/prek/run_mypy_full_dist_local_venv_or_breeze_in_ci.py:_TOP_LEVEL_ALLOWED_FOLDERSswap and aFOLDER_TO_PROJECT["chart/tests"] = "chart"override sincechart/testsis not its own uv project — it lives inside thechartworkspace member.dev/ide_setup/setup_idea.py: module list..pre-commit-config.yaml: two test-file path exclusions.contributing-docs/testing/helm_unit_tests.rstanddev/breeze/doc/ci/04_selective_checks.md.dev/breeze/tests/test_*.pyupdatedto assert the new paths.
uv.lock(workspace-member renameapache-airflow-helm-tests→apache-airflow-helm-chart).Follow-up: tighten chart packaging + add a CI guard (commit
910a4762e6)Building the chart with
breeze release-management prepare-helm-chart-packageafter the moverevealed that the published chart
.tgzhad been bundling four filesthat chart consumers do not need:
pyproject.toml(workspace-member metadata for the chart's pytest/ mypy config — irrelevant to consumers)
.pre-commit-config.yaml(local dev/CI hook config)docs/(chart documentation source — already rendered toairflow.apache.org/docs/helm-chart/, no need to ship inside the .tgz)
newsfragments/(towncrier source for buildingRELEASE_NOTES.rstat release time)
All four are now in
chart/.helmignore, so the packaged set dropsfrom 19 → 16 top-level entries. To keep this from drifting again:
New script
scripts/ci/verify_helm_chart_package.pyreads a packaged
.tgz, asserts the top-level entries match anexplicit allowlist, and runs
helm lintagainst the same archive.Any newly-introduced top-level file fails the check until it is
either added to the allowlist (chart-relevant) or to
.helmignore(dev-only). Runnable locally:The verifier is wired into the existing
tests-helm-releasejobin
.github/workflows/helm-tests.yml, right afterprepare-helm-chart-packageproduces the artifact and beforesigning — a regression in the packaged set fails CI immediately.
Caveat for local devs
Developers running
breezeviauvx --from dev/breeze(the standardADR-0017 shim) may need a one-time
uv cache clean(or justtouch dev/breeze/pyproject.toml) after pulling this commit so uvxrebuilds breeze from the current source. uvx caches by content hash
and will otherwise serve a stale breeze that still references the old
helm-tests/tests/helm_testspath. CI runs aren't affected (each jobgets a fresh uv cache).
Test plan
prek run --all-filespasses (only the unrelated FAB pnpmENAMETOOLONG issue from this worktree's nested path remains).
Run mypy for helm-tests(themypy-helm-testshook onchart/.pre-commit-config.yaml) passes againstchart/tests/.Lint Helm Chart,Kubeconform,Validate chart annotationsand the chart schema/yaml hooks all pass.
uv run --project dev/breeze pytest dev/breeze/tests/test_pytest_args_for_test_types.py dev/breeze/tests/test_selective_checks.py— 194 passed.breeze release-management prepare-helm-chart-packagebuilds a280 KB
airflow-1.22.0.tgzwhose 16 top-level entries matchthe verifier's allowlist;
helm lintpasses.uv run scripts/ci/verify_helm_chart_package.py dist/airflow-1.22.0.tgzreports
top-level contents: OK/helm lint: OK.Helm testsjob runs against the new path on this PR.Static checksjob stays green.Was generative AI tooling used to co-author this PR?
Generated-by: Claude Code (Opus 4.7) following the guidelines