Skip to content

Commit a7f1727

Browse files
committed
Merge branch 'main' into colin/pg-coordinate
2 parents b6a5070 + 2a1bfb3 commit a7f1727

File tree

454 files changed

+14168
-3249
lines changed

Some content is hidden

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

454 files changed

+14168
-3249
lines changed

.github/workflows/cla.yaml

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: "CLA Assistant"
2+
on:
3+
issue_comment:
4+
types: [created]
5+
pull_request_target:
6+
types: [opened,closed,synchronize]
7+
8+
jobs:
9+
CLAssistant:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: "CLA Assistant"
13+
if: (github.event.comment.body == 'recheck' || github.event.comment.body == 'I have read the CLA Document and I hereby sign the CLA') || github.event_name == 'pull_request_target'
14+
uses: contributor-assistant/github-action@v2.2.1
15+
env:
16+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
17+
# the below token should have repo scope and must be manually added by you in the repository's secret
18+
PERSONAL_ACCESS_TOKEN : ${{ secrets.CDRCOMMUNITY_GITHUB_TOKEN }}
19+
with:
20+
remote-organization-name: 'coder'
21+
remote-repository-name: 'cla'
22+
path-to-signatures: 'v2022-09-04/signatures.json'
23+
path-to-document: 'https://github.com/coder/cla/blob/main/README.md'
24+
# branch should not be protected
25+
branch: 'main'
26+
allowlist: dependabot*

.github/workflows/coder.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -628,7 +628,7 @@ jobs:
628628
with:
629629
name: failed-test-videos
630630
path: ./site/test-results/**/*.webm
631-
retention:days: 7
631+
retention-days: 7
632632

633633
chromatic:
634634
# REMARK: this is only used to build storybook and deploy it to Chromatic.

.github/workflows/dogfood.yaml

+25-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ on:
1212
workflow_dispatch:
1313

1414
jobs:
15-
deploy:
15+
deploy_image:
1616
runs-on: ubuntu-latest
1717
steps:
1818
- name: Get branch name
@@ -47,3 +47,27 @@ jobs:
4747
tags: "codercom/oss-dogfood:${{ steps.docker-tag-name.outputs.tag }},codercom/oss-dogfood:latest"
4848
cache-from: type=registry,ref=codercom/oss-dogfood:latest
4949
cache-to: type=inline
50+
deploy_template:
51+
runs-on: ubuntu-latest
52+
steps:
53+
- name: Checkout
54+
uses: actions/checkout@v3
55+
- name: Get short commit SHA
56+
id: vars
57+
run: echo "::set-output name=sha_short::$(git rev-parse --short HEAD)"
58+
- name: "Install latest Coder"
59+
run: |
60+
curl -L https://coder.com/install.sh | sh
61+
# env:
62+
# VERSION: 0.x
63+
- name: "Push template"
64+
run: |
65+
coder templates push $CODER_TEMPLATE_NAME --directory $CODER_TEMPLATE_DIR --yes --name=$CODER_TEMPLATE_VERSION
66+
env:
67+
# Consumed by Coder CLI
68+
CODER_URL: https://dev.coder.com
69+
CODER_SESSION_TOKEN: ${{ secrets.CODER_SESSION_TOKEN }}
70+
# Template source & details
71+
CODER_TEMPLATE_NAME: ${{ secrets.CODER_TEMPLATE_NAME }}
72+
CODER_TEMPLATE_VERSION: ${{ steps.vars.outputs.sha_short }}
73+
CODER_TEMPLATE_DIR: ./dogfood

cli/agent.go

+6-6
Original file line numberDiff line numberDiff line change
@@ -168,15 +168,15 @@ func workspaceAgent() *cobra.Command {
168168
}
169169
}
170170

171-
ctx, cancelFunc := context.WithTimeout(cmd.Context(), time.Hour)
172-
defer cancelFunc()
173-
for retry.New(100*time.Millisecond, 5*time.Second).Wait(ctx) {
174-
err := client.PostWorkspaceAgentVersion(cmd.Context(), version)
171+
retryCtx, cancelRetry := context.WithTimeout(cmd.Context(), time.Hour)
172+
defer cancelRetry()
173+
for retrier := retry.New(100*time.Millisecond, 5*time.Second); retrier.Wait(retryCtx); {
174+
err := client.PostWorkspaceAgentVersion(retryCtx, version)
175175
if err != nil {
176-
logger.Warn(cmd.Context(), "post agent version: %w", slog.Error(err), slog.F("version", version))
176+
logger.Warn(retryCtx, "post agent version: %w", slog.Error(err), slog.F("version", version))
177177
continue
178178
}
179-
logger.Info(ctx, "updated agent version", slog.F("version", version))
179+
logger.Info(retryCtx, "updated agent version", slog.F("version", version))
180180
break
181181
}
182182

0 commit comments

Comments
 (0)