Commit Graph

6354 Commits

Author SHA1 Message Date
Spike Curtis f01cab9894
feat: use tailnet v2 API for coordination (#11638)
This one is huge, and I'm sorry.

The problem is that once I change `tailnet.Conn` to start doing v2 behavior, I kind of have to change it everywhere, including in CoderSDK (CLI), the agent, wsproxy, and ServerTailnet.

There is still a bit more cleanup to do, and I need to add code so that when we lose connection to the Coordinator, we mark all peers as LOST, but that will be in a separate PR since this is big enough!
2024-01-22 11:07:50 +04:00
Muhammad Atif Ali 5a2cf7cd14
chore(docs): remove tabs from appearance settings (#11726) 2024-01-20 13:27:28 +00:00
dependabot[bot] 83013792b1
chore: bump vite from 4.5.1 to 4.5.2 in /site (#11723)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-20 12:19:26 +00:00
Muhammad Atif Ali 4bed9611a8
fix(docs): fix tabs for support links (#11724) 2024-01-20 15:12:07 +03:00
Ben Potter 77de24c94f
docs: add v2.7.0 changelog (#11719)
* docs: add v2.7.0 changelog

* some modifications
2024-01-19 23:11:35 +00:00
Kayla Washburn-Love 80eac73ed1
chore: remove `useLocalStorage` hook (#11712) 2024-01-19 16:04:19 -07:00
Asher fa99f6a200
chore: make yarn use the right version of node (#11716)
Otherwise if for example you try to run `yarn storybook` it complains
that the version of Node is wrong.

`pnpm storybook` works fine and that is probably what we should
actually use, but as long as we are installing Yarn and not restricting
its use we might as well make it use the right version of Node.
2024-01-19 12:59:38 -09:00
Kayla Washburn-Love 76911f1375
chore: fix `TemplateVersionEditor` story (#11709) 2024-01-19 12:13:30 -07:00
Steven Masley ca48b8783b
fix: update template with noop returned undefined template (#11688)
* fix: doing a noop patch to templates resulted in 404

The patch response did not include the template. The UI required the
template to be returned to form the new page path

null is more explicit, and harder to make occur by mistake.
2024-01-19 18:54:25 +00:00
Kayla Washburn-Love 75d70a9542
chore: add a story for `WorkspaceOutdatedTooltip` (#11695) 2024-01-19 11:41:18 -07:00
Muhammad Atif Ali 6090007708
docs: update docs to set SupportLinks (#11699) 2024-01-19 20:10:10 +03:00
Steven Masley d67c9d1bb5
fix: set request header before do (#11706) 2024-01-19 16:14:08 +00:00
Steven Masley ccfd1a561b
chore: improve device handling error message (#11606) 2024-01-19 09:41:52 -06:00
Mathias Fredriksson 593a1e9f60
feat(cli/exp): add target workspace/users to scaletest commands (#11701) 2024-01-19 15:32:46 +00:00
Marcin Tojek 4b059c4c93
fix: make workspace tooltips actionable (#11700) 2024-01-19 15:17:02 +01:00
Mathias Fredriksson 200a87e7d4
feat(cli/ssh): allow multiple remote forwards and allow missing local file (#11648) 2024-01-19 15:21:10 +02:00
Mathias Fredriksson 73e6bbff7e
feat(cli/exp): add app testing to scaletest workspace-traffic (#11633) 2024-01-19 15:20:19 +02:00
Bruno Quaresma 1f63a11396
refactor(site): refactor resource and agents (#11647) 2024-01-19 09:06:33 -03:00
Marcin Tojek 89fd29478d
feat: expose support links as env variables (#11697) 2024-01-19 11:20:36 +01:00
Garrett Delfosse bf0a6fcc32
feat: manage provisioner tags in template editor (#11600) 2024-01-18 17:35:20 -05:00
Kayla Washburn-Love 9ed3487f67
feat: batch workspace updates (#11583) 2024-01-18 15:14:25 -07:00
Bruno Quaresma 156aaba335
feat(site): show version files diff based on active version (#11686) 2024-01-18 16:08:17 -03:00
Steven Masley 6bb1a34a37
fix: allow ports in wildcard url configuration (#11657)
* fix: allow ports in wildcard url configuration

This just forwards the port to the ui that generates urls.
Our existing parsing + regex already supported ports for
subdomain app requests.
2024-01-18 09:44:05 -06:00
Spike Curtis 1f0e6ba6c6
fix: use raw syscalls to write binary we execute (#11684)
Fixes flake seen here, I think

https://github.com/coder/coder/actions/runs/7565915337/job/20602500818

golang's file processing is complex, and in at least some cases it can return from a file.Close() call without having actually closed the file descriptor.

If we're holding open the file descriptor of an executable we just wrote, and try to execute it, it will fail with "text file busy" which is what we have seen.

So, to be extra sure, I've avoided the standard library and directly called the syscalls to open, write, and close the file we intend to use in the test.

I've also added some more logging so if it's some issue of multiple tests writing to the same location, the we might have a chance to see it.
2024-01-18 16:21:11 +04:00
Marcin Tojek c5d73b86d6
feat: change owner name using account form (#11683) 2024-01-18 12:32:01 +01:00
Muhammad Atif Ali 1ea70ba573
ci: build a multi-arch image on each commit to `main` (#11544) 2024-01-18 10:57:35 +00:00
Spike Curtis 8910ac715c
feat: add tailnet v2 support to wsproxy coordinate endpoint (#11637)
wsproxy also needs to be updated to use tailnet v2 because the `tailnet.Conn` stores peers by ID, and the peerID was not being carried by the JSON protocol.  This adds a query param to the endpoint to conditionally switch to the new protocol.
2024-01-18 10:10:36 +04:00
Spike Curtis 07427e06f7
chore: add setBlockEndpoints to nodeUpdater (#11636)
nodeUpdater also needs block endpoints, so that it can stop sending nodes with endpoints.
2024-01-18 10:02:15 +04:00
Spike Curtis 5b4de667d6
chore: add setCallback to nodeUpdater (#11635)
we need to be able to (re-)set the node callback when we lose and regain connection to a coordinator over the network.
2024-01-18 09:51:09 +04:00
Spike Curtis e725f9d7d4
chore: stop passing addresses on configMaps constructor (#11634)
moving this out of the constructor so that setting this when creating a new `tailnet.Conn` triggers configuring the engine.
2024-01-18 09:43:28 +04:00
Spike Curtis a514df71ed
chore: add setDERPMap to configMaps (#11590)
Add setDERPMap
2024-01-18 09:34:30 +04:00
Spike Curtis 25e289e1f6
chore: add setAddresses to nodeUpdater (#11571)
Adds setAddresses to nodeUpdater
2024-01-18 09:24:16 +04:00
Spike Curtis 387723a596
fix: close pg PubSub listener to avoid race (#11640)
Fixes flake as seen here: https://github.com/coder/coder/runs/20528529187
2024-01-18 09:18:59 +04:00
Asher 72d9ec07aa
fix: detect JetBrains running on local ipv6 (#11676) 2024-01-17 14:08:15 -09:00
Jon Ayers 552e9fe22f
fix: avoid returning 500 on apps when workspace stopped (#11656) 2024-01-17 12:06:59 -06:00
Bruno Quaresma 1be119b08f
fix(site): fix search menu for creating workspace and templates filter (#11674) 2024-01-17 17:54:56 +00:00
Steven Masley b246f08d84
chore: move app URL parsing to its own package (#11651)
* chore: move app url parsing to it's own package
2024-01-17 10:41:42 -06:00
Bruno Quaresma 1aee8da4b6
fix(site): fix sidebar scroll (#11671) 2024-01-17 16:05:05 +00:00
dependabot[bot] fa6176c2ff
chore: bump github.com/u-root/u-root from 0.11.0 to 0.12.0 (#11625)
* chore: bump github.com/u-root/u-root from 0.11.0 to 0.12.0

Bumps [github.com/u-root/u-root](https://github.com/u-root/u-root) from 0.11.0 to 0.12.0.
- [Release notes](https://github.com/u-root/u-root/releases)
- [Changelog](https://github.com/u-root/u-root/blob/main/RELEASES)
- [Commits](https://github.com/u-root/u-root/compare/v0.11.0...v0.12.0)

---
updated-dependencies:
- dependency-name: github.com/u-root/u-root
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* `go mod tidy`

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Muhammad Atif Ali <me@matifali.dev>
Co-authored-by: Muhammad Atif Ali <atif@coder.com>
2024-01-18 01:36:47 +10:00
Marcin Tojek e83f13d8c5
fix: typo in whitespace (#11667) 2024-01-17 12:36:15 +00:00
Marcin Tojek 5eb3e1cdaa
feat: expose `owner_name` in `coder_workspace` resource (#11639) 2024-01-17 13:20:45 +01:00
Spike Curtis b173195e0d
Revert "fix: detect JetBrains running on local ipv6 (#11653)" (#11664)
This reverts commit 2d61d5332a.
2024-01-17 15:38:39 +04:00
Spike Curtis 2aa3cbbd03
chore: add logging to nodeUpdater (#11569)
Add debug logging for nodeUpdater and configMaps
2024-01-17 14:15:45 +04:00
Spike Curtis bad2ce562e
fix: stop asserting fuzz bytes written in test
Fixes a flake seen here: https://github.com/coder/coder/actions/runs/7541558190/job/20528545916

```
=== FAIL: enterprise/provisionerd TestRemoteConnector_Fuzz (0.06s)
    t.go:84: 2024-01-16 12:32:27.024 [info]  connector: failed provisioner authentication  remote_addr=[::1]:45138 ...
        error= failed to receive jobID:
                   github.com/coder/coder/v2/enterprise/provisionerd.(*remoteConnector).authenticate
                       /home/runner/actions-runner/_work/coder/coder/enterprise/provisionerd/remoteprovisioners.go:438
                 - bufio.Scanner: token too long
    t.go:84: 2024-01-16 12:32:27.024 [debu]  connector: closed connection  remote_addr=[::1]:45138  error=<nil>
    remoteprovisioners_test.go:209: 
            Error Trace:    /home/runner/actions-runner/_work/coder/coder/enterprise/provisionerd/remoteprovisioners_test.go:209
            Error:          "2992256" is not less than "2097152"
            Test:           TestRemoteConnector_Fuzz
            Messages:       should not allow more than 1 MiB
```

This was an attempt to test that malicious actors can't abuse our authentication protocol to make us allocate a bunch of memory.
However, the test asserted on the number of bytes sent by the fuzzer, not the number of bytes read (& allocated) by the service.  The former is affected by network queue sizes and is thus flaky without actively managing the socket queues, which I don't think we want to do.

In actual practise, the thing that matters is how much memory the bufio Scanner allocates. By inspection, the scanner will allocate up to 64k, and testing this is true devolves into testing the go standard library, which I don't think is worth doing.

So... let's just drop the assertion because 

a) its flaky, 

b) it doesn't test what we actually want to test, 

c) the behavior we actually care about is part of the standard library.
2024-01-17 12:59:45 +04:00
Spike Curtis 38d9ce5267
chore: add setStatus support to nodeUpdater (#11568)
Add support for the wgengine Status callback to nodeUpdater
2024-01-17 09:06:34 +04:00
Spike Curtis f6dc707511
chore: add DERPForcedWebsocket to nodeUpdater (#11567)
Add support for DERPForcedWebsocket to nodeUpdater
2024-01-17 08:55:45 +04:00
Asher 2d61d5332a
fix: detect JetBrains running on local ipv6 (#11653) 2024-01-16 15:53:41 -09:00
Colin Adler be43d6247d
feat: add additional fields to first time setup trial flow (#11533)
* feat: add additional fields to first time setup trial flow

* trial generator typo
2024-01-16 18:19:16 -06:00
Jon Ayers 1196f83ebd
feat: automatically activate dormant workspaces when manually started (#11655) 2024-01-16 16:42:04 -06:00
Stephen Kirby d74aae7a4a
removed alpha tags from workspace actions features in template settings (#11654) 2024-01-16 16:23:19 -06:00