-
Notifications
You must be signed in to change notification settings - Fork 881
refactor(coderd): move healthcheck report structs to codersdk #12279
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
2e7faa6
to
e6b7428
Compare
e6b7428
to
621fa13
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.
+5,560 −5,548
Is it only because of the generator?
Unfortunately, yes. Most of the changes are in generated files. |
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.
As long as linter does not complain about violating enterprise rules, it is 👍 from me.
Also smoke-tested that:
|
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.
Except for the removal of recover I flagged, LGTM!
"tailscale.com/net/netcheck" | ||
"tailscale.com/tailcfg" | ||
|
||
"github.com/coder/coder/v2/coderd/healthcheck/health" |
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 wonder if this also should be a part of codersdk. 🤔
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, I started doing that but then started to realize how big this PR would be 😅
I can open a new PR for this, but it's not a real blocker for now.
baseDirs = [...]string{"./codersdk"} | ||
// externalTypes are types that are not in the baseDirs, but we want to | ||
// support. These are usually types that are used in the baseDirs. | ||
// Do not include things like "Database", as that would break the idea | ||
// of splitting db and api types. | ||
// Only include dirs that are client facing packages. | ||
externalTypeDirs = [...]string{"./cli/clibase", "./coderd/healthcheck/health", "./coderd/healthcheck/derphealth"} | ||
externalTypeDirs = [...]string{"./cli/clibase", "./coderd/healthcheck/health"} |
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.
review: no longer need to generate coderd/healthcheck
and coderd/healthcheck/derphealth
.
Needed by #12161 to avoid an import cycle when adding a
codersdk.Client
method to hit/api/v2/debug/health
.Moves healthcheck report-related structs from
coderd/healthcheck
tocodersdk