Skip to content

Commit 1876d03

Browse files
committed
Merge remote-tracking branch 'origin/main' into stevenmasley/param_form_type
2 parents ba70555 + 776c144 commit 1876d03

File tree

108 files changed

+3175
-520
lines changed

Some content is hidden

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

108 files changed

+3175
-520
lines changed

.github/ISSUE_TEMPLATE/1-bug.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ name: "🐞 Bug"
22
description: "File a bug report."
33
title: "bug: "
44
labels: ["needs-triage"]
5+
type: "Bug"
56
body:
67
- type: checkboxes
78
id: existing_issues

agent/agent.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,8 @@ type Options struct {
9595
}
9696

9797
type Client interface {
98-
ConnectRPC25(ctx context.Context) (
99-
proto.DRPCAgentClient25, tailnetproto.DRPCTailnetClient25, error,
98+
ConnectRPC26(ctx context.Context) (
99+
proto.DRPCAgentClient26, tailnetproto.DRPCTailnetClient26, error,
100100
)
101101
RewriteDERPMap(derpMap *tailcfg.DERPMap)
102102
}
@@ -908,7 +908,7 @@ func (a *agent) run() (retErr error) {
908908
a.sessionToken.Store(&sessionToken)
909909

910910
// ConnectRPC returns the dRPC connection we use for the Agent and Tailnet v2+ APIs
911-
aAPI, tAPI, err := a.client.ConnectRPC25(a.hardCtx)
911+
aAPI, tAPI, err := a.client.ConnectRPC26(a.hardCtx)
912912
if err != nil {
913913
return err
914914
}
@@ -1200,7 +1200,7 @@ func (a *agent) createOrUpdateNetwork(manifestOK, networkOK *checkpoint) func(co
12001200
network := a.network
12011201
a.closeMutex.Unlock()
12021202
if network == nil {
1203-
keySeed, err := SSHKeySeed(manifest.OwnerName, manifest.WorkspaceName, manifest.AgentName)
1203+
keySeed, err := SSHKeySeed(manifest.OwnerUsername, manifest.WorkspaceName, manifest.AgentName)
12041204
if err != nil {
12051205
return xerrors.Errorf("generate SSH key seed: %w", err)
12061206
}

agent/agentscripts/agentscripts_test.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,12 @@ func TestScriptReportsTiming(t *testing.T) {
144144

145145
timing := timings[0]
146146
require.Equal(t, int32(0), timing.ExitCode)
147+
if assert.True(t, timing.Start.IsValid(), "start time should be valid") {
148+
require.NotZero(t, timing.Start.AsTime(), "start time should not be zero")
149+
}
150+
if assert.True(t, timing.End.IsValid(), "end time should be valid") {
151+
require.NotZero(t, timing.End.AsTime(), "end time should not be zero")
152+
}
147153
require.GreaterOrEqual(t, timing.End.AsTime(), timing.Start.AsTime())
148154
}
149155

agent/agenttest/client.go

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,8 @@ func (c *Client) Close() {
9898
c.derpMapOnce.Do(func() { close(c.derpMapUpdates) })
9999
}
100100

101-
func (c *Client) ConnectRPC25(ctx context.Context) (
102-
agentproto.DRPCAgentClient25, proto.DRPCTailnetClient25, error,
101+
func (c *Client) ConnectRPC26(ctx context.Context) (
102+
agentproto.DRPCAgentClient26, proto.DRPCTailnetClient26, error,
103103
) {
104104
conn, lis := drpcsdk.MemTransportPipe()
105105
c.LastWorkspaceAgent = func() {
@@ -365,6 +365,18 @@ func (f *FakeAgentAPI) GetConnectionReports() []*agentproto.ReportConnectionRequ
365365
return slices.Clone(f.connectionReports)
366366
}
367367

368+
func (*FakeAgentAPI) CreateSubAgent(_ context.Context, _ *agentproto.CreateSubAgentRequest) (*agentproto.CreateSubAgentResponse, error) {
369+
panic("unimplemented")
370+
}
371+
372+
func (*FakeAgentAPI) DeleteSubAgent(_ context.Context, _ *agentproto.DeleteSubAgentRequest) (*agentproto.DeleteSubAgentResponse, error) {
373+
panic("unimplemented")
374+
}
375+
376+
func (*FakeAgentAPI) ListSubAgents(_ context.Context, _ *agentproto.ListSubAgentsRequest) (*agentproto.ListSubAgentsResponse, error) {
377+
panic("unimplemented")
378+
}
379+
368380
func NewFakeAgentAPI(t testing.TB, logger slog.Logger, manifest *agentproto.Manifest, statsCh chan *agentproto.Stats) *FakeAgentAPI {
369381
return &FakeAgentAPI{
370382
t: t,

0 commit comments

Comments
 (0)