Repository navigation
ci(repo): check Humanity's grants at staging deploy and every hour - #47
Merged
Merged
Conversation
A shared checker reads a name's live trustedProducts and compares them with HUMANITY_TRUSTED_PRODUCTS, with dim2 kept at context and storage. Its three outcomes are ok, grants wrong, and could not check; a failed read is never reported as wrong. deploy.yml reads peoplnext.paseo back after each paseo publish and fails on wrong grants confirmed by a second read; a new hourly workflow checks peopl.paseo and peoplnext.paseo and checks in with a Sentry cron monitor. Refs #40. Signed-off-by: Hadi Khairallah <hadikhairallah@outlook.com>
|
dim2-pr47-sandbox00 · logs
No Paseo preview: add the deploy-paseo label to deploy one. |
|
Preview: https://peopl-pr47-preview.testnet.li Open |
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.
peopl.paseo lost dim2's grants on 18 Nov and nothing told us, since there was no Humanity release that day (#40).
This adds a check that reads a name's grants straight from the chain and compares them with
HUMANITY_TRUSTED_PRODUCTS. It also makes sure dim2 keeps context and storage, so emptying the variable can't
pass either.
It runs in two places. After each paseo staging publish, deploy.yml reads peoplnext.paseo back and fails the job
if the grants are wrong, so the release can't promote that commit. It reads a second time 45 s later before
failing, since the RPC node might not have the new manifest yet. If the dotns CLI won't install or the read
fails, it only warns, because the release checks the staged grants again anyway. And a new workflow checks
peopl.paseo and peoplnext.paseo every hour.
A read that fails is never treated as missing grants. The check retries a few times, since the Paseo RPC can be
slow, and if it still can't read the name it says "Could not check the grants" instead of "Grants wrong". The
hourly run goes red in both cases, with a different title for each. It also checks in with a Sentry cron monitor,
humanity-grants, through the SENTRY_DSN secret we already have. That's Jollity's project, on purpose, since
it's Jollity's players who get hit when the grants break. The monitor gets created on the first run. Someone with
Sentry admin still needs to add a cron monitor alert on it, because a DSN can't do that part.
The release's own grants check now has the same dim2 rule.
Tested with unit tests for the comparison and the three outcomes, plus runs with a fake dotns CLI that hangs,
fails or changes its answer between reads. There are also tests that run the new workflow steps and the
release's grants check exactly as written. actionlint is clean. I also ran the check live against peopl.paseo and peoplnext.paseo, and both have the
right grants today.