Skip to content

add schema drift ci check#230

Open
kiftio wants to merge 2 commits into
mainfrom
schema-drift-check
Open

add schema drift ci check#230
kiftio wants to merge 2 commits into
mainfrom
schema-drift-check

Conversation

@kiftio
Copy link
Copy Markdown
Contributor

@kiftio kiftio commented May 28, 2026

What changes are you making?

Adds a CI check that regenerates protocol models and fails if the committed generated files are stale or unexpected.

Scenarios:

  • we've pulled a new schema (or manually changed files in protocol/schemas/**, or protocol/services/**), but failed to run dev codegen for one (or all) of the platforms.
  • we've modified generate_models.sh, but haven't re-run it

The Protocol Codegen Drift workflow:

  • installs the React Native Node/pnpm toolchain
  • runs protocol model generation for Kotlin, Swift, and TypeScript
  • fails on any resulting git diff

ci.yml now runs this workflow when protocol files, the workflow, setup action, or the RN package/lockfile change.

Why

Protocol schema changes can require regenerated SDK models across platforms. This check catches schema/codegen drift in CI instead of relying on reviewers or local regeneration.

Notes

  • Adds quicktype as a pinned React Native dev dependency so CI can run the existing generator.
  • Does not change protocol/scripts/generate_models.sh or generation behavior.

How to test

n/a

Before you merge

Important

  • I've added tests to support my implementation
  • I have read and agree with the Contribution Guidelines
  • I have read and agree with the Code of Conduct
  • I've updated the relevant platform README (platforms/swift/README.md and/or platforms/android/README.md)

Releasing a new Swift version?
  • I have bumped the version in ShopifyCheckoutKit.podspec
  • I have bumped the version in platforms/swift/Sources/ShopifyCheckoutKit/ShopifyCheckoutKit.swift
  • I have updated platforms/swift/CHANGELOG.md
  • I have updated the SwiftPM/CocoaPods version snippets in platforms/swift/README.md (major version only)
Releasing a new Android version?
  • I have bumped the versionName in platforms/android/lib/build.gradle
  • I have updated platforms/android/CHANGELOG.md
  • I have updated the Gradle/Maven version snippets in platforms/android/README.md

Tip

See the Contributing documentation for the full release process per platform.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 28, 2026

React Native — Coverage Report

Lines Statements Branches Functions
Coverage: 92%
91.59% (316/345) 87.25% (178/204) 100% (82/82)

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 28, 2026

Web — Coverage Report

Lines Statements Branches Functions
Coverage: 99%
98.8% (249/252) 87.85% (123/140) 100% (54/54)

@kiftio kiftio force-pushed the schema-drift-check branch from 1b6d4b1 to f5fb71b Compare May 28, 2026 14:51
@kiftio kiftio force-pushed the clean-quicktype-model-names branch from d82df96 to 6f0c157 Compare June 1, 2026 12:03
Base automatically changed from clean-quicktype-model-names to main June 1, 2026 12:23
@kiftio kiftio force-pushed the schema-drift-check branch 2 times, most recently from 98beba8 to 9092fbd Compare June 2, 2026 09:16
@kiftio kiftio marked this pull request as ready for review June 2, 2026 09:29
@kiftio kiftio requested a review from a team as a code owner June 2, 2026 09:29
Comment thread platforms/react-native/package.json
@kiftio kiftio force-pushed the schema-drift-check branch from 9092fbd to 6f0166e Compare June 2, 2026 12:57
@kiftio kiftio changed the base branch from main to 05-25-cleanup_quicktype_scripts June 2, 2026 12:58
Base automatically changed from 05-25-cleanup_quicktype_scripts to main June 2, 2026 13:04
@kiftio kiftio force-pushed the schema-drift-check branch from 6f0166e to fffbe61 Compare June 2, 2026 15:10
await run("node", [path.join(PROTOCOL_DIR, "scripts", "generate_typescript_notifications.mjs")]);

const declarationOutput = path.join(PROTOCOL_DIR, "languages", "typescript", "src", "index.d.ts");
const tscBin = path.join(REPO_ROOT, "platforms", "react-native", "node_modules", "typescript", "bin", "tsc");
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

think we should be using protocol rather than react-native

Comment thread protocol/package.json
"devDependencies": {
"quicktype": "23.2.6"
"quicktype": "23.2.6",
"typescript": "5.9.2"
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

pin version

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.

2 participants