Skip to content

feat: add context-batch-announcement schema publication and make schema upload script more fault-tolerant#2683

Open
JoeCap08055 wants to merge 3 commits intomainfrom
chore/add-content-batch-announcement-intent-and-schema
Open

feat: add context-batch-announcement schema publication and make schema upload script more fault-tolerant#2683
JoeCap08055 wants to merge 3 commits intomainfrom
chore/add-content-batch-announcement-intent-and-schema

Conversation

@JoeCap08055
Copy link
Copy Markdown
Collaborator

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:

  • Refactor hard-coded INTENTS and SCHEMAS data arrays to an external JSON file
  • Script accepts path to JSON file as a CLI argument
  • Check to see if a named intent exists before attempting to publish (eliminates failed "duplicate name" publications)
  • Check to see if a referenced intent exists on-chain before attempting to publish a schema
  • Check to see if a schema to be published matches the latest schema for the intent before attempting to publish a schema

@JoeCap08055 JoeCap08055 requested review from a team, aramikm, enddynayn and shannonwells and removed request for a team, aramikm and shannonwells April 1, 2026 15:19
@github-actions github-actions bot added metadata-changed Metadata has changed since the latest full release metadata-version-not-incremented Metadata has changed since the latest full release, but the version has not been incremented labels Apr 1, 2026
@codecov
Copy link
Copy Markdown

codecov bot commented Apr 1, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

Files with missing lines Coverage Δ
pallets/stateful-storage/src/lib.rs 68.81% <ø> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions github-actions bot removed metadata-changed Metadata has changed since the latest full release metadata-version-not-incremented Metadata has changed since the latest full release, but the version has not been incremented labels Apr 1, 2026
@JoeCap08055 JoeCap08055 enabled auto-merge (squash) April 1, 2026 17:49
Copy link
Copy Markdown
Collaborator

@shannonwells shannonwells left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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) {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How can we have both empty array and None as possible results?

"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"
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants