* chore: Improve project-wide prettier formatting and ignored files
* chore: `Run make fmt/prettier`
* Fix gitignore for `.vscode` folder so that ! works
* Add comment in `.prettierrc.yaml` to explain `.editorconfig`
* Remove scripts/apidocgen/markdown-template/README.md
* Use `yq` for processing prettierrc, update lib.sh dependency check
* Add `yq` to Dockerfile and Nix
* chore: Close idle connections on test cleanup
It's possible that this was the source of a leak on Windows...
* ci: use big runners
* fix: Improve tailnet connections by reducing timeouts
This awaits connection ping before running a dial. Before,
we were hitting the TCP retransmission and handshake timeouts,
which could intermittently add 1 or 5 seconds to a connection
being initialized.
* Add logging to Startupscript test
* Add better logging
* Write startup script logs to fs dir
* Fix startup script test
* Fix startup script test
* Reduce test timeout
* Use central tmp dir in agent
* Adjust output
* Skip startup script test on Windows
Co-authored-by: Kyle Carberry <kyle@carberry.com>
This was breaking the release process. Namely it was running
the `gen` targets due to the dependency tree, which was failing
on macOS and Linux runners. This revert can be reverted once
we fix that up.
This caused the following issues:
- Slim binaries weren't being updated.
- The coder.tar.ztd was misplaced.
- There is no coder.sha1 file with proper filenames.
This should be reintroduced in a future change with those fixes.
* fix: Remove explicit coverpkg github.com/coder/coder/codersdk
This package is already covered by ./...
* fix: Ignore test utils in coverage (clitest, coderdtest, ptytest)
This commit lowers the postgres test timeout from 30m to 20m, currently
our postgres tests seem to take 8-10m, a 2x factor should suffice.
Comments were updated in both places to reflect the reasoning and
necessity of keeping these values in sync.
They used to take longer but the `count` was lowered in
3d40cb85b7.
The actual timeout value of `make test-postgres` got overlooked in
https://github.com/coder/coder/pull/3079.
It's unnecessary for these to run twice. It increases CI times without
providing much additional assurance tests don't have race conditions.
This already runs with `-race` too.
* test: Use a template to prevent migrations from running for every test
* Create a single makefile target
* Fix built-in race
* Extend timeout of built-in PostgreSQL fetch
- Running make dev now prompts you to run ./scripts/develop.sh manually, as GNU make does not appear to pass SIGINT to subprocesses.
- Added checks to develop.sh to ensure that coderd is listening before running our initial setup steps
- Add some more troubleshooting/debugging output to develop.sh
This commit applies some recommended settings to sacrifice durability
for speed for our testing database:
- Mount PGDATA dir on a tmpfs (--tmpfs /tmp)
- Turn off fsync
- Turn off synchronous_commit
- Turn off full_page_writes
Ref: https://www.postgresql.org/docs/current/non-durability.html
* Fix socket leak, clean up single use postgres databases
Signed-off-by: Spike Curtis <spike@coder.com>
* Move migrate close defer until after we know it is not nil
Signed-off-by: Spike Curtis <spike@coder.com>
* feat: Implement pagination for template versions
* feat: Use unified pagination between users and template versions
* Sync codepaths between users and template versions
* Create requestOption type in codersdk and add test
* Fix created_at edge case for pagination cursor in queries
* feat: Add support for json omitempty and embedded structs in apitypings (#1318)
* Add scripts/apitypings/main.go to Makefile
This fixes paths not resolving in macOS, causing
the build target to fail. This also renames the
site target to specify the index.html, which is
the output artifact of building the site.