- Notifications
You must be signed in to change notification settings - Fork1k
feat(coderd): add last_seen_at and version to provisioner_daemons table#11033
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
a05e8ae
to546e211
Compare546e211
to1c7c901
ComparetypeProvisionerDaemonstruct { | ||
ID uuid.UUID`json:"id" format:"uuid"` | ||
CreatedAt time.Time`json:"created_at" format:"date-time"` | ||
UpdatedAt sql.NullTime`json:"updated_at" format:"date-time"` |
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.
nit: just spotted, if this issql.NullTime
, then the property should haveomitempty
.
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.
Just a note here thatomitempty
isn't actually relevant. Sincesql.NullTime
is a struct, it can't be omitted even when the struct is "zero".
https://go.dev/play/p/SGmN64SRt8F
Omitemptycan be relevant in e.g. codersdk when we usecodersdk.NullTime
that implementsMarshalJSON
. In that case it might help with generation of TypeScript types (unless we handle the type specifically in gen).
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 just realized that usingformat
here is wrong, too (it'd be OK forcodersdk.NullTime
).
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.
@mafredri sounds likeUpdatedAt
should be acodersdk.NullTime
then in the API struct?
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.
Yeah@johnstcn, I think that would be better 👍🏻
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.
Uh oh!
There was an error while loading.Please reload this page.
52dffd9
todf18a13
Compare
Uh oh!
There was an error while loading.Please reload this page.
Related to#10676
Updates LastUsedAt to be awill be done infix(codersdk): make codersdk.ProvisionerDaemon.UpdatedAt a codersdk.NullTime #11037codersdk.NullTime
instead of asql.NullTime