-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
[db] Add statusVersion to prebuilds to track status version #9114
Conversation
@@ -634,6 +634,7 @@ export interface PrebuiltWorkspace { | |||
buildWorkspaceId: string; | |||
creationTime: string; | |||
state: PrebuiltWorkspaceState; | |||
statusVersion: number; |
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.
Not entirely happy that the statusVersion needs to be exposed in the protocol and sent to clients. Is there a way (without significantly changing the system) to have this data only available to internal components and continue not having it in clients?
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.
continue not having it in clients?
You could :
- introduce a sub-shape of that we use in protocol, and a more expanded shape we expose in
GitpodService
- and hand-remove this field when sending it to clients (we do this with some sensitive field of
WorkspaceInstance
inGitpodServerImpl
) - but I'm not sure it warrant's the effort, now and for this single field. Let's hope make it better with the new API 😉
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.
Thanks, that's what I was thinking as well. Unless there is a strong objection, I'll leave it as is for now.
@easyCZ I wonder if we could place the field into |
I'd rather avoid inheritance for things like the DB schema and core protocol. It introduces coupling which can create unintended side-effects (especially on the DB level) when you try to break it up. I'm happy to compose it into both, however, if you think it's needed. |
Hm, I'd rather stick to the current idea of "data deduplication" (inheritance 👻 ) even if maintain the tight coupling between both tables. If we want to split it out we have to look at it more holistically I fear. There might be a reason for duplication, though, especially for prebuilds. But I cannot think of one ad-hoc. 🤔 |
From what I can see, the ORM definition of Prebuilds does not currently have any inheritance specified [file]. And neither does the protocol [file]. Where exactly do you want to add inheritance? I'd be open to defining an interface which has a field |
Summary: We're going with the statusVersion field in the prebuilds tabe |
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
Thanks for the review and discussion @geropl! /unhold |
Description
Related Issue(s)
How to test
Release Notes
Documentation
/hold
/uncc