fix: resolve superlinter failures and require --recreate for RHDP cluster idempotency - #128
Merged
butler54 merged 2 commits intoAug 30, 2026
Conversation
…, and python Super linter has failed on every push/PR for weeks (100% failure rate on the last 50 runs). None of the failures came from vendored code (charts/vendor/kyverno/* is already excluded via FILTER_REGEX_EXCLUDE and was verified to contribute zero lint errors). - markdownlint: fix real formatting issues (missing blank lines around headings/lists/fences, bad list-item numbering, a missing table cell) across issue templates, README.md, airgap/DEPLOY-RUNBOOK.md, docs/disconnected-deployment.md, and the kubevirtvm chart README. Two of these were genuine content bugs: a skipped step number in README.md and a missing empty cell in a DEPLOY-RUNBOOK.md status table. - textlint (NATURAL_LANGUAGE): fix the 14 flagged terminology instances (git/repo/unix/indexes/READMEs) across 5 files to match the rule's suggested terms. - isort: fix import ordering in scripts/git-http-server.py. - pyink: disable VALIDATE_PYTHON_PYINK in superlinter.yml. It actively conflicts with Black (which already passes and matches the project's .flake8 comment 'match black default'); super-linter itself warns against enabling both. No other validatedpatterns/* repo enables Pyink; two explicitly disable it alongside Black. Verified locally against the exact tool versions super-linter pins (markdownlint 0.44.0-equivalent ruleset, textlint default terminology config, isort 6.0.1, black 25.1.0, flake8 7.2.0, mypy 1.15.0) with zero remaining issues.
Fixes validatedpatterns#110 rhdp-cluster-define.py unconditionally wiped the install directory (and ~/.azure) on every run, before openshift-install ever got a chance to run its own built-in refusal-to-overwrite check. Re-running any of the rhdp/wrapper*.sh scripts against a directory that already had a cluster installed silently discarded that cluster's local install state and provisioned a new one on top, with no destroy step -- orphaning any still-live Azure resources from the previous run. Add a --recreate flag, threaded through wrapper.sh, wrapper-cluster-only.sh, wrapper-multicluster.sh, and rhdp-cluster-define.py's run()/cleanup(). By default, if an install directory already contains cluster state (metadata.json), the tool now exits with an error before touching anything, and prints instructions to either destroy the existing cluster first or pass --recreate. --recreate only wipes the local install directory -- it deliberately does NOT call 'openshift-install destroy cluster' (scope kept minimal per review), and prints an explicit warning to that effect each time it's used, so cloud resources from a previous install aren't destroyed or silently orphaned without the operator's awareness. Verified with unit-level scenario tests (fresh dir, existing state without --recreate, existing state with --recreate) and an end-to-end CLI run of rhdp-cluster-define.py exercising all three paths.
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
Super linter has failed on every push/PR for weeks (100% failure rate across the last 50 runs). This PR fixes the recurring failures and, to make it a substantive change, also resolves #110.
1. Superlinter fixes
Checked the vendored kyverno chart (
charts/vendor/kyverno/*) first — it's already excluded viaFILTER_REGEX_EXCLUDEinsuperlinter.ymland contributes zero lint errors. All actual failures were in first-party files:README.md,airgap/DEPLOY-RUNBOOK.md,docs/disconnected-deployment.md, and the kubevirtvm chart README. Two were genuine content bugs, not just style: a skipped step number inREADME.md(4.→6., now5.) and a status table row inDEPLOY-RUNBOOK.mdmissing its third (empty) cell.git→Git,repo→repository,unix→Unix,indexes→indices,READMEs→readmes) across 5 files.scripts/git-http-server.py.VALIDATE_PYTHON_PYINKinsuperlinter.yml. It conflicts with Black (which already passes, and matches this repo's own.flake8comment "match black default"); super-linter itself warns against enabling both. No othervalidatedpatterns/*repo enables Pyink —utilitiesandindustrial-edgeexplicitly disable it.Verified locally against the exact tool versions/config super-linter uses (isort 6.0.1, black 25.1.0, flake8 7.2.0, mypy 1.15.0 — all pass; markdownlint and textlint's default
terminologyrule — zero remaining issues on all touched files).2. Fixes #110 — RHDP wrapper scripts are not idempotent
Root cause:
rhdp/rhdp-cluster-define.py'scleanup()unconditionally wiped the install directory (and~/.azure) on every run, beforeopenshift-installever got a chance to run its own built-in refusal-to-overwrite check. Re-running anyrhdp/wrapper*.shscript against a directory that already had a cluster installed silently discarded that cluster's local state and provisioned a new one on top — with no destroy step, orphaning any still-live Azure resources.Fix: add a
--recreateflag, threaded throughwrapper.sh,wrapper-cluster-only.sh,wrapper-multicluster.sh, andrhdp-cluster-define.py.metadata.json), the tool now exits with an error before touching anything, listing the affected directories and instructing the user to either destroy the existing cluster first (openshift-install destroy cluster --dir=<dir>) or pass--recreate.--recreateonly wipes the local install directory. It deliberately does not callopenshift-install destroy cluster(kept minimal in scope), and prints an explicit warning every time it's used that cloud resources from a previous install may be orphaned if they weren't destroyed manually first.rhdp/README.mddocuments the new default-safe behavior and the--recreatecaveat.Verified with scenario tests (fresh directory, existing state without
--recreate, existing state with--recreate) and an end-to-end CLI run ofrhdp-cluster-define.pyexercising all three paths — see commit message for details. No live Azure access was available to test the wrapper scripts end-to-end against a real cluster.Test plan
scripts/git-http-server.py.github/linters/.markdown-lint.yml) reports 0 issues on all touched markdown filesterminologyconfig reports 0 issues on all touched markdown filesrhdp-cluster-define.pyscenario tests: fresh dir / existing state blocked / existing state +--recreatewipesbash -nsyntax check on all three wrapper scripts