Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Promote schema version from one target to another target #4021

Open
n1ru4l opened this issue Feb 21, 2024 · 0 comments
Open

Promote schema version from one target to another target #4021

n1ru4l opened this issue Feb 21, 2024 · 0 comments

Comments

@n1ru4l
Copy link
Collaborator

n1ru4l commented Feb 21, 2024

Right now you need to run schema:publish <pointer-to-graphql-schema>, for every target.
As an alternative we are thinking about just having the option of promoting the schema version from one target to the schema version of another target.

e.g. hive schema:promote <id>.

This would have the benefit of not requiring access to the graphql schema when mirroring a stage in a multi-environment deployment. E.g. when progressing a docker image from one one stage to another and the flow is not 1:1 backed by a version control system such as Git.

We need to figure out whether the <id> is something a Hive users pass along as a hive schema:publish parameter that needs to be unique across all publishes within a project, or whether this is something we provide as an output when running schema:publish, that the Hive user needs to store to later on pass it as a parameter for hive schema:promote <id>.

Example:

Git Branch Hive Target
main development
staging staging
production production

New features are developed on a branch that targets the main branch. The hive schema:check
command is run against the development target. conditional breaking changes are configured on
staging and production targets.

When the feature is ready for QA, the branch is merged into main. The hive schema:publish
command is triggered by CD workflow, and the schema is published to the development target.

When the feature is ready for staging, the main branch is merged into staging. The
hive schema:promote command is triggered by the CD workflow, and the schema version is published to the
staging target.

When the feature is ready for production, the staging branch is merged into production. The
hive schema:promote command is triggered by the CD workflow, and the schema published to the
production target.

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

No branches or pull requests

1 participant