feat: add context-batch-announcement schema publication and make schema upload script more fault-tolerant#2683
Conversation
…ma upload script more fault-tolerant
Codecov Report✅ All modified and coverable lines are covered by tests.
🚀 New features to boost your workflow:
|
shannonwells
left a comment
There was a problem hiding this comment.
I just want to confirm if the behavior is expected against the latest frequency docker image.
| } | ||
|
|
||
| const schemaIds = intentResponse.unwrap().schemaIds; | ||
| if (!schemaIds.isSome || schemaIds.unwrap().length === 0) { |
There was a problem hiding this comment.
How can we have both empty array and None as possible results?
There was a problem hiding this comment.
Probably can't... or at least, don't expect to... just covering all bases 😄
| "deploy:mainnet:intent": "node index.mjs intents-and-schemas-to-publish.json MAINNET INTENT && exit 1", | ||
| "deploy:mainnet:schema": "node index.mjs intents-and-schemas-to-publish.json MAINNET SCHEMA && exit 1", | ||
| "deploy:paseo": "node index.mjs intents-and-schemas-to-publish.json PASEO && exit 1", | ||
| "deploy:local": "node index.mjs intents-and-schemas-to-publish.json LOCAL && exit 1" |
There was a problem hiding this comment.
I ran this against a frequency relay in docker and got the following, which appears to have hung. When I ran it against just a locally running, instant seal chain, it looks like it deployed everything.
Intent "ics.public-key-key-agreement" already exists with ID 21
Intent "ics.context-group-acl" already exists with ID 22
Intent "ics.context-group-metadata" already exists with ID 23
No intent exists for "ics.context-batch-announcement"
There was a problem hiding this comment.
Hmm. I've already run on Paseo & deployed the new intent & schema to testnet, seemed to work fine...
There was a problem hiding this comment.
Did you confirm your local relay setup was able to form blocks with Frequency extrinsics? Or just empty blocks?
Goal
The goal of this PR is to add an additional intent & schema (
context-batch-announcement) to the list of intents & schemas to be published. Also adds some resiliency to the script & makes it idempotent.Changes to
tools/schema-upload: