-
Notifications
You must be signed in to change notification settings - Fork 125
fix(deployment): upgrade pulumi, solve race-condition between Service and Deployment, fix Secrets updating
#7460
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
Conversation
Summary of ChangesHello @dotansimha, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request focuses on updating the core Pulumi dependencies within the deployment configuration. The primary objective is to bring the Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request upgrades Pulumi dependencies. According to the repository's style guide, changes that affect deployment and self-hosted instances require a changeset. As this change modifies deployment tooling, please add a changeset for the hive scope to document this upgrade for users.
🚀 Snapshot Release (
|
| Package | Version | Info |
|---|---|---|
@graphql-hive/apollo |
0.46.0-alpha-20260107091850-1b1fe7943dc29c53983ca218291e4f30fb50bb68 |
npm ↗︎ unpkg ↗︎ |
@graphql-hive/cli |
0.57.0-alpha-20260107091850-1b1fe7943dc29c53983ca218291e4f30fb50bb68 |
npm ↗︎ unpkg ↗︎ |
@graphql-hive/core |
0.19.0-alpha-20260107091850-1b1fe7943dc29c53983ca218291e4f30fb50bb68 |
npm ↗︎ unpkg ↗︎ |
@graphql-hive/envelop |
0.40.1-alpha-20260107091850-1b1fe7943dc29c53983ca218291e4f30fb50bb68 |
npm ↗︎ unpkg ↗︎ |
@graphql-hive/yoga |
0.46.1-alpha-20260107091850-1b1fe7943dc29c53983ca218291e4f30fb50bb68 |
npm ↗︎ unpkg ↗︎ |
hive |
8.14.0-alpha-20260107091850-1b1fe7943dc29c53983ca218291e4f30fb50bb68 |
npm ↗︎ unpkg ↗︎ |
hive-apollo-router-plugin |
2.3.6-alpha-20260107091850-1b1fe7943dc29c53983ca218291e4f30fb50bb68 |
npm ↗︎ unpkg ↗︎ |
hive-console-sdk-rs |
0.2.3-alpha-20260107091850-1b1fe7943dc29c53983ca218291e4f30fb50bb68 |
npm ↗︎ unpkg ↗︎ |
📚 Storybook DeploymentThe latest changes are available as preview in: https://pr-7460.hive-storybook.pages.dev |
💻 Website PreviewThe latest changes are available as preview in: https://pr-7460.hive-landing-page.pages.dev |
|
🐋 This PR was built and pushed to the following Docker images: Targets: Platforms: Image Tag: |
31b80ee to
4e411c1
Compare
73d8c29 to
80ad3b3
Compare
ok try this fix(service): do not use Pulumi `parent` for Service <> Deployment relation ok try this
4b66818 to
2beb9b4
Compare
with the deployment
Service and Deployment, fix Secrets updating
| } | ||
| } | ||
|
|
||
| export function createService(name: string, deployment: kx.Deployment) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The main difference from @pulumi/kubernetesx are:
- we evaluate
labelsandportsseparately (instead of grouping them together and construct thespecfield) - this leads to loose dependency and only change theServiceif the port or labels has chaneged (instead of any change). - No
parentset on the Pulumi resource, so no strict coupling between theServiceand theDeployment.
| ) { | ||
| this.raw = data; | ||
| this.record = new k8s.core.v1.Secret(this.name, { | ||
| metadata: { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we don't set explicit name, then Pulumi will use the this.name (pass the the ctor) and will appends some suffix to it. Since Secrets are immutable, when we change the secret, it will re-create a new one with a new suffix, leading to a chain of reaction that causes a RollingUpgrade to the pod.
If we explicitly set the name, then when the secret changes, we get a new one, and the Deployment needs to be re-created (instead of updated to point to the new Secret), and this leads to downtime as the pod is replaced without rolling upgrade.
In this PR, I've made some refactoring to the Pulumi deployment, mostly around
ServiceDeployment. With these changes, deployments are now faster, with zero downtime and no strong dependencies that might fail and cause a broken state.Deploymentreplacement whenSecretchanges (by allowing Pulumi to set theSecret'smetadata.name)DeploymentandService(by avoiding usingkubernetex'screateServicefunction, and use a custom one - we have now only a dependency onportsand not fullspec. Also no use ofparentfield of Pulumi). The relation now is loose and based on thematchLabelsonly.Serviceto be removed because it was strictly bound to theDeployment. (to confirm)devstagingCloses https://github.com/graphql-hive/deployment/issues/1412