-
Notifications
You must be signed in to change notification settings - Fork 64
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
Remove releaseId and imageId from container names #2136
base: master
Are you sure you want to change the base?
Conversation
e285017
to
ea5fb85
Compare
91949cf
to
bcc2617
Compare
On local push, the CLI uses `localrelease` as the `commit` property for the development application. This is not a valid uuid and will not be read properly by the supervisor, as seen in https://github.com/balena-os/balena-supervisor/blob/master/src/compose/service.ts#L652 While this is not a problem right now, the commit is becoming the main way to identify a service release (replacing `releaseId` and `imageId`), and the invalid release uuid could cause update issues when pushing a local release on when using some API endpoints. Change-type: patch Relates-to: balena-os/balena-supervisor#2136
On local push, the CLI uses `localrelease` as the `commit` property for the development application. This is not a valid uuid and will not be read properly by the supervisor, as seen in https://github.com/balena-os/balena-supervisor/blob/master/src/compose/service.ts#L652 While this is not a problem right now, the commit is becoming the main way to identify a service release (replacing `releaseId` and `imageId`), and the invalid release uuid could cause update issues when pushing a local release on when using some API endpoints. Change-type: patch Relates-to: balena-os/balena-supervisor#2136
On local push, the CLI uses `localrelease` as the `commit` property for the development application. This is not a valid uuid and will not be read properly by the supervisor, as seen in https://github.com/balena-os/balena-supervisor/blob/master/src/compose/service.ts#L652 While this is not a problem right now, the commit is becoming the main way to identify a service release (replacing `releaseId` and `imageId`), and the invalid release uuid could cause update issues when pushing a local release on when using some API endpoints. Change-type: patch Relates-to: balena-os/balena-supervisor#2136
a915937
to
74aa838
Compare
74aa838
to
8a47e0f
Compare
8a47e0f
to
4b772c4
Compare
The supervisor is changing the container name format from `<serviceName>_<imageId>_<releaseId>_<commit>` to `<serviceName>_<commit>`. This updates the SSH command to work with both formats. Change-type: minor Depends-on: balena-os/balena-supervisor#2136
fd6c890
to
6171d96
Compare
The release id is not really necessary for reporting the current state since v3 (it has been replaced by `releaseUuid`) and is only kept for backwards compatibility for some supervisor API endpoints. Until now, the `releaseId` was part o the container name, leading to longer names than desired. This change removes the value from the container name and modifies queries to look for the value in the image database. Change-type: minor Relates-to: #2077
6171d96
to
fbdb2ca
Compare
@cywang117 remember to take a look at this when you get a chance |
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.
LGTM, great work!
src/device-api/v2.ts
Outdated
// QUESTION: what to do if we cannot find the image? | ||
// if the image database got deleted | ||
s.imageId = allImages.find( | ||
(img) => img.commit === svc.commit && img.serviceName === s.serviceName, | ||
)?.imageId; | ||
|
||
return s; |
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.
I don't think we need to worry about this, if the image table got deleted unexpectedly, then the action would have thrown a lot earlier during images.getState
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.
I don't think images.getState
would throw, but we recreate the image database when initializing application manager so if the data from getState
should be correct, so you are right the comment is unnecessary
The supervisor is changing the container name format from `<serviceName>_<imageId>_<releaseId>_<commit>` to `<serviceName>_<commit>`. This updates the SSH command to work with both formats. Change-type: minor Depends-on: balena-os/balena-supervisor#2136
The supervisor is changing the container name format from `<serviceName>_<imageId>_<releaseId>_<commit>` to `<serviceName>_<commit>`. This updates the SSH command to work with both formats. Change-type: minor Depends-on: balena-os/balena-supervisor#2136
The supervisor is changing the container name format from `<serviceName>_<imageId>_<releaseId>_<commit>` to `<serviceName>_<commit>`. This updates the SSH command to work with both formats. Change-type: minor Depends-on: balena-os/balena-supervisor#2136
The image id is no longer necessary to report the current state since moving to v3 of the state endpoint and it is only kept for backwards compatibility for some supervisor API endpoings. Until now, `imageId` was part of the container name leading to longer names than desired. This change removes the value from the container name an modifies queries to look for the value in the image database. This also removes the imageId from the log stream which should result in reduced bandwidth usage. Change-type: minor
This allows to compare the current and target container names and trigger an `updateMetadata` step if they are different. This allows us to normalize the container name format with a new supervisor update. Change-type: minor
fbdb2ca
to
f7ed27f
Compare
The supervisor is changing the container name format from `<serviceName>_<imageId>_<releaseId>_<commit>` to `<serviceName>_<commit>`. This updates the SSH command to work with both formats. Change-type: minor Depends-on: balena-os/balena-supervisor#2136
Will need to refactor this, I had not considered that, because of the git workflow, in a multi-app world you could have two apps pointing to the same release commit. Will probably need to keep the releaseId |
The release id and image id are not really necessary for reporting the current state since v3 (it has been replaced by
releaseUuid
+imageName
) and is only kept for backwards compatibility for some supervisor API endpoints.Until now, both the
releaseId
andimageId
were part of the container name, leading to longer names than desired. This change removes those values from the container name and modifies queries to look for the value in the image database.This also removes
imageId
from the log stream, which was no longer used by the backend and should result in some bandwidth usage improvementsChange-type: minor
Relates-to: #2077