Repository navigation
feat(hydra-gates): gate 109 accepts a slug owned by a sibling app, and verifies it - #843
Merged
Merged
Conversation
A seed may require a schema slug another app owns, named on its own line: # hydra-gate-109 external: <slug> owner=<app> The gate checks the claim: the owner must be in the caller's additional-apps and its descriptors must declare the slug. An owner it cannot read fails and is named. quality.yml checks the caller's additional-apps out for the gates job (read-only token, no credentials persisted).
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.
What changes
Gate 109 (seed-required-slugs) now lets an e2e seed require a schema slug that another app owns, and checks the claim instead of trusting it.
The seed names the owner on a line of its own, in the same
hydra-gate-<n> <verb>:shape as thehydra-gate-98 held:marker:The gate then verifies three things:
additional-appsore2e-additional-apps.Also:
STALEand does not fail.hydra-gate-109line that does not parse fails, so a typo in the directive is not silently ignored.Where the gate reads the owner from in CI
The Hydra Gates job checks out one repository, so it could not see a sibling. quality.yml now clones the caller's
additional-appsande2e-additional-appsinto$RUNNER_TEMP/gate-siblings/<app>at the refs the caller installs, and hands the gate:HYDRA_GATE_ADDITIONAL_APPS: both lists as JSON, passed even when empty, so "installs nothing" and "was not told" stay different answers.HYDRA_GATE_SIBLINGS_DIR: where the clones are.A failed clone only warns. The gate fails, naming the owner and directory, and only when an annotation depends on it. The job now declares
permissions: contents: readand setspersist-credentials: falseon both checkouts, as every other job that clones sibling apps does (keepiq#881).assert-sibling-jobs-read-only-token.pypasses, including its positive control.An older pinned gate package ignores the two variables, so nothing changes for callers until they move
hydra-gates-ref.Verified
test_check_seed_required_slugs.py: exit 0. New arms, each with a control that flips one thing: declared by owner passes (misspelt owner slug and misspelt annotation slug fail), owner unreadable fails (no dir, missing dir, no descriptors), additional-apps not provided or empty or missing the owner fails, stale annotation reported, unannotated slug fails with the original message, malformed directive fails.check_gate_numbers_unique.sh: exit 0.tests/test-hydra-gates-bin.sh: exit 0.shellcheckon the new workflow step: clean.decision-tabel, fails with an empty siblings dir.Not covered
hydra-gates-refthat includes this change before an annotation counts.Next step: merge, tag a gates release, then buildiq#1100 can pass gate 109 once it moves its pin.