Commit Graph

6945 Commits

Author SHA1 Message Date
Danny Kopping d734f3fb74
chore: reduce azure CA cert validity check period to 2 months (#12788)
Signed-off-by: Danny Kopping <danny@coder.com>
2024-03-28 11:17:02 +02:00
Muhammad Atif Ali 0288e73e9b
docs: add guide for Xray integration (#12629)
* docs: add guides for Xray integration

* `make fmt`
2024-03-28 04:48:50 +03:00
Colin Adler dc8cf3eea5
fix: nil ptr dereference when removing a license (#12785) 2024-03-27 15:59:35 -05:00
Muhammad Atif Ali 5235faa79f
chore(site): remove max ttl from scheduling description (#12715) 2024-03-27 14:24:26 -05:00
Mathias Fredriksson 539d6b0f3b
test(coderd): fix template name too long in TestPatchTemplateMeta (#12781) 2024-03-27 18:25:42 +02:00
Mathias Fredriksson 421bf7e785
fix(coderd): use insights for DAUs, simplify metricscache (#12775)
Fixes #12134
Fixes https://github.com/coder/customers/issues/384
Refs #12122
2024-03-27 18:10:14 +02:00
Bruno Quaresma 5d82a78d4c
fix(site): fix and improve pending state on template editor UI (#12766) 2024-03-27 12:42:07 -03:00
Mathias Fredriksson 47fd190064
fix(coderd/database): improve perf of `GetTemplateInsightsByInterval` (#12773)
Refs #12122
2024-03-27 14:10:46 +02:00
Mathias Fredriksson ba1eaceda4
feat(coderd): add sftp to insights apps (#12675) 2024-03-27 14:09:29 +02:00
Danny Kopping 6cb1fc8956
chore: add note about options use in numeric parameters (#12770) 2024-03-27 13:46:41 +02:00
Mathias Fredriksson 0da29d74ac
fix(coderd/database): improve query perf of `GetTemplateAppInsights` (#12767)
Refs #12122
2024-03-27 12:28:36 +02:00
Danny Kopping a74ef4096e
feat: allow number options with monotonic validation (#12726)
NOTE: terraform-provider-coder was updated to facilitate this change, and your template will require v0.19.0 for this feature to work. You can run terraform init -upgrade in your template directory. If you have a version constraint set, ensure it points to this version.
2024-03-27 08:54:42 +00:00
Ammar Bandukwala 0d9010e150
chore: fix 30% startup time hit from userpassword (#12769)
pbkdf2 is too expensive to run in init, so this change makes it load
lazily. I introduced a lazy package that I hope to use more in my
`GODEBUG=inittrace=1` adventure.


Benchmark results:

```
$ hyperfine "coder --help" "coder-new --help"
Benchmark 1: coder --help
  Time (mean ± σ):      82.1 ms ±   3.8 ms    [User: 93.3 ms, System: 30.4 ms]
  Range (min … max):    72.2 ms …  90.7 ms    35 runs
 
Benchmark 2: coder-new --help
  Time (mean ± σ):      52.0 ms ±   4.3 ms    [User: 62.4 ms, System: 30.8 ms]
  Range (min … max):    41.9 ms …  62.2 ms    52 runs
 
Summary
  coder-new --help ran
    1.58 ± 0.15 times faster than coder --help
```
2024-03-26 20:47:14 -05:00
dependabot[bot] 73fbdbbe2d
chore: bump github.com/coreos/go-oidc/v3 from 3.9.0 to 3.10.0 (#12739)
Bumps [github.com/coreos/go-oidc/v3](https://github.com/coreos/go-oidc) from 3.9.0 to 3.10.0.
- [Release notes](https://github.com/coreos/go-oidc/releases)
- [Commits](https://github.com/coreos/go-oidc/compare/v3.9.0...v3.10.0)

---
updated-dependencies:
- dependency-name: github.com/coreos/go-oidc/v3
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-26 12:45:42 -05:00
Colin Adler 4d5a7b2d56
chore(codersdk): move all tailscale imports out of `codersdk` (#12735)
Currently, importing `codersdk` just to interact with the API requires
importing tailscale, which causes builds to fail unless manually using
our fork.
2024-03-26 12:44:31 -05:00
dependabot[bot] 0bea8906d4
chore: bump google.golang.org/api from 0.170.0 to 0.171.0 (#12737)
Bumps [google.golang.org/api](https://github.com/googleapis/google-api-go-client) from 0.170.0 to 0.171.0.
- [Release notes](https://github.com/googleapis/google-api-go-client/releases)
- [Changelog](https://github.com/googleapis/google-api-go-client/blob/main/CHANGES.md)
- [Commits](https://github.com/googleapis/google-api-go-client/compare/v0.170.0...v0.171.0)

---
updated-dependencies:
- dependency-name: google.golang.org/api
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-26 17:14:01 +00:00
dependabot[bot] a323e30450
chore: bump github.com/aws/aws-sdk-go-v2 from 1.25.3 to 1.26.0 (#12738)
Bumps [github.com/aws/aws-sdk-go-v2](https://github.com/aws/aws-sdk-go-v2) from 1.25.3 to 1.26.0.
- [Release notes](https://github.com/aws/aws-sdk-go-v2/releases)
- [Commits](https://github.com/aws/aws-sdk-go-v2/compare/v1.25.3...v1.26.0)

---
updated-dependencies:
- dependency-name: github.com/aws/aws-sdk-go-v2
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-26 12:03:01 -05:00
Mathias Fredriksson ae0ee622bb
fix(coderd/database): improve data exclusion in `UpsertTemplateUsageStats` (#12764)
The PostgreSQL query analyzer wasn't able to eliminate the agent stats without re-introducing this filter.

Before: https://explain.dalibo.com/plan/21h7gb4f4bef391g
After: https://explain.dalibo.com/plan/721ec1cccee91egc
2024-03-26 17:21:05 +02:00
Mathias Fredriksson f418ece9ae
test(cli): prevent flake due to outdated build in TestSSH (#12760)
Fixes #12752
2024-03-26 10:46:58 +00:00
Spike Curtis 51491fc01b
fix(provisionersdk): change test to use bash script instead of binary echo (#12759)
Just upgraded to macOS 14.4 and TestAgentScript/Run fails for me with error `signal: killed`.  I opened the test directory in a terminal and sure enough, when you execute the `echo` binary, it is immediately killed.  The binary has no extended attributes and is byte-identical to the one in `/bin/`.

This fix uses a different strategy: instead of copying the `echo` binary from the system around, we just copy a small bash script that _calls_ the `echo` command.
2024-03-26 14:37:20 +04:00
Colin Adler 5f28220eec
fix(coderd): add timeout to websocket waitgroup on shutdown (#12754) 2024-03-26 03:04:15 +00:00
Kayla Washburn-Love cfb484fa25
fix: always use bash when executing web terminal tests (#12755) 2024-03-25 16:58:07 -06:00
dependabot[bot] 064a08efa5
ci: bump the github-actions group with 1 update (#12743)
Bumps the github-actions group with 1 update: [contributor-assistant/github-action](https://github.com/contributor-assistant/github-action).


Updates `contributor-assistant/github-action` from 2.3.1 to 2.3.2
- [Release notes](https://github.com/contributor-assistant/github-action/releases)
- [Commits](https://github.com/contributor-assistant/github-action/compare/v2.3.1...v2.3.2)

---
updated-dependencies:
- dependency-name: contributor-assistant/github-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: github-actions
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-25 23:40:35 +03:00
Asher 40e5ad5499
feat: make OAuth2 provider not enterprise-only (#12732) 2024-03-25 11:52:22 -08:00
Garrett Delfosse 60f335113c
chore: add protocol lag to shared ports description (#12728) 2024-03-25 15:28:38 -04:00
Kyle Carberry fd8010c26d
chore: make `build` only run on main (#12753) 2024-03-25 19:15:18 +00:00
Kayla Washburn-Love 541ccd940c
chore: change e2e testing port (#12751) 2024-03-25 13:07:34 -06:00
Kyle Carberry 03ab37b343
chore: remove middleware to request version and entitlement warnings (#12750)
This cleans up `root.go` a bit, adds tests for middleware HTTP transport
functions, and removes two HTTP requests we always always performed previously
when executing *any* client command.

It should improve CLI performance (especially for users with higher latency).
2024-03-25 15:01:42 -04:00
Cian Johnston ba3879ac47
fix(cli): fix newline escape sequence in support blurb (#12749) 2024-03-25 16:51:48 +00:00
Marcin Tojek 1e0bbd5e10
docs: describe operational readiness (#12723) 2024-03-25 17:10:24 +01:00
Mathias Fredriksson 7e183db199
test(coderd): fix todo for increased accuracy in insights test (#12727)
This PR updates the tests in `insights_test.go` to enable commented-out scenarios. This behavior was fixed by previous PRs in this stack. Note that the updated golden files are correct since they are "second template only" meaning that the newly introduced data is considered as expected. In other golden files there is no change since "only count once" is applied.
2024-03-25 17:55:53 +02:00
Mathias Fredriksson b183236482
feat(coderd/database): use `template_usage_stats` in `*ByTemplate` insights queries (#12668)
This PR updates the `*ByTempalte` insights queries used for generating Prometheus metrics to behave the same way as the new rollup query and re-written insights queries that utilize the rolled up data.
2024-03-25 17:42:02 +02:00
Cian Johnston 01f9a9ab77
feat(cli): unhide support bundle cmd (#12745)
* chore(cli): add another test to ensure no secret leakage

* feat(cli): unhide support bundle cmd
2024-03-25 15:14:27 +00:00
Mathias Fredriksson 2332d8197a
feat(coderd/database): use `template_usage_stats` in `GetUserActivityInsights` query (#12672)
This PR updates the `GetUserActivityInsights` query to use rolled up `template_usage_stats` instead of raw agent and app stats.
2024-03-25 16:16:41 +02:00
Mathias Fredriksson a8ed689bda
feat(coderd/database): use `template_usage_stats` in `GetUserLatencyInsights` query (#12671)
This PR updates the `GetUserLatencyInsights` query to use rolled up `template_usage_stats` instead of raw agent and app stats.
2024-03-25 16:07:40 +02:00
Mathias Fredriksson 5738a03930
feat(coderd/database): use `template_usage_stats` in `GetTemplateAppInsights` query (#12669)
This PR updates the `GetTemplateAppInsights` query to use rolled up `template_usage_stats` instead of raw agent and app stats.
2024-03-25 15:58:37 +02:00
Mathias Fredriksson 5f3be62c83
feat(coderd/database): use `template_usage_stats` in `GetTemplateInsightsByInterval` query (#12667)
This PR updates the `GetTemplateInsightsByInterval` query to use rolled up `template_usage_stats` instead of raw agent and app stats.
2024-03-25 15:45:49 +02:00
Mathias Fredriksson 35d08434a9
feat(coderd/database): use `template_usage_stats` in `GetTemplateInsights` query (#12666)
This PR updates the `GetTemplateInsights` query to use rolled up `template_usage_stats` instead of raw agent and app stats.
2024-03-25 15:33:31 +02:00
Mathias Fredriksson f34592f45d
fix(coderd): skip logging error for cancelled query in agent report stats (#12730) 2024-03-25 12:20:16 +02:00
Jon Ayers 951dfaa99c
feat: add workspace_id to workspace_build audit logs (#12718) 2024-03-22 15:10:32 -05:00
Kayla Washburn-Love 0966fe2560
fix: create workspace with optional auth providers (#12729) 2024-03-22 13:26:02 -06:00
Steven Masley c674128105
chore: allow search by build params in workspace search filter (#12694)
* chore: workspace search filter allow search by params
* has_param will return all workspaces with the param existance
* exact matching
2024-03-22 14:22:47 -05:00
Mathias Fredriksson b4fd819f0d
test(coderd): enable `dbrollup` service for insights tests (#12673) 2024-03-22 20:18:20 +02:00
Mathias Fredriksson 12e6fbf11e
feat(coderd/database): add `dbrollup` service to rollup insights (#12665)
Add `dbrollup` service that runs the `UpsertTemplateUsageStats` query
every 5 minutes, on the minute. This allows us to have fairly real-time
insights data when viewing "today".
2024-03-22 18:42:43 +02:00
Mathias Fredriksson 04f0510b09
feat(coderd/database): add `template_usage_stats` table and rollup query (#12664)
Add `template_usage_stats` table for aggregating tempalte usage data.
Data is rolled up by the `UpsertTemplateUsageStats` query, which fetches
data from the `workspace_agent_stats` and `workspace_app_stats` tables.
2024-03-22 18:33:34 +02:00
Kyle Carberry a6b8f381f0
feat: support windows containers in bootstrap script (#12662)
Fixes #7462.
2024-03-22 14:48:51 +00:00
Muhammad Atif Ali 58cbd8335f
chore(site): reorganize template schedule strings page (#12714) 2024-03-22 15:44:16 +03:00
Marcin Tojek a7d9d87ba2
docs: use scale testing utility (#12643) 2024-03-22 11:33:31 +00:00
Colin Adler 37a05372fa
fix: disable relay if built-in DERP is disabled (#12654)
Fixes https://github.com/coder/coder/issues/12493
2024-03-21 16:53:41 -05:00
Kyle Carberry d3c9aaf57b
chore: update hero image for refreshed dashboard (#12712)
* chore: update hero image for refreshed dashboard

I used html.to.figma for this. It's in the following Figma:
https://www.figma.com/file/m4zkIU7e64BNyRlUShuluq/README-Screenshot?type=design&node-id=13-1993&mode=design&t=o2AhL8y7u8uFMVPI-0

I couldn't take screenshots directly, because I'm on Linux and the macOS
browser with the icons look much better.

* Try stacked images

* Try stacked inverted
2024-03-21 16:28:02 -04:00