-
Notifications
You must be signed in to change notification settings - Fork 888
fix: generate typescript types for healthcheck pkg #8846
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
6e6dea2
to
6d967c0
Compare
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 have wondered if we would ever branch out from the codersdk package.
I am not opposed to doing this, but I wonder if we should just concat these in the same file. Keeping them together helps with cross references, but if there are none, maybe we just run this twice. Once on each file and have 2 typesGenerated.ts
files or something.
I won't block merging them though if we add proper dividers.
My main objection is these generated types have a lot of any
types. Those types in Go don't have json tags. So is generating these structs actually helpful to the UI?
readonly healthy: boolean | ||
// Named type "tailscale.com/tailcfg.DERPRegion" unknown, using "any" | ||
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- External type | ||
readonly region?: any |
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.
Are these json fields uppercase? I don't see json tags on the tailcfg struct.
So should these be in our api? I assume these apis are user faceing?
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 they are, but they're mostly just for human consumption in the debug menu. I might fix these in the future if the frontend needs them.
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.
Do we need these at all in the typesgenerated then? Is the debug menu in the FE? And does it access any of these fields?
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.
Bruno is writing a page in the FE for the healthcheck, and would like to be able to parse some of the output. The Tailscale internal stuff isn't too important currently.
readonly regions: Record<number, HealthcheckDERPRegionReport> | ||
// Named type "tailscale.com/net/netcheck.Report" unknown, using "any" | ||
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- External type | ||
readonly netcheck?: any |
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.
This also doesn't have json tags?
No description provided.