Skip to content

Commit 853e59e

Browse files
committed
Merge branch 'main' of https://github.com/coder/coder into bq/implement-notifications
2 parents 467a797 + 80cbffe commit 853e59e

Some content is hidden

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

56 files changed

+1976
-165
lines changed

agent/agenttest/client.go

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,12 @@ func (f *FakeAgentAPI) UpdateStats(ctx context.Context, req *agentproto.UpdateSt
210210
f.logger.Debug(ctx, "update stats called", slog.F("req", req))
211211
// empty request is sent to get the interval; but our tests don't want empty stats requests
212212
if req.Stats != nil {
213-
f.statsCh <- req.Stats
213+
select {
214+
case <-ctx.Done():
215+
return nil, ctx.Err()
216+
case f.statsCh <- req.Stats:
217+
// OK!
218+
}
214219
}
215220
return &agentproto.UpdateStatsResponse{ReportInterval: durationpb.New(statsInterval)}, nil
216221
}
@@ -233,17 +238,25 @@ func (f *FakeAgentAPI) UpdateLifecycle(_ context.Context, req *agentproto.Update
233238

234239
func (f *FakeAgentAPI) BatchUpdateAppHealths(ctx context.Context, req *agentproto.BatchUpdateAppHealthRequest) (*agentproto.BatchUpdateAppHealthResponse, error) {
235240
f.logger.Debug(ctx, "batch update app health", slog.F("req", req))
236-
f.appHealthCh <- req
237-
return &agentproto.BatchUpdateAppHealthResponse{}, nil
241+
select {
242+
case <-ctx.Done():
243+
return nil, ctx.Err()
244+
case f.appHealthCh <- req:
245+
return &agentproto.BatchUpdateAppHealthResponse{}, nil
246+
}
238247
}
239248

240249
func (f *FakeAgentAPI) AppHealthCh() <-chan *agentproto.BatchUpdateAppHealthRequest {
241250
return f.appHealthCh
242251
}
243252

244-
func (f *FakeAgentAPI) UpdateStartup(_ context.Context, req *agentproto.UpdateStartupRequest) (*agentproto.Startup, error) {
245-
f.startupCh <- req.GetStartup()
246-
return req.GetStartup(), nil
253+
func (f *FakeAgentAPI) UpdateStartup(ctx context.Context, req *agentproto.UpdateStartupRequest) (*agentproto.Startup, error) {
254+
select {
255+
case <-ctx.Done():
256+
return nil, ctx.Err()
257+
case f.startupCh <- req.GetStartup():
258+
return req.GetStartup(), nil
259+
}
247260
}
248261

249262
func (f *FakeAgentAPI) GetMetadata() map[string]agentsdk.Metadata {

cli/organizationmembers.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ func (r *RootCmd) assignOrganizationRoles(orgContext *OrganizationContext) *serp
137137

138138
func (r *RootCmd) listOrganizationMembers(orgContext *OrganizationContext) *serpent.Command {
139139
formatter := cliui.NewOutputFormatter(
140-
cliui.TableFormat([]codersdk.OrganizationMemberWithName{}, []string{"username", "organization_roles"}),
140+
cliui.TableFormat([]codersdk.OrganizationMemberWithUserData{}, []string{"username", "organization_roles"}),
141141
cliui.JSONFormat(),
142142
)
143143

coderd/apidoc/docs.go

Lines changed: 150 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)