Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[pull] main from coder:main #73

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

Merged
merged 28 commits into from
Jun 9, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
623dcd9
fix(cli): fix flakes related to context cancellation when establishin…
hugodutka Jun 5, 2025
04e4f2f
chore(agent): update agent proto client (#18242)
mafredri Jun 5, 2025
c54ef03
docs: update Smarter Device Manager link to new GitHub repository (#1…
blink-so[bot] Jun 5, 2025
2c0c58a
fix: improve copy for tasks "starting" page (#18247)
blink-so[bot] Jun 5, 2025
2f8b056
test(agent/agentcontainers): fix test data race due to list manipulat…
mafredri Jun 5, 2025
3f406c7
fix: improve sidebar chat loading UX in tasks (#18254)
hugodutka Jun 5, 2025
60595f3
chore: ignore `.git` directories in terraform modules (#18255)
Emyrk Jun 5, 2025
8a70b8d
chore: select the first workspace app to be active in tasks (#18256)
hugodutka Jun 5, 2025
0428c5e
chore: include 'everyone' group in template importing (#18257)
Emyrk Jun 5, 2025
c339066
chore: select the first embedded app on tasks page (#18260)
code-asher Jun 5, 2025
508fba8
feat: handle update build for dynamic params (#18226)
jaaydenh Jun 5, 2025
b4f71b7
fix: show preset parameters when they have diagnostics (#18258)
blink-so[bot] Jun 5, 2025
0076e84
chore(vpn): send ping results over tunnel (#18200)
ethanndickson Jun 6, 2025
628b81c
chore(vpn): send info, debug logs over tunnel (#18240)
ethanndickson Jun 6, 2025
08eff7f
chore: improve tailnet integration test (#18124)
spikecurtis Jun 6, 2025
7c2fb66
chore(provisionersdk): ignore io.EOF in Session.requestReader (#18234)
johnstcn Jun 6, 2025
533c6dc
fix: remove error log when notification manager is already closed (#1…
ethanndickson Jun 6, 2025
a12429e
feat(agent/agentcontainers): refactor Lister to ContainerCLI and impl…
mafredri Jun 6, 2025
709f374
feat(agent/agentcontainers): add Exec method to devcontainers CLI (#1…
mafredri Jun 6, 2025
d47a53d
fix: handle paths with spaces in Match exec clause of SSH config (#18…
spikecurtis Jun 6, 2025
348d19d
chore: use spaces over tabs in proto files (#18269)
Emyrk Jun 6, 2025
f569d9c
feat: add separate max token lifetime for administrators (#18267)
ThomasK33 Jun 6, 2025
8daa0aa
feat(coderd/agentapi): support adding display apps to a sub agent (#1…
DanielleMaywood Jun 6, 2025
7d8b994
chore(dogfood): group web editors together (#18143)
aslilac Jun 6, 2025
910858b
chore(coderd/provisionerdserver): convert dbmem tests to use postgres…
hugodutka Jun 9, 2025
3378b27
chore: bump google.golang.org/grpc from 1.72.1 to 1.73.0 (#18282)
dependabot[bot] Jun 9, 2025
f6dd50a
ci: bump the github-actions group with 4 updates (#18289)
dependabot[bot] Jun 9, 2025
be4f5ef
chore: bump gopkg.in/DataDog/dd-trace-go.v1 from 1.73.0 to 1.74.0 (#1…
dependabot[bot] Jun 9, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ jobs:

# Check for any typos
- name: Check for typos
uses: crate-ci/typos@0f0ccba9ed1df83948f0c15026e4f5ccfce46109 # v1.32.0
uses: crate-ci/typos@b1ae8d918b6e85bd611117d3d9a3be4f903ee5e4 # v1.33.1
with:
config: .github/workflows/typos.toml

Expand Down Expand Up @@ -902,7 +902,7 @@ jobs:
# the check to pass. This is desired in PRs, but not in mainline.
- name: Publish to Chromatic (non-mainline)
if: github.ref != 'refs/heads/main' && github.repository_owner == 'coder'
uses: chromaui/action@d7afd50124cf4f337bcd943e7f45cfa85a5e4476 # v12.0.0
uses: chromaui/action@8536229ee904071f8edce292596f6dbe0da96b9b # v12.1.1
env:
NODE_OPTIONS: "--max_old_space_size=4096"
STORYBOOK: true
Expand Down Expand Up @@ -934,7 +934,7 @@ jobs:
# infinitely "in progress" in mainline unless we re-review each build.
- name: Publish to Chromatic (mainline)
if: github.ref == 'refs/heads/main' && github.repository_owner == 'coder'
uses: chromaui/action@d7afd50124cf4f337bcd943e7f45cfa85a5e4476 # v12.0.0
uses: chromaui/action@8536229ee904071f8edce292596f6dbe0da96b9b # v12.1.1
env:
NODE_OPTIONS: "--max_old_space_size=4096"
STORYBOOK: true
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/scorecard.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,6 @@ jobs:

# Upload the results to GitHub's code scanning dashboard.
- name: "Upload to code-scanning"
uses: github/codeql-action/upload-sarif@ff0a06e83cb2de871e5a09832bc6a81e7276941f # v3.28.18
uses: github/codeql-action/upload-sarif@fca7ace96b7d713c7035871441bd52efbe39e27e # v3.28.19
with:
sarif_file: results.sarif
8 changes: 4 additions & 4 deletions .github/workflows/security.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
uses: ./.github/actions/setup-go

- name: Initialize CodeQL
uses: github/codeql-action/init@ff0a06e83cb2de871e5a09832bc6a81e7276941f # v3.28.18
uses: github/codeql-action/init@fca7ace96b7d713c7035871441bd52efbe39e27e # v3.28.19
with:
languages: go, javascript

Expand All @@ -48,7 +48,7 @@ jobs:
rm Makefile

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@ff0a06e83cb2de871e5a09832bc6a81e7276941f # v3.28.18
uses: github/codeql-action/analyze@fca7ace96b7d713c7035871441bd52efbe39e27e # v3.28.19

- name: Send Slack notification on failure
if: ${{ failure() }}
Expand Down Expand Up @@ -142,15 +142,15 @@ jobs:
echo "image=$(cat "$image_job")" >> $GITHUB_OUTPUT

- name: Run Trivy vulnerability scanner
uses: aquasecurity/trivy-action@6c175e9c4083a92bbca2f9724c8a5e33bc2d97a5
uses: aquasecurity/trivy-action@76071ef0d7ec797419534a183b498b4d6366cf37
with:
image-ref: ${{ steps.build.outputs.image }}
format: sarif
output: trivy-results.sarif
severity: "CRITICAL,HIGH"

- name: Upload Trivy scan results to GitHub Security tab
uses: github/codeql-action/upload-sarif@ff0a06e83cb2de871e5a09832bc6a81e7276941f # v3.28.18
uses: github/codeql-action/upload-sarif@fca7ace96b7d713c7035871441bd52efbe39e27e # v3.28.19
with:
sarif_file: trivy-results.sarif
category: "Trivy"
Expand Down
32 changes: 16 additions & 16 deletions agent/agent.go
Original file line number Diff line number Diff line change
Expand Up @@ -456,7 +456,7 @@ func (t *trySingleflight) Do(key string, fn func()) {
fn()
}

func (a *agent) reportMetadata(ctx context.Context, aAPI proto.DRPCAgentClient24) error {
func (a *agent) reportMetadata(ctx context.Context, aAPI proto.DRPCAgentClient26) error {
tickerDone := make(chan struct{})
collectDone := make(chan struct{})
ctx, cancel := context.WithCancel(ctx)
Expand Down Expand Up @@ -672,7 +672,7 @@ func (a *agent) reportMetadata(ctx context.Context, aAPI proto.DRPCAgentClient24

// reportLifecycle reports the current lifecycle state once. All state
// changes are reported in order.
func (a *agent) reportLifecycle(ctx context.Context, aAPI proto.DRPCAgentClient24) error {
func (a *agent) reportLifecycle(ctx context.Context, aAPI proto.DRPCAgentClient26) error {
for {
select {
case <-a.lifecycleUpdate:
Expand Down Expand Up @@ -752,7 +752,7 @@ func (a *agent) setLifecycle(state codersdk.WorkspaceAgentLifecycle) {
}

// reportConnectionsLoop reports connections to the agent for auditing.
func (a *agent) reportConnectionsLoop(ctx context.Context, aAPI proto.DRPCAgentClient24) error {
func (a *agent) reportConnectionsLoop(ctx context.Context, aAPI proto.DRPCAgentClient26) error {
for {
select {
case <-a.reportConnectionsUpdate:
Expand Down Expand Up @@ -872,7 +872,7 @@ func (a *agent) reportConnection(id uuid.UUID, connectionType proto.Connection_T
// fetchServiceBannerLoop fetches the service banner on an interval. It will
// not be fetched immediately; the expectation is that it is primed elsewhere
// (and must be done before the session actually starts).
func (a *agent) fetchServiceBannerLoop(ctx context.Context, aAPI proto.DRPCAgentClient24) error {
func (a *agent) fetchServiceBannerLoop(ctx context.Context, aAPI proto.DRPCAgentClient26) error {
ticker := time.NewTicker(a.announcementBannersRefreshInterval)
defer ticker.Stop()
for {
Expand Down Expand Up @@ -925,7 +925,7 @@ func (a *agent) run() (retErr error) {
connMan := newAPIConnRoutineManager(a.gracefulCtx, a.hardCtx, a.logger, aAPI, tAPI)

connMan.startAgentAPI("init notification banners", gracefulShutdownBehaviorStop,
func(ctx context.Context, aAPI proto.DRPCAgentClient24) error {
func(ctx context.Context, aAPI proto.DRPCAgentClient26) error {
bannersProto, err := aAPI.GetAnnouncementBanners(ctx, &proto.GetAnnouncementBannersRequest{})
if err != nil {
return xerrors.Errorf("fetch service banner: %w", err)
Expand All @@ -942,7 +942,7 @@ func (a *agent) run() (retErr error) {
// sending logs gets gracefulShutdownBehaviorRemain because we want to send logs generated by
// shutdown scripts.
connMan.startAgentAPI("send logs", gracefulShutdownBehaviorRemain,
func(ctx context.Context, aAPI proto.DRPCAgentClient24) error {
func(ctx context.Context, aAPI proto.DRPCAgentClient26) error {
err := a.logSender.SendLoop(ctx, aAPI)
if xerrors.Is(err, agentsdk.ErrLogLimitExceeded) {
// we don't want this error to tear down the API connection and propagate to the
Expand All @@ -961,7 +961,7 @@ func (a *agent) run() (retErr error) {
connMan.startAgentAPI("report metadata", gracefulShutdownBehaviorStop, a.reportMetadata)

// resources monitor can cease as soon as we start gracefully shutting down.
connMan.startAgentAPI("resources monitor", gracefulShutdownBehaviorStop, func(ctx context.Context, aAPI proto.DRPCAgentClient24) error {
connMan.startAgentAPI("resources monitor", gracefulShutdownBehaviorStop, func(ctx context.Context, aAPI proto.DRPCAgentClient26) error {
logger := a.logger.Named("resources_monitor")
clk := quartz.NewReal()
config, err := aAPI.GetResourcesMonitoringConfiguration(ctx, &proto.GetResourcesMonitoringConfigurationRequest{})
Expand Down Expand Up @@ -1008,7 +1008,7 @@ func (a *agent) run() (retErr error) {
connMan.startAgentAPI("handle manifest", gracefulShutdownBehaviorStop, a.handleManifest(manifestOK))

connMan.startAgentAPI("app health reporter", gracefulShutdownBehaviorStop,
func(ctx context.Context, aAPI proto.DRPCAgentClient24) error {
func(ctx context.Context, aAPI proto.DRPCAgentClient26) error {
if err := manifestOK.wait(ctx); err != nil {
return xerrors.Errorf("no manifest: %w", err)
}
Expand Down Expand Up @@ -1041,7 +1041,7 @@ func (a *agent) run() (retErr error) {

connMan.startAgentAPI("fetch service banner loop", gracefulShutdownBehaviorStop, a.fetchServiceBannerLoop)

connMan.startAgentAPI("stats report loop", gracefulShutdownBehaviorStop, func(ctx context.Context, aAPI proto.DRPCAgentClient24) error {
connMan.startAgentAPI("stats report loop", gracefulShutdownBehaviorStop, func(ctx context.Context, aAPI proto.DRPCAgentClient26) error {
if err := networkOK.wait(ctx); err != nil {
return xerrors.Errorf("no network: %w", err)
}
Expand All @@ -1056,8 +1056,8 @@ func (a *agent) run() (retErr error) {
}

// handleManifest returns a function that fetches and processes the manifest
func (a *agent) handleManifest(manifestOK *checkpoint) func(ctx context.Context, aAPI proto.DRPCAgentClient24) error {
return func(ctx context.Context, aAPI proto.DRPCAgentClient24) error {
func (a *agent) handleManifest(manifestOK *checkpoint) func(ctx context.Context, aAPI proto.DRPCAgentClient26) error {
return func(ctx context.Context, aAPI proto.DRPCAgentClient26) error {
var (
sentResult = false
err error
Expand Down Expand Up @@ -1187,8 +1187,8 @@ func (a *agent) handleManifest(manifestOK *checkpoint) func(ctx context.Context,

// createOrUpdateNetwork waits for the manifest to be set using manifestOK, then creates or updates
// the tailnet using the information in the manifest
func (a *agent) createOrUpdateNetwork(manifestOK, networkOK *checkpoint) func(context.Context, proto.DRPCAgentClient24) error {
return func(ctx context.Context, _ proto.DRPCAgentClient24) (retErr error) {
func (a *agent) createOrUpdateNetwork(manifestOK, networkOK *checkpoint) func(context.Context, proto.DRPCAgentClient26) error {
return func(ctx context.Context, _ proto.DRPCAgentClient26) (retErr error) {
if err := manifestOK.wait(ctx); err != nil {
return xerrors.Errorf("no manifest: %w", err)
}
Expand Down Expand Up @@ -1960,7 +1960,7 @@ const (

type apiConnRoutineManager struct {
logger slog.Logger
aAPI proto.DRPCAgentClient24
aAPI proto.DRPCAgentClient26
tAPI tailnetproto.DRPCTailnetClient24
eg *errgroup.Group
stopCtx context.Context
Expand All @@ -1969,7 +1969,7 @@ type apiConnRoutineManager struct {

func newAPIConnRoutineManager(
gracefulCtx, hardCtx context.Context, logger slog.Logger,
aAPI proto.DRPCAgentClient24, tAPI tailnetproto.DRPCTailnetClient24,
aAPI proto.DRPCAgentClient26, tAPI tailnetproto.DRPCTailnetClient24,
) *apiConnRoutineManager {
// routines that remain in operation during graceful shutdown use the remainCtx. They'll still
// exit if the errgroup hits an error, which usually means a problem with the conn.
Expand Down Expand Up @@ -2002,7 +2002,7 @@ func newAPIConnRoutineManager(
// but for Tailnet.
func (a *apiConnRoutineManager) startAgentAPI(
name string, behavior gracefulShutdownBehavior,
f func(context.Context, proto.DRPCAgentClient24) error,
f func(context.Context, proto.DRPCAgentClient26) error,
) {
logger := a.logger.With(slog.F("name", name))
var ctx context.Context
Expand Down
100 changes: 84 additions & 16 deletions agent/agentcontainers/acmock/acmock.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion agent/agentcontainers/acmock/doc.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Package acmock contains a mock implementation of agentcontainers.Lister for use in tests.
package acmock

//go:generate mockgen -destination ./acmock.go -package acmock .. Lister,DevcontainerCLI
//go:generate mockgen -destination ./acmock.go -package acmock .. ContainerCLI,DevcontainerCLI
Loading
Loading