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

Skip to content

Commit b3c396b

Browse files
authored
Merge branch 'main' into issue#15264
2 parents 7e8573c + dbf41a1 commit b3c396b

File tree

275 files changed

+10122
-4441
lines changed

Some content is hidden

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

275 files changed

+10122
-4441
lines changed

.github/.linkspector.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
dirs:
2+
- docs
3+
excludedDirs:
4+
# Downstream bug in linkspector means large markdown files fail to parse
5+
# but these are autogenerated and shouldn't need checking
6+
- docs/reference
7+
# Older changelogs may contain broken links
8+
- docs/changelogs
9+
ignorePatterns:
10+
- pattern: "localhost"
11+
- pattern: "example.com"
12+
- pattern: "mailto:"
13+
- pattern: "127.0.0.1"
14+
- pattern: "0.0.0.0"
15+
- pattern: "JFROG_URL"
16+
- pattern: "coder.company.org"
17+
# These real sites were blocking the linkspector action / GitHub runner IPs(?)
18+
- pattern: "i.imgur.com"
19+
- pattern: "code.visualstudio.com"
20+
- pattern: "www.emacswiki.org"
21+
aliveStatusCodes:
22+
- 200

.github/workflows/ci.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ jobs:
8080
- "cmd/**"
8181
- "coderd/**"
8282
- "enterprise/**"
83-
- "examples/*"
83+
- "examples/**"
8484
- "helm/**"
8585
- "provisioner/**"
8686
- "provisionerd/**"
@@ -188,7 +188,7 @@ jobs:
188188
189189
# Check for any typos
190190
- name: Check for typos
191-
uses: crate-ci/typos@d01f29c66d1bf1a08730750f61d86c210b0d039d # v1.27.0
191+
uses: crate-ci/typos@b74202f74b4346efdbce7801d187ec57b266bac8 # v1.27.3
192192
with:
193193
config: .github/workflows/typos.toml
194194

@@ -211,7 +211,7 @@ jobs:
211211
212212
- name: Check workflow files
213213
run: |
214-
bash <(curl https://raw.githubusercontent.com/rhysd/actionlint/main/scripts/download-actionlint.bash) 1.6.22
214+
bash <(curl https://raw.githubusercontent.com/rhysd/actionlint/main/scripts/download-actionlint.bash) 1.7.4
215215
./actionlint -color -shellcheck= -ignore "set-output"
216216
shell: bash
217217

.github/workflows/docker-base.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ jobs:
6666
context: base-build-context
6767
file: scripts/Dockerfile.base
6868
platforms: linux/amd64,linux/arm64,linux/arm/v7
69+
provenance: true
6970
pull: true
7071
no-cache: true
7172
push: ${{ github.event_name != 'pull_request' }}

.github/workflows/mlc_config.json

Lines changed: 0 additions & 32 deletions
This file was deleted.

.github/workflows/pr-deploy.yaml

Lines changed: 26 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ jobs:
110110
set -euo pipefail
111111
mkdir -p ~/.kube
112112
echo "${{ secrets.PR_DEPLOYMENTS_KUBECONFIG_BASE64 }}" | base64 --decode > ~/.kube/config
113-
chmod 644 ~/.kube/config
113+
chmod 600 ~/.kube/config
114114
export KUBECONFIG=~/.kube/config
115115
116116
- name: Check if the helm deployment already exists
@@ -284,7 +284,7 @@ jobs:
284284
set -euo pipefail
285285
mkdir -p ~/.kube
286286
echo "${{ secrets.PR_DEPLOYMENTS_KUBECONFIG_BASE64 }}" | base64 --decode > ~/.kube/config
287-
chmod 644 ~/.kube/config
287+
chmod 600 ~/.kube/config
288288
export KUBECONFIG=~/.kube/config
289289
290290
- name: Check if image exists
@@ -421,14 +421,14 @@ jobs:
421421
"${DEST}" version
422422
mv "${DEST}" /usr/local/bin/coder
423423
424-
- name: Create first user, template and workspace
424+
- name: Create first user
425425
if: needs.get_info.outputs.NEW == 'true' || github.event.inputs.deploy == 'true'
426426
id: setup_deployment
427+
env:
428+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
427429
run: |
428430
set -euo pipefail
429431
430-
# Create first user
431-
432432
# create a masked random password 12 characters long
433433
password=$(openssl rand -base64 16 | tr -d "=+/" | cut -c1-12)
434434
@@ -437,20 +437,22 @@ jobs:
437437
echo "password=$password" >> $GITHUB_OUTPUT
438438
439439
coder login \
440-
--first-user-username coder \
440+
--first-user-username pr${{ env.PR_NUMBER }}-admin \
441441
--first-user-email pr${{ env.PR_NUMBER }}@coder.com \
442442
--first-user-password $password \
443443
--first-user-trial=false \
444444
--use-token-as-session \
445445
https://${{ env.PR_HOSTNAME }}
446446
447-
# Create template
448-
cd ./.github/pr-deployments/template
449-
coder templates push -y --variable namespace=pr${{ env.PR_NUMBER }} kubernetes
447+
# Create a user for the github.actor
448+
# TODO: update once https://github.com/coder/coder/issues/15466 is resolved
449+
# coder users create \
450+
# --username ${{ github.actor }} \
451+
# --login-type github
450452
451-
# Create workspace
452-
coder create --template="kubernetes" kube --parameter cpu=2 --parameter memory=4 --parameter home_disk_size=2 -y
453-
coder stop kube -y
453+
# promote the user to admin role
454+
# coder org members edit-role ${{ github.actor }} organization-admin
455+
# TODO: update once https://github.com/coder/internal/issues/207 is resolved
454456
455457
- name: Send Slack notification
456458
if: needs.get_info.outputs.NEW == 'true' || github.event.inputs.deploy == 'true'
@@ -462,7 +464,7 @@ jobs:
462464
"pr_url": "'"${{ env.PR_URL }}"'",
463465
"pr_title": "'"${{ env.PR_TITLE }}"'",
464466
"pr_access_url": "'"https://${{ env.PR_HOSTNAME }}"'",
465-
"pr_username": "'"test"'",
467+
"pr_username": "'"pr${{ env.PR_NUMBER }}-admin"'",
466468
"pr_email": "'"pr${{ env.PR_NUMBER }}@coder.com"'",
467469
"pr_password": "'"${{ steps.setup_deployment.outputs.password }}"'",
468470
"pr_actor": "'"${{ github.actor }}"'"
@@ -495,3 +497,14 @@ jobs:
495497
cc: @${{ github.actor }}
496498
reactions: rocket
497499
reactions-edit-mode: replace
500+
501+
- name: Create template and workspace
502+
if: needs.get_info.outputs.NEW == 'true' || github.event.inputs.deploy == 'true'
503+
run: |
504+
set -euo pipefail
505+
cd .github/pr-deployments/template
506+
coder templates push -y --variable namespace=pr${{ env.PR_NUMBER }} kubernetes
507+
508+
# Create workspace
509+
coder create --template="kubernetes" kube --parameter cpu=2 --parameter memory=4 --parameter home_disk_size=2 -y
510+
coder stop kube -y

.github/workflows/release.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -263,6 +263,7 @@ jobs:
263263
context: base-build-context
264264
file: scripts/Dockerfile.base
265265
platforms: linux/amd64,linux/arm64,linux/arm/v7
266+
provenance: true
266267
pull: true
267268
no-cache: true
268269
push: true

.github/workflows/scorecard.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,6 @@ jobs:
4747

4848
# Upload the results to GitHub's code scanning dashboard.
4949
- name: "Upload to code-scanning"
50-
uses: github/codeql-action/upload-sarif@662472033e021d55d94146f66f6058822b0b39fd # v3.27.0
50+
uses: github/codeql-action/upload-sarif@4f3212b61783c3c68e8309a0f18a699764811cda # v3.27.1
5151
with:
5252
sarif_file: results.sarif

.github/workflows/security.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ jobs:
3838
uses: ./.github/actions/setup-go
3939

4040
- name: Initialize CodeQL
41-
uses: github/codeql-action/init@662472033e021d55d94146f66f6058822b0b39fd # v3.27.0
41+
uses: github/codeql-action/init@4f3212b61783c3c68e8309a0f18a699764811cda # v3.27.1
4242
with:
4343
languages: go, javascript
4444

@@ -48,7 +48,7 @@ jobs:
4848
rm Makefile
4949
5050
- name: Perform CodeQL Analysis
51-
uses: github/codeql-action/analyze@662472033e021d55d94146f66f6058822b0b39fd # v3.27.0
51+
uses: github/codeql-action/analyze@4f3212b61783c3c68e8309a0f18a699764811cda # v3.27.1
5252

5353
- name: Send Slack notification on failure
5454
if: ${{ failure() }}
@@ -142,7 +142,7 @@ jobs:
142142
severity: "CRITICAL,HIGH"
143143

144144
- name: Upload Trivy scan results to GitHub Security tab
145-
uses: github/codeql-action/upload-sarif@662472033e021d55d94146f66f6058822b0b39fd # v3.27.0
145+
uses: github/codeql-action/upload-sarif@4f3212b61783c3c68e8309a0f18a699764811cda # v3.27.1
146146
with:
147147
sarif_file: trivy-results.sarif
148148
category: "Trivy"

.github/workflows/weekly-docs.yaml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ permissions:
1616
jobs:
1717
check-docs:
1818
runs-on: ubuntu-latest
19+
permissions:
20+
pull-requests: write # required to post PR review comments by the action
1921
steps:
2022
- name: Harden Runner
2123
uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1
@@ -26,15 +28,14 @@ jobs:
2628
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
2729

2830
- name: Check Markdown links
29-
uses: gaurav-nelson/github-action-markdown-link-check@d53a906aa6b22b8979d33bc86170567e619495ec # v1.0.15
31+
uses: umbrelladocs/action-linkspector@fc382e19892aca958e189954912fe379a8df270c # v1.2.4
3032
id: markdown-link-check
3133
# checks all markdown files from /docs including all subfolders
3234
with:
33-
use-quiet-mode: "yes"
34-
use-verbose-mode: "yes"
35-
config-file: ".github/workflows/mlc_config.json"
36-
folder-path: "docs/"
37-
file-path: "./README.md"
35+
reporter: github-pr-review
36+
config_file: ".github/.linkspector.yml"
37+
fail_on_error: "true"
38+
filter_mode: "nofilter"
3839

3940
- name: Send Slack notification
4041
if: failure() && github.event_name == 'schedule'

.vscode/extensions.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
"redhat.vscode-yaml",
1111
"tekumara.typos-vscode",
1212
"EditorConfig.EditorConfig",
13-
"biomejs.biome"
13+
"biomejs.biome",
14+
"bradlc.vscode-tailwindcss"
1415
]
1516
}

.vscode/settings.json

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,11 @@
4747
"playwright.reuseBrowser": true,
4848

4949
"[javascript][javascriptreact][json][jsonc][typescript][typescriptreact]": {
50-
"editor.defaultFormatter": "biomejs.biome"
51-
// "editor.codeActionsOnSave": {
52-
// "source.organizeImports.biome": "explicit"
53-
// }
50+
"editor.defaultFormatter": "biomejs.biome",
51+
"editor.codeActionsOnSave": {
52+
"quickfix.biome": "explicit"
53+
// "source.organizeImports.biome": "explicit"
54+
}
5455
},
5556

5657
"[css][html][markdown][yaml]": {

CODEOWNERS

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# These APIs are versioned, so any changes need to be carefully reviewed for whether
2+
# to bump API major or minor versions.
3+
agent/proto/ @spikecurtis @johnstcn
4+
tailnet/proto/ @spikecurtis @johnstcn
5+
vpn/vpn.proto @spikecurtis @johnstcn
6+
vpn/version.go @spikecurtis @johnstcn

CODE_OF_CONDUCT.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
[https://coder.com/docs/coder-oss/latest/contributing/CODE_OF_CONDUCT](https://coder.com/docs/contributing/CODE_OF_CONDUCT)

Makefile

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -507,7 +507,6 @@ gen: \
507507
examples/examples.gen.json \
508508
tailnet/tailnettest/coordinatormock.go \
509509
tailnet/tailnettest/coordinateemock.go \
510-
tailnet/tailnettest/multiagentmock.go \
511510
coderd/database/pubsub/psmock/psmock.go
512511
.PHONY: gen
513512

@@ -537,7 +536,6 @@ gen/mark-fresh:
537536
examples/examples.gen.json \
538537
tailnet/tailnettest/coordinatormock.go \
539538
tailnet/tailnettest/coordinateemock.go \
540-
tailnet/tailnettest/multiagentmock.go \
541539
coderd/database/pubsub/psmock/psmock.go \
542540
"
543541

@@ -570,7 +568,7 @@ coderd/database/dbmock/dbmock.go: coderd/database/db.go coderd/database/querier.
570568
coderd/database/pubsub/psmock/psmock.go: coderd/database/pubsub/pubsub.go
571569
go generate ./coderd/database/pubsub/psmock
572570

573-
tailnet/tailnettest/coordinatormock.go tailnet/tailnettest/multiagentmock.go tailnet/tailnettest/coordinateemock.go: tailnet/coordinator.go tailnet/multiagent.go
571+
tailnet/tailnettest/coordinatormock.go tailnet/tailnettest/coordinateemock.go: tailnet/coordinator.go
574572
go generate ./tailnet/tailnettest/
575573

576574
tailnet/proto/tailnet.pb.go: tailnet/proto/tailnet.proto

0 commit comments

Comments
 (0)