Skip to content

Commit 5df1260

Browse files
committed
Merge branch 'main' into bq/refactor-workspace-header
2 parents 4e73089 + 17bb1a1 commit 5df1260

File tree

246 files changed

+2726
-6110
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

246 files changed

+2726
-6110
lines changed

.github/workflows/ci.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -634,6 +634,9 @@ jobs:
634634
- name: Publish to Chromatic (non-mainline)
635635
if: github.ref != 'refs/heads/main' && github.repository_owner == 'coder'
636636
uses: chromaui/action@v1
637+
env:
638+
NODE_OPTIONS: "--max_old_space_size=4096"
639+
STORYBOOK: true
637640
with:
638641
buildScriptName: "storybook:build"
639642
exitOnceUploaded: true
@@ -651,6 +654,9 @@ jobs:
651654
- name: Publish to Chromatic (mainline)
652655
if: github.ref == 'refs/heads/main' && github.repository_owner == 'coder'
653656
uses: chromaui/action@v1
657+
env:
658+
NODE_OPTIONS: "--max_old_space_size=4096"
659+
STORYBOOK: true
654660
with:
655661
autoAcceptChanges: true
656662
buildScriptName: "storybook:build"

cli/agent.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -88,9 +88,9 @@ func (r *RootCmd) workspaceAgent() *clibase.Cmd {
8888
ctx, stopNotify := signal.NotifyContext(ctx, InterruptSignals...)
8989
defer stopNotify()
9090

91-
// dumpHandler does signal handling, so we call it after the
91+
// DumpHandler does signal handling, so we call it after the
9292
// reaper.
93-
go dumpHandler(ctx)
93+
go DumpHandler(ctx)
9494

9595
ljLogger := &lumberjack.Logger{
9696
Filename: filepath.Join(logDir, "coder-agent.log"),
@@ -119,7 +119,7 @@ func (r *RootCmd) workspaceAgent() *clibase.Cmd {
119119
// Enable pprof handler
120120
// This prevents the pprof import from being accidentally deleted.
121121
_ = pprof.Handler
122-
pprofSrvClose := serveHandler(ctx, logger, nil, pprofAddress, "pprof")
122+
pprofSrvClose := ServeHandler(ctx, logger, nil, pprofAddress, "pprof")
123123
defer pprofSrvClose()
124124
// Do a best effort here. If this fails, it's not a big deal.
125125
if port, err := urlPort(pprofAddress); err == nil {
@@ -262,7 +262,7 @@ func (r *RootCmd) workspaceAgent() *clibase.Cmd {
262262
return cmd
263263
}
264264

265-
func serveHandler(ctx context.Context, logger slog.Logger, handler http.Handler, addr, name string) (closeFunc func()) {
265+
func ServeHandler(ctx context.Context, logger slog.Logger, handler http.Handler, addr, name string) (closeFunc func()) {
266266
logger.Debug(ctx, "http server listening", slog.F("addr", addr), slog.F("name", name))
267267

268268
// ReadHeaderTimeout is purposefully not enabled. It caused some issues with

cli/root.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -711,7 +711,7 @@ func (h *headerTransport) RoundTrip(req *http.Request) (*http.Response, error) {
711711
return h.transport.RoundTrip(req)
712712
}
713713

714-
// dumpHandler provides a custom SIGQUIT and SIGTRAP handler that dumps the
714+
// DumpHandler provides a custom SIGQUIT and SIGTRAP handler that dumps the
715715
// stacktrace of all goroutines to stderr and a well-known file in the home
716716
// directory. This is useful for debugging deadlock issues that may occur in
717717
// production in workspaces, since the default Go runtime will only dump to
@@ -723,7 +723,7 @@ func (h *headerTransport) RoundTrip(req *http.Request) (*http.Response, error) {
723723
// A SIGQUIT handler will not be registered if GOTRACEBACK=crash.
724724
//
725725
// On Windows this immediately returns.
726-
func dumpHandler(ctx context.Context) {
726+
func DumpHandler(ctx context.Context) {
727727
if runtime.GOOS == "windows" {
728728
// free up the goroutine since it'll be permanently blocked anyways
729729
return

0 commit comments

Comments
 (0)