Commit Graph

427 Commits

Author SHA1 Message Date
09dd69a7e8 chore(dogfood): include multiple templates under dogfood/ (#16846)
* Renames `dogfood/contents` to `dogfood/coder`.
* Moves `coder-envbuilder` to `dogfood/coder-envbuilder`.
* Updates `dogfood/main.tf` to push `coder-envbuilder` template.
* Replaces hard-coded organization IDs with
`data.coderd_organization.default.id`.
2025-03-11 13:17:40 +00:00
e817713dc0 revert: "chore: enable SBOM attestation for image builds" (#16868)
Reverts coder/coder#16852

The CI failed to create the multi-arch manifest.

https://github.com/coder/coder/actions/runs/13773079355/job/38516182819#step:18:341

I personally think we should move to a [multi-arch
Dockerfile](https://docs.docker.com/build/building/multi-platform/#cross-compilation)
instead of creating the manifest manually.
2025-03-10 19:55:03 +00:00
05ebece03a chore: enable SBOM attestation for image builds (#16852)
- Added SBOM (Software Bill of Materials) generation during Docker build
to enhance traceability. Refer to Docker documentation on SBOM:
https://docs.docker.com/build/metadata/attestations/sbom/
- Updated Docker build scripts to use BuildKit for provenance and SBOM
support: https://docs.docker.com/build/metadata/attestations/
- Configured Docker daemon in dogfood image to support the Containerd
snapshotter feature to improve performance:
https://docs.docker.com/engine/storage/containerd/

> [!Important]
> We also need to enable `containerd` on depot runners.
> <img width="587" alt="image"
src="https://github.com/user-attachments/assets/1d7f87c7-fdcc-462a-babe-87ac6486ad09"
/>



## Testing

- Tested locally with ` docker buildx build --sbom=true --output
type=local,dest=out -f Dockerfile .` to verify that an SBOM file is
generated.
- Tested in
[CI](https://github.com/coder/coder/actions/runs/13731162662/job/38408790980?pr=16852#step:17:1)
to ensure the image builds without any errors.


Also closes coder/internal#88
2025-03-11 00:24:14 +05:00
10f1e0b39a chore: update terraform to 1.11.0 (#16781) 2025-03-04 14:28:41 -05:00
64fec8bf0b feat: include winres metadata in Windows binaries (#16706)
Some checks are pending
ci / changes (push) Waiting to run
ci / lint (push) Blocked by required conditions
ci / gen (push) Waiting to run
ci / fmt (push) Blocked by required conditions
ci / test-go (macos-latest) (push) Blocked by required conditions
ci / test-go (ubuntu-latest) (push) Blocked by required conditions
ci / test-go (windows-2022) (push) Blocked by required conditions
ci / test-cli (macos-latest) (push) Blocked by required conditions
ci / test-cli (windows-2022) (push) Blocked by required conditions
ci / test-go-pg (ubuntu-latest) (push) Blocked by required conditions
ci / test-go-pg-16 (push) Blocked by required conditions
ci / test-go-race (push) Blocked by required conditions
ci / test-go-race-pg (push) Blocked by required conditions
ci / test-go-tailnet-integration (push) Blocked by required conditions
ci / test-js (push) Blocked by required conditions
ci / test-e2e (push) Blocked by required conditions
ci / test-e2e-premium (push) Blocked by required conditions
ci / chromatic (push) Blocked by required conditions
ci / offlinedocs (push) Blocked by required conditions
ci / required (push) Blocked by required conditions
ci / build-dylib (push) Blocked by required conditions
ci / build (push) Blocked by required conditions
ci / deploy (push) Blocked by required conditions
ci / deploy-wsproxies (push) Blocked by required conditions
ci / sqlc-vet (push) Blocked by required conditions
ci / notify-slack-on-failure (push) Blocked by required conditions
OpenSSF Scorecard / Scorecard analysis (push) Waiting to run
Adds information like product/file version, description, product name
and copyright to compiled Windows binaries in dogfood and release
builds. Also adds an icon to the executable.

This is necessary for Coder Desktop to be able to check the version on
binaries.

### Before:

![image](https://github.com/user-attachments/assets/82351b63-6b23-4ef8-ab89-7f9e6dafeabd)

![image](https://github.com/user-attachments/assets/d17d8098-e330-4ac0-b104-31163f84279f)

### After:

![image](https://github.com/user-attachments/assets/0ba50afa-ad53-4ad2-b5e2-557358cda037)

![image](https://github.com/user-attachments/assets/d305cc27-e3f3-41a8-9098-498b71344faa)

![image](https://github.com/user-attachments/assets/42f74ace-bda1-414f-b514-68d4d928c958)

Closes https://github.com/coder/coder/issues/16693
2025-02-28 16:03:08 +11:00
5cdc13ba9e docs: fix broken links in feature-stages (#16727)
fix broken links introduced by #16719

---------

Co-authored-by: EdwardAngert <17991901+EdwardAngert@users.noreply.github.com>
2025-02-26 22:42:46 +00:00
658825cad2 feat: add sourcing secondary claims from access_token (#16517)
Niche edge case, assumes access_token is jwt. 

Some `access_token`s are JWT's with potential useful claims.
These claims would be nearly equivalent to `user_info` claims.
This is not apart of the oauth spec, so this feature should not be
loudly advertised. If using this feature, alternate solutions are preferred.
2025-02-24 13:38:20 -06:00
a777c2694e chore: upgrade terraform to 1.10.5 (#16519)
- Updates `terraform` to
[v1.10.5](https://github.com/hashicorp/terraform/blob/v1.10.5/CHANGELOG.md#1105-january-22-2025)
- Updates provider to >=2.0.0 in provider testdata fixtures
- Fixes provider to required release version for resource monitors
- Fixes missing leading / in volumes in resource monitor tests
---------

Co-authored-by: Cian Johnston <cian@coder.com>
2025-02-18 11:45:22 +00:00
d5595f86f8 chore: ignore commit metadata check in release script (#16495)
The `scripts/release/check_commit_metadata.sh` check was too strict for
our new cherry-picking process. This turns the error into a warning log.
2025-02-07 13:37:28 -06:00
6a67e2ede6 feat(cli/server.go): allow the use of public OIDC clients (#16489)
Support public OIDC clients

- Enables support for public OIDC clients by only checking for a client
ID being set. This allows for confidential and public clients to be used
with Coder's OIDC authentication.
- Also adds a public client configuration to the development OIDC setup
script.

Fixes #16135

Change-Id: Iadd85d40c2faa595a0498e25d3407a1f94b5c8a8
Signed-off-by: Thomas Kosiewski <tk@coder.com>

Signed-off-by: Thomas Kosiewski <tk@coder.com>
2025-02-07 14:06:38 +01:00
1336925c9f feat(flake.nix): switch dogfood dev image to buildNixShellImage from dockerTools (#16223)
Replace Depot build action with Nix for Nix dogfood image builds

The dogfood Nix image is now built using Nix's native container tooling instead of Depot. This change:

- Adds Nix setup steps to the GitHub Actions workflow
- Removes the Dockerfile.nix in favor of a Nix-native container build
- Updates the flake.nix to support building Docker images
- Introduces a hash file to track Nix-related changes
- Updates the vendorHash for Go dependencies

Change-Id: I4e011fe3a19d9a1375fbfd5223c910e59d66a5d9
Signed-off-by: Thomas Kosiewski <tk@coder.com>
2025-01-28 16:38:37 +01:00
9bb3319f3a chore: bump alpine from 3.21.0 to 3.21.2 in /scripts (#16107)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-15 18:40:43 +05:00
d7809ecf3f fix(scripts/coder-dev.sh): silence output if stdout is not a TTY (#16131)
The `make -j` output was sometimes emitting non-JSON output from `go
generate`, resulting in errors like the below:

```
++ /home/coder/src/coder/coder/scripts/coder-dev.sh organizations show me -o json
++ jq -r '.[] | select(.is_default) | .name'
parse error: Invalid numeric literal at line 1, column 3
```

This PR modifies `coder-dev.sh` to silence the output of `make` if the
output is not a TTY.
2025-01-14 14:34:23 +00:00
d0037670b0 chore: only run pnpm when node_modules are out of date in Makefile (#16017)
Co-authored-by: Muhammad Atif Ali <atif@coder.com>
2025-01-03 18:37:25 +05:00
94f5d52fdc chore: adopt markdownlint and markdown-table-formatter for *.md (#15831)
Co-authored-by: Edward Angert <EdwardAngert@users.noreply.github.com>
2025-01-03 13:12:59 +00:00
cc98bab30f chore(scripts): remove unused ci-report (#15988) 2024-12-31 14:05:36 +00:00
13bb4492c9 chore: remove apitypings specific go.mod (#15899)
Keeping the deps in sync between this and the primary go.mod is
a headache. 


adds Tailscale generated types
2024-12-18 07:18:31 -06:00
01f2ac0a09 chore: embed Info.plist in dylib (#15907)
Relates to https://github.com/coder/coder-desktop-macos/issues/2
2024-12-18 11:08:33 +00:00
50bb13ca7d chore: bump golang.org/x/crypto from 0.30.0 to 0.31.0 in /scripts/apitypings (#15840) 2024-12-16 16:03:52 +09:00
077e594856 chore: switch to guts for typescript types generation (#15801)
switch to guts for typescript type generation
omitempty vs null must now be explicit
2024-12-11 14:39:21 -06:00
033c476302 chore: bump alpine from 3.20.3 to 3.21.0 in /scripts (#15793) 2024-12-09 22:43:27 +10:00
ce573b9faa fix: add agent exec abstraction (#15717) 2024-12-04 23:30:25 +02:00
c7c35ef4d7 chore: run macOS, windows, and race tests with Postgres in CI (#15520)
This PR is the second in a series aimed at closing
https://github.com/coder/coder/issues/15109.

## Changes

- adds `scripts/embedded-pg/main.go`, which can start a native Postgres
database. This is used to set up PG on Windows and macOS, as these
platforms don't support Docker in Github Actions.
- runs the `test-go-pg` job on macOS and Windows too
- adds the `test-go-race-go` job, which runs race tests with Postgres on
Linux
2024-12-03 13:33:17 +01:00
1f238fed59 feat: integrate new agentexec pkg (#15609)
- Integrates the `agentexec` pkg into the agent and removes the
legacy system of iterating over the process tree. It adds some linting
rules to hopefully catch future improper uses of `exec.Command` in the package.
2024-11-27 20:12:15 +02:00
e3082f1bdc chore: bump cross-spawn from 6.0.5 to 6.0.6 in /scripts/apidocgen (#15599)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-11-22 17:46:44 +05:00
f38f746f5d chore: ensure coder is logged before querying orgs (#15618) 2024-11-21 16:04:21 +01:00
593d659ec8 chore(scripts/develop.sh): auto determine first org name and run terraform init (#15603)
Updates `develop.sh` to automatically determine the name of the 'first
org' when pushing the initial template.

Also runs `terraform init` before running `coder templates push` (pet
peeve).
2024-11-20 14:01:13 +00:00
32fc844b47 chore: support building Coder Desktop .dylib (#15512)
Relates to #14734.
2024-11-20 14:13:03 +11:00
4cb807670d chore: generate countries.tsx from Go code (#15274)
Closes https://github.com/coder/coder/issues/15074

We have a hard-coded list of countries at
https://github.com/coder/coder/blob/main/site/src/pages/SetupPage/countries.tsx.
This means Go code in coder/coder doesn't have an easy way of utilizing
it.

## Solution
Generate countries.tsx from Go code. Generated by `scripts/apitypings`
2024-11-15 12:05:21 -06:00
7982ad7659 feat: expose premium trial form via CLI (#15054)
This PR closes https://github.com/coder/coder/issues/14856
2024-10-29 13:02:20 +00:00
074faec7d7 chore: update Terraform to 1.9.8 (#15256) 2024-10-28 15:24:57 -05:00
ccfffc6911 chore: add tx metrics and logs for serialization errors (#15215)
Before db_metrics were all or nothing. Now `InTx` metrics are always recorded, and query metrics are opt in.


Adds instrumentation & logging around serialization failures in the database.
2024-10-25 12:14:15 -04:00
419eba5fb6 docs: restructure docs (#14421)
Closes #13434 
Supersedes #14182

---------

Co-authored-by: Ethan <39577870+ethanndickson@users.noreply.github.com>
Co-authored-by: Ethan Dickson <ethan@coder.com>
Co-authored-by: Ben Potter <ben@coder.com>
Co-authored-by: Stephen Kirby <58410745+stirby@users.noreply.github.com>
Co-authored-by: Stephen Kirby <me@skirby.dev>
Co-authored-by: EdwardAngert <17991901+EdwardAngert@users.noreply.github.com>
Co-authored-by: Edward Angert <EdwardAngert@users.noreply.github.com>
2024-10-05 10:52:04 -05:00
d04eaf8392 docs: add organizations, provisioners, and premium license docs (#14778)
- [x] Mention Orgs is beta and add a link to get feedback
- [x] Add docs on new provisioner authentication architecture and
deprecate the old one
- [x] Add/update docs for IdP sync
  - [x] Organization Sync
  - [x] Group Sync
  - [x] Role Sync
- [x] Modify `coder.com` codebase to add `Premium` and `Beta` pill, and
allow multiple pills: https://github.com/coder/coder.com/pull/638
- [x] Replace all mentions of "Enterprise" with "Premium" in docs
  - [x] edit: change it to "Licensing"
- [x] Remove the enterprise page and change all links to
coder.com/pricing
- [x] Merge #14786
- [x] Add redirects for coder.com to redirect the `using-organizations`
guide to the new orgs one and /enterprise to /premium
https://github.com/coder/coder.com/pull/645
- [x] Custom roles
- [x] https://github.com/coder/coder/pull/14786
- [x] Remove all mentions of orgs experiment
- [x] Update in-product copy & links to link to the new docs pages

Anything I am missing?

---

[Preview
this](https://coder.com/docs/@orgs-licenses/admin/organizations)

---------

Co-authored-by: Edward Angert <EdwardAngert@users.noreply.github.com>
Co-authored-by: EdwardAngert <17991901+EdwardAngert@users.noreply.github.com>
Co-authored-by: Jaayden Halko <jaayden.halko@gmail.com>
2024-10-01 12:34:16 -05:00
ca80dd657b chore(site): update @playwright/test to version 1.47.2 (#14912)
Playwright version detection in `scripts/remote_playwright.sh` was also fixed.
2024-10-01 13:59:49 +00:00
fb28979537 fix(docs): add coderd_workspace_latest_build_status prometheus metric (#14828) 2024-09-27 02:55:24 +10:00
c127d90efc chore: add ability to include custom protoc-gen-go dependency in nix flake (#14728) 2024-09-24 12:57:07 +00:00
bf87c97ede fix(scripts): allow docs_update_experiments.sh to be run on macOS (#14658) 2024-09-12 21:28:07 +00:00
c44d013519 chore: bump alpine from 3.20.2 to 3.20.3 in /scripts (#14614)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-13 00:01:57 +05:00
33e896d404 chore: add lint for codersdk dependencies (#14638) 2024-09-12 15:34:03 +10:00
c8580a415a feat: expose current agent connections by type via prometheus (#14612) 2024-09-11 14:13:30 +10:00
92b81c4164 test: add some default group/roles claims to testidp (#14591)
Allows testing group/role sync with the fake
2024-09-06 12:35:17 -05:00
bcf9bc3c90 feat(cli): add --provisioner-log-debug option (#14558)
Allows starting a build in debug mode from the CLI without needing
to have the build fail first by adding `--provisioner-log-debug`.
2024-09-04 14:39:35 +01:00
0b2ba96065 feat(cli): add shell completions (#14341) 2024-08-20 14:47:46 +10:00
6f9b3c1592 chore: sign the windows installer (#14353) 2024-08-19 20:33:37 -04:00
1c3dc8392e chore: remove dangling eslint-ignore comments (#14334) 2024-08-19 16:08:53 -06:00
cba6e93176 chore: update docs links (#14221) 2024-08-17 11:51:13 +00:00
95a7c0c4f0 chore: use tabs for prettier and biome (#14283) 2024-08-15 14:53:53 -06:00
48f29a1995 docs: move api and cli docs routes to reference/ (#14241) 2024-08-13 18:39:46 +03:00
49feb12a7f chore(scripts): remove branch checks from release script (#14184)
The initial assumption that branch manipulations should be done by this
script and not pushed to remote manually has proven to get in the way of
the regular release flow.

These are just safety-checks to prevent user error, safe to remove.

Fixes #13648
2024-08-06 14:54:26 +00:00