Skip to content

Conversation

vmaerten
Copy link
Member

Our schemas are updated as soon as changes are merged into the main branch, but this can be confusing since some features may not be released yet.

To solve this, I followed the same pattern we use for the documentation. The files next-schema.json and next-schema-taskrc.json will be copied to schema.json and schema-taskrc.json during the release process.

@vmaerten vmaerten changed the title feat: update schemas only when a release is done chore: update schemas only when a release is done Apr 25, 2025
@vmaerten vmaerten self-assigned this Apr 25, 2025
@vmaerten vmaerten added the area: releasing Changes related to the release process. label Apr 25, 2025
@vmaerten vmaerten marked this pull request as ready for review April 25, 2025 11:11
@vmaerten vmaerten requested a review from Copilot April 25, 2025 11:11
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR changes the release process so that schema files are only updated during an actual release rather than on every merge into the main branch.

  • Introduces constants for the schema and schema-taskrc file source/target paths.
  • Implements a new schema() function to copy these files.
  • Integrates the schema() call into the release workflow.
Files not reviewed (1)
  • website/static/next-schema-taskrc.json: Language not supported
Comments suppressed due to low confidence (1)

cmd/release/main.go:187

  • Consider renaming the function 'schema()' to something more descriptive like 'updateSchemas()' to better convey its purpose.
func schema() error {

@vmaerten vmaerten requested review from pd93 and andreynering April 25, 2025 11:12
Copy link
Member

@pd93 pd93 left a comment

Choose a reason for hiding this comment

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

Nice! This is a good idea. One small suggestion: We could update the CI step that we have for detecting changes to the wrong docs folder so that it detects changes to the wrong schema files too.

@vmaerten
Copy link
Member Author

Done !
I've made the choice to create another job in the workflow. This way we can have a proper error message

@vmaerten vmaerten merged commit e7084cd into main May 3, 2025
15 checks passed
@vmaerten vmaerten deleted the feat/release-schema branch May 3, 2025 15:11
vmaerten added a commit that referenced this pull request May 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: releasing Changes related to the release process.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants