8275 Commits

Author SHA1 Message Date
7011e4bfcf chore: cherry-pick patches for 2.17.3 (#15852)
Co-authored-by: Spike Curtis <spike@coder.com>
Co-authored-by: Muhammad Atif Ali <atif@coder.com>
Co-authored-by: Marcin Tojek <mtojek@users.noreply.github.com>
Co-authored-by: Ethan <39577870+ethanndickson@users.noreply.github.com>
v2.17.3
2024-12-12 14:48:57 -06:00
dbfadf2b73 fix: fix tailnet resume using incorrect DB reference (#15522) (#15574)
- We were instantiating a cryptokey cache with a vanilla reference to
the database instead of one wrapped by dbcrypt.
- Fixes an issue where failing to instantiate unrelated keycaches does
not fatally error out.
2024-11-18 14:27:55 -06:00
0598aecf90 chore: add cherry-picks for Coder v2.17.1 (#15454)
Co-authored-by: Cian Johnston <cian@coder.com>
v2.17.2
2024-11-08 15:24:55 -06:00
5a6d23a4a3 fix(site/static/icon): add filebrowser icon (#15367) (#15370)
Fixes https://github.com/coder/coder/issues/15365

We used to hit
https://raw.githubusercontent.com/filebrowser/logo/master/icon_raw.svg
for the filebrowser icon but coder/modules#334 modified the icon URL to
point to a self-hosted icon.

I simply copied the icon from the `coder/modules` repo.

(cherry picked from commit dc29b812861b3db92026e0779d74eea7d8018e2d)

Co-authored-by: Cian Johnston <cian@coder.com>
v2.17.0
2024-11-04 16:30:11 -06:00
9a444b3af2 chore: cherry pick PRs for 2.17 (#15339)
- [x]  https://github.com/coder/coder/pull/15305 
- [x]  https://github.com/coder/coder/pull/15307 
- [x]  https://github.com/coder/coder/pull/15270 
- [x]  https://github.com/coder/coder/pull/15261 
- [x]  https://github.com/coder/coder/pull/15281
- [x]  https://github.com/coder/coder/pull/15298
- Release Docs:
    - [x]  https://github.com/coder/coder/pull/15296
    - [x]  https://github.com/coder/coder/pull/15280
    - [x]  https://github.com/coder/coder/pull/15294
    - [x]  https://github.com/coder/coder/pull/15310

---------

Co-authored-by: Steven Masley <Emyrk@users.noreply.github.com>
Co-authored-by: Bruno Quaresma <bruno@coder.com>
Co-authored-by: Danielle Maywood <danielle@themaywoods.com>
Co-authored-by: Colin Adler <colin1adler@gmail.com>
Co-authored-by: Edward Angert <EdwardAngert@users.noreply.github.com>
2024-11-01 13:39:29 -05:00
d83f4eb076 fix: stop activity bump if no tracked sessions (#15237)
Part of https://github.com/coder/coder/issues/15176

I originally kept this the same because I wanted to be conservative
about when we start dropping activity, but this is proving to be a
problem when using `coder ssh` with `--usage-app=disabled`. Because the
workspace agent still counts this as a connection (I think it still
should so it's counted somewhere) but not as a SSH / IDE session. This
leads to background ssh tasks that want to be untracked still continuing
to bump activity when it shouldn't. This makes it so we have to have an
explicit session to bump activity.
2024-10-29 18:08:24 +00:00
ceb168be95 fix(flake.nix): remove preBuild to fix building on Linux (#15259) 2024-10-29 12:57:13 -05:00
097fdaffe2 chore: add quota to source-controlled template (#15271) 2024-10-29 16:31:46 +00:00
3c7808c575 fix(site): update workspace timings to use theme colors (#15269)
Fix https://github.com/coder/coder/issues/15266

After fix:
<img width="1210" alt="Screenshot 2024-10-29 at 09 37 02"
src="https://github.com/user-attachments/assets/35ff0361-6323-4e26-b4f2-05da6f1651c6">
<img width="1200" alt="Screenshot 2024-10-29 at 09 36 49"
src="https://github.com/user-attachments/assets/c2e55364-9f21-4bd1-bda6-aedf106a9742">
<img width="1202" alt="Screenshot 2024-10-29 at 09 36 40"
src="https://github.com/user-attachments/assets/2d0222d9-cf25-4ef9-8d74-f426fbae7bec">
2024-10-29 13:02:24 -03: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
78ff375fed feat: log when attempted password resets fail (#15267)
Closes https://github.com/coder/coder/issues/15154

Log when someone attempts to either
- Request a one-time passcode for an account that doesn't exist
- Attempt to change a password with an invalid one-time passcode and/or
email

---------

Co-authored-by: Mathias Fredriksson <mafredri@gmail.com>
2024-10-29 12:19:56 +00:00
4cad6f75a9 fix(site): fix workspace timings verbiage (#15268) 2024-10-29 09:05:41 -03:00
4e20eea9e6 chore: remove unused 'must_reset_password' column (#15265)
Closes https://github.com/coder/internal/issues/153

Remove the 'must_reset_password' as it was introduced for use in the
"forgot password?" flow but never used.
2024-10-29 09:57:40 +00:00
1d925ab043 fix: ensure user admins can always see users table (#15226)
Closes #15212

## Changes made
- Updated logic so that proxy config is only requested when appropriate,
instead of for all users on all deployment pages
- Split up the main context provider for the `/deployment` and
`/organizations` routes, and updated layout logic for
`ManagementSettingsLayout` layout component. This ensures the sidebar is
always visible, even if request errors happen
- Added additional routing safeguards to make sure that even if a user
can view one page in the deployment section, they won't be able to
navigate directly to any arbitrary deployment page
- Updated logic for sidebar navigation to ensure that nav items only
appear when the user truly has permission
- Centralized a lot of the orgs logic into the `useAuthenticated` hook
- Added additional check cases to the `permissions.tsx` file, to give
more granularity, and added missing type-checking
- Extended the API for the `RequirePermissions` component to let it
redirect users anywhere
- Updated some of our testing setup files to ensure that types were
defined correctly

---------

Co-authored-by: McKayla Washburn <mckayla@hey.com>
2024-10-29 01:06:33 -04:00
fd60e1c2ba fix: fix security workflow not installing protoc properly (#15263) 2024-10-29 01:30:43 +00:00
971388762c chore(docs): change mentions of enterprise to premium (#15258)
Matches our latest licensing verbiage.
2024-10-28 15:56:51 -05:00
742413e149 chore: bump google.golang.org/api from 0.202.0 to 0.203.0 (#15246)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-10-28 20:47:19 +00:00
fb4219f57d fix: parse int to correct bit size (#15257) 2024-10-28 20:31:01 +00:00
074faec7d7 chore: update Terraform to 1.9.8 (#15256) 2024-10-28 15:24:57 -05:00
516ba9e28e chore: update Go to 1.22.8 (#15255) 2024-10-28 15:09:43 -05:00
7cb20d7b26 chore: name unlabeled db transaction metrics (#15251) 2024-10-28 13:15:29 -04:00
ecb22461bb chore: bump github.com/gohugoio/hugo from 0.134.1 to 0.136.5 (#15247)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-10-28 17:13:51 +00:00
1636124ed1 chore: bump github.com/fatih/color from 1.17.0 to 1.18.0 (#15248)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-10-28 17:11:31 +00:00
cdd40fb292 ci: bump the github-actions group with 2 updates (#15245)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-10-28 21:59:30 +05:00
1d33990e78 fix: ensure make gen runs on any changes (#15253)
Previously, `make gen` ran on CI whenever a non-docs change was made.
Based off the problem described in #15252, it sounds like CI should
*always* be running `gen`.

(Because I broke it, currently PR `gen` is getting skipped unless the
`ci` category is updated)
2024-10-29 03:46:18 +11:00
95a348ecc7 fix(coderd): improve use case handling in notifier for appearance fetchers (#15242)
Fixing #15241 & add tests.
2024-10-28 16:53:20 +01:00
03940f5fef chore: ensure make gen runs on CI when docs are updated (#15252)
https://github.com/coder/coder/pull/15203 was merged with a failing
`make gen`, as it only updated the docs. This makes it so this can't
happen again.

The capitalization of the Go type used in the auto-generated docs
(`codersdk.OAuth2GithubConfig`) wasn't updated as it would technically
be a breaking change for the sdk.
2024-10-28 15:22:37 +00:00
007f0a35a4 fix: adjust instances of Github to GitHub (#15203)
s/Github/GitHub

Co-authored-by: EdwardAngert <17991901+EdwardAngert@users.noreply.github.com>
2024-10-28 07:43:30 -04:00
c8f68cbc46 feat: use hashicorp/cloud-init provider for AWS-linux example (#15240)
Same as #15050 but for the `aws-linux` template.
Tested, works as expected.
2024-10-28 07:43:45 +00:00
91c337a2ff feat: use hashicorp/cloud-init provider in AWS devcontainer template (#15050)
This PR makes templates uses the
[hashicorp/cloud-init](https://registry.terraform.io/providers/hashicorp/cloudinit/latest/docs)
provider instead of hardcoding a cloud-init config.
2024-10-27 13:17:03 +00:00
9308331d9a chore: change promtheus label to 'tx_id' (#15238)
the 'id' label was not coming through. Maybe it's reserved? Or used in
the chain somewhere.
2024-10-25 18:50:42 -04:00
e03ef62a13 chore: add scim service provider config endpoint (#15235)
Adds a static `/scim/v2/ServiceProviderConfig` endpoint. Our scim
support is static, so the response config is also defined statically.
2024-10-25 18:27:34 -04:00
27f5ff2dd1 chore: correctly document SCIM authentication (#15234) 2024-10-25 12:40:13 -05:00
900e2cd39c chore: implement better 404 for unimplemented scim endpoints (#15232)
Prior to this, html was returned.
2024-10-25 13:23:12 -04:00
487b37b228 feat(enterprise): support bearer tokens in SCIM authentication (#15233) 2024-10-25 11:52:57 -05:00
0dd942e197 fix: stop incrementing activity on empty agent stats (#15204) 2024-10-25 16:49:44 +00:00
cd890aa3a0 feat: enable key rotation (#15066)
This PR contains the remaining logic necessary to hook up key rotation
to the product.
2024-10-25 17:14:35 +01: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
df34858c3c chore(coderd): extract fileszip to package archive for reuse (#15229)
Related to https://github.com/coder/coder/issues/15087
As part of sniffing the workspace tags from an uploaded file, we need to
be able to handle both zip and tar files. Extracting the functions to
a separate `archive` package will be helpful here.
2024-10-25 15:14:39 +01:00
5ad47471b5 chore(provisioner/terraform): extract terraform parsing logic to package tfparse (#15230)
Related to https://github.com/coder/coder/issues/15087

Extracts the logic for extracting variables and workspace tags
to a separate package `tfparse`.

---------

Co-authored-by: Danielle Maywood <danielle@themaywoods.com>
2024-10-25 14:48:12 +01:00
d9f1aafa94 fix: stop logging errors on cancel in notifier (#15186)
fixes https://github.com/coder/internal/issues/121

We shouldn't log errors when context is canceled, e.g. on shutdown.  This breaks our tests and alarms customers needlessly.
2024-10-25 16:28:54 +04:00
5bcaa93198 chore(enterprise/coderd/license): fix time-related flake in license expiration warning test (#15228)
Fixes a time-related test flake in enterprise/coderd/license/license_test.go
2024-10-25 12:19:50 +01:00
b62f3e6af5 feat(helm): add topologySpreadConstraints value (#15168) 2024-10-25 09:14:39 +01:00
e5668720b8 fix(coderd): improve password update logic (#15210)
Working on #15202

The main change is to fetch the user doing the action to verify if it
should be able to change the password if there's no old_password set.
2024-10-24 22:48:15 +02:00
f258232be9 chore: return json for disabled scim routes (#15222)
Customers reporting html pages returned to SCIM. Likely a disabled SCIM.
We should just report a more consumable error by the SCIM provider.

Previous behavior was a status code 200 HTML page
2024-10-24 16:26:16 -04:00
81e99bec6b fix: close server pty connections on client disconnect (#15201) 2024-10-24 15:12:35 -04:00
69c1d981e3 fix(site): sanitize login redirect (#15208) 2024-10-24 13:59:26 -05:00
7efdf811ae chore: fix incorrect quote in Workspace Delete confirmation modal (#15216)
Tiny PR to change left-hand double quote on right side to right-hand double quote.
2024-10-24 14:43:10 -04:00
095c9797c9 feat: notify users on template deprecation (#15195)
Closes https://github.com/coder/coder/issues/15117

Notify users when a template has been deprecated.
2024-10-24 13:12:12 +01:00
bcd68ee249 fix: fix build in security workflow (#15209)
- Fixes an issue where building the Docker image failed due to moving
the directory hosting the Dockerfile
- Removed the Palo Alto scanning since our subscription there is set to
expire. Trivy is still running though.
2024-10-24 01:21:18 +01:00