Repository navigation
ci: One Python call runs each Flatpak manifest validator step (GEN-005) - #2688
Merged
Merged
Conversation
…refs #2687) RED: the action's two steps are still multi-line `run: |` blocks, the module does not exist, and ci.toml still carries the action's GEN-005 exception. 16 tests; 13 failures + 2 errors on this commit.
…5, refs #2687) `ci/flatpak_manifest_validate.py` does what the action's two shell blocks did: `guard` prints the notice and exits 2 for an unsupported runner, and `validate` runs `build-aux/format-manifest.py --check`, returning its status unless `failCondition` is `never` (the old `set +e`). Set Up uv moves above the guard, since the guard now calls `uv`. The action's GEN-005 exception is deleted: `ci-lint precheck` 489 -> 487 approved exceptions, same 11 violations, no finding left.
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.
Closes #2687.
.github/actions/flatpak-manifest-validator/action.yamlcarried two multi-linerun:blocks, so it produced two GEN-005 findings (the exception is path-scoped: the block leavesci.tomlonly when both are gone).RED
3b08bf81— the test onlyci/test_flatpak_manifest_validator.py, 16 tests: 13 failures + 2 errors on this commit (the module does not exist, both steps are stillrun: |blocks, and the GEN-005 exception is still inci.toml).It pins:
guard: prints::notice::<reason>and exits 2, and--noticeis required;validate: the formatter's status is the step's status, except under--fail-condition never(the oldset +e), against real manifest fixtures — formatted, unformatted, missing, and the checked-in default;::group::Run Validation/::endgroup::;run:, no shell control syntax,astral-sh/setup-uvinstalled before both calls, the module path absolute so a customworkingDirectorystill resolves it;[[exceptions]]block left for the action.GREEN
6c5dc66e— the portci/flatpak_manifest_validate.py(#!/usr/bin/env -S uv run --no-project --script, standard library only):echo+exit 2shell block… guard --notice "…"::group::+if … set +e+uv run build-aux/format-manifest.py… validate --manifest … --fail-condition ${{ inputs.failCondition }}Two deliberate differences, both visible in the diff:
Set Up uvmoves above the guard. The guard used to run first as plain shell; it now callsuv, which a Windows runner does not have on its own. It still fails an unsupported runner (exit 2 + notice) before the check runs.: Validate Flatpak Manifest 🕵️/: Check Runner …echo labels are dropped from the tworun:bodies, since the step names already carry them.Evidence
ci/test_flatpak_manifest_validator.py: 16 OK on GREEN.ci-lint precheck(uvx --from git+…ci.yml@a1917ce7 ci-lint precheck) before:11 violation(s), 489 approved exception(s), 10 needs_review→ after:11 violation(s), 487 approved exception(s), 10 needs_review, noflatpak-manifest-validatorfinding left.ci/test_ci_toml.py41 tests OK,ci/test_uv_run.py5 tests OK,ruff checkclean..github/workflows/check-format.yaml(Format 🔍 / checks,failCondition: error), so PR CI exercises both scripts for real.docs/features.mdline: build tooling only.Noticed, left alone: the
manifestFileinput is declared but unused (the path is hard-coded), and the guard's notice text says "services-validation action" (copied fromservices-validator).