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

Upgrade only executors actually impacted by the app changes #347

Merged
merged 6 commits into from
Sep 5, 2023

Conversation

nicoloboschi
Copy link
Member

@nicoloboschi nicoloboschi commented Sep 5, 2023

  • When deploying/updating an app, the CP computes the sha256 checksum for the python and java dir (two different digests) and put them in the s3 object metadata
  • Added new endpoint in the control plane /api/applications/{tenant}/{appid}/code/{codeid}/info to get the digest for python and java
{
  "digests": {"java": "xxx", "python": "yy"}
}

This is not exposed in the CLI since it might not have sense for the user since the archive code id is a non documented concept.

  • The runtime deployer job now mounts the cluster config + token (like the runtime pod).
  • The runtime deployer job calls the CP to get the digests for the new code archive id and the old one. If one of them changed, the new code archive id is applied to the agents. If not, the old is kept.

The net effect is that if an agent configuration has not changed and the custom code didn't change, the executors of that agent won't be restarted at all.

Current applications don't have the digest stored in S3. When updating an existing app with the new runtime code, the application will be restarted in any case if it contains custom code.

@nicoloboschi nicoloboschi marked this pull request as ready for review September 5, 2023 12:32
Copy link
Member

@eolivelli eolivelli left a comment

Choose a reason for hiding this comment

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

I have left one comment about how to compute the digest.
Otherwise LGTM

Copy link
Member

@eolivelli eolivelli left a comment

Choose a reason for hiding this comment

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

LGTM

@eolivelli eolivelli merged commit c333e37 into main Sep 5, 2023
8 checks passed
@eolivelli eolivelli deleted the smart-upgrades branch September 5, 2023 14:47
benfrank241 pushed a commit to vectorize-io/langstream that referenced this pull request May 2, 2024
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.

None yet

2 participants