Skip to content

Conversation

@Gvieve
Copy link
Collaborator

@Gvieve Gvieve commented Jan 29, 2026

Phase 8.1: Add Commit SHA Support & Enforce Minor/Patch Only Versioning

Changes

1. Add commit_sha to Repository Dispatch Payloads

  • File: .github/workflows/update.yml
  • Changes:
    • Updated Update job's repository_dispatch payload to include commit_sha: ${{ github.sha }}
    • Updated Manual_Update job's repository_dispatch payload to include commit_sha: ${{ github.sha }}

2. Remove Major Version Option from Workflows

  • Files: .github/workflows/update.yml, .github/workflows/version.yml
  • Changes:
    • Removed major from workflow_dispatch version_level options in update.yml (only minor and patch allowed)
    • Removed major from required PR labels check in version.yml (only minor and patch allowed)
    • Updated conditional logic in update.yml to reject major label

Problem & Solution

CDN Cache Race Condition

When the openapi repo commits a spec change and immediately triggers SDK generation, GitHub's CDN (raw.githubusercontent.com) caches files for 5 minutes. This can cause the workflow to download stale API specs instead of freshly committed changes.

Solution: Send commit_sha to SDK repos, enabling them to fetch the exact spec version that triggered the workflow, bypassing CDN cache.

Major Version Control

Major versions must remain locked to API versions (v20111101 = 2.x, v20250224 = 3.x). This prevents accidental major version bumps.

Solution: Remove major option from all version bump workflows, only allowing minor and patch.

Backwards Compatibility

Fully backwards compatible

  • SDK repos default to master branch if commit_sha is not provided
  • Other SDK repos (C#, Go, Java, Python, Ruby) will continue working without changes
  • New field in payload is simply ignored by SDKs that don't use it yet

@Gvieve Gvieve self-assigned this Jan 29, 2026
@Gvieve Gvieve added the minor Minor version update label Jan 29, 2026
@Gvieve Gvieve merged commit c82b864 into master Jan 29, 2026
15 checks passed
@Gvieve Gvieve deleted the gn/update-v20111101-add-automation-variables branch January 29, 2026 22:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

minor Minor version update

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants