* ci: Do release tagging in CI and add --draft support
* Add -h, --help to release.sh
* Add -h, --help to increment_version_tag.sh
* Limit release concurrency
* Add automatic release watching
* ci: Add git config, tag as "GitHub Actions Bot"
Co-authored-by: Dean Sheather <dean@deansheather.com>
* docs: audit, deploymentconfig, files, parameters
* Fix: mark as binary
* Fix: show format in docs
* Fix: use .swaggo
* Fix: swagger notice
* Swagger notice
* 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
This commit introduces three new scripts:
- `release.sh` To be run by a user on their local machine to preview and
create a new release (tag + push)
- `check_commit_metadata.sh` For e.g. detecting breaking changes
- `genereate_release_notes.sh` To display the generated release notes,
used for previews and in `publish_release.sh`
The `release.sh` script can be run without arguments, and it will
automatically determine if we're to do a patch or minor release. A minor
release can be forced via `--minor` flag.
Breaking changes can be annotated either via commit/merge title prefix
(`feat!:`, `feat(api)!:`), or by adding the `release/breaking` label to
the PR that was merged (on GitHub).
Related #5233
The path.nsh script in the NSIS installer provided methods for adding
paths to the PATH and removing them. It would do this by reading the
current PATH value from the registry, adding the new value (if it
doesn't exist) and then writing it to the registry.
Unfortunately, it would read from the user's PATH and write the updated
result to the system PATH, which would remove important PATH entries
like the following in the process:
- C:\Windows\System32
- C:\Windows
- C:\Windows\System32\wbem
- C:\Windows\System32\WindowsPowerShell\v1.0
- C:\Windows\System32\OpenSSH
- C:\Program Files\NVIDIA Corporation\NVIDIA NvDLISR
- C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common
and would copy all user environment variables in their place. The
variables listed above were the ones missing from my machine when I
compared with a friend's machine.
Recommended course of action for affected users:
1. Add the paths listed above to your system PATH if they aren't there
already and exist on your system.
2. Remove any paths that are in your user's PATH from your system PATH.
The existing installers for the last couple of versions of Coder have
been yanked from GitHub releases and this message will be included in
the release notes for the next patch.
Thanks to @cmor for finding and reporting this bug in #5240.
The pid tracking refactor resulted in the pipe while echo to block the
script from continuing and showing the banner at the end. This change
redirects the stdout for the `start_cmd` to a new fd which `while` is
reading from.
* Use new `/healthz` endpoint for checking API liveness
* Improved credential handling/retrying in failure scenarios
* Separate site (`vite`) logs with prefix and date, additionally this
method also disables the `vite` clearing of the screen
* Show all interfaces coder API is listening on (due to `0.0.0.0`)
* Improved shutdown procedure / interrupt handling
* added test for stopping a workspace build
* formatted sfriendly string; added tests
* logging unmarshal error in auditLogDescription
* prettier
* got rid of extra workspace word
* PR feedback
* fixed mistake; wrote tests in penance
* fix be
* feat: Add tunnel by default
If an access URL is not specified, we will always tunnel.
This is from community-member feedback who exclaimed that
it's confusing having the default for `coder server` display
a warning message, and I agree.
There is very little (maybe none) in running `coder server`
without tunnel and without an access URL, so this seems like
overall a much better UX.
* Update install.sh
Co-authored-by: Ben Potter <ben@coder.com>
* Update docs/install/packages.md
Co-authored-by: Ben Potter <ben@coder.com>
* Fix reset pass test
* Fix e2e test
Co-authored-by: Ben Potter <ben@coder.com>
* chore: build, sign and notarize darwin binaries on linux
* chore: download rcodesign during release
* chore: change nfpm install to be a download instead of compile
* chore: delete apple cert secrets after build
* fix: fix dependencies in archive.sh and build_go.sh
* chore: reduce output from rcodesign
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.
* chore: Add nix shell for simple development setup
This enables contributors using Nix to set up their environment with ease.
* improve nix style, flake output schema
* fix error message
* Update scripts/build_go_slim.sh
Co-authored-by: Mathias Fredriksson <mafredri@gmail.com>
* Update scripts/build_go_slim.sh
Co-authored-by: Mathias Fredriksson <mafredri@gmail.com>
* Add UTC default for timezone and remove unnecessary goreleaser dependency
* Skip TZ test if localtime does not exist
Co-authored-by: Charlie Moog <moogcharlie@gmail.com>
Co-authored-by: Mathias Fredriksson <mafredri@gmail.com>
* fix: don't use adduser and addgroup for docker images
* Revert "fix: Remove alternative image architectures until we virtualize (#3336)"
This reverts commit 00c5116a2e.
* chore: Remove line numbers from auto-gen typescript
The line numbers are just extra noise that change when things shift
around. They are not required and usually make CI fail when you
forget to run 'make gen'.
* fix: update agent ID in example templates
* fix: update agent ID in dogfood template
* chore: update default agent ID in documentation
* fix: develop.sh: start FE after template is created; leave template dir around if template creation fails
* fix: Remove use of `require` in `require.Eventually` in tests
Because require uses `t.FailNow()` and `require.Eventually` runs the
function in a goroutine, which is not allowed.
* feat: Add ruleguard for require.Eventually
Co-authored-by: Cian Johnston <cian@coder.com>
- Adds distinct exit statuses to the bootstrap scripts
- Makes the bootstrap scripts loop forever trying to download the coder agent
- Surfaces and logs the status codes returned by the download tool
* 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
This commit makes the following changes:
- Adds two variables docker_host and docker_arch to the example docker-code-server template
- Adds an example params.yaml to docker-code-server and updates the README.md to reference these parameters
- scripts/develop.sh will now attempt to create a template using docker-code-server with the appropriate parameters for the environment
- Updated Lima example to make use of the template parameters for docker-code-server
Additional drive-bys:
- webpack.dev.ts references CODER_HOST and not CODERV2_HOST; updated develop.sh accordingly
- develop.sh should now terminate child processes upon error.
* fix: Use WebSockets to stream workspace build logs
This was using a streaming HTTP request before, which didn't work
on my version of Chrome. This method seemed less reliable and standard
than a WebSocket, so figured switching would be best.
* Update site/src/xServices/workspaceBuild/workspaceBuildXService.ts
Co-authored-by: Abhineet Jain <AbhineetJain@users.noreply.github.com>
* Update site/src/pages/WorkspaceBuildPage/WorkspaceBuildPage.test.tsx
Co-authored-by: Abhineet Jain <AbhineetJain@users.noreply.github.com>
* Update site/src/api/api.ts
Co-authored-by: Abhineet Jain <AbhineetJain@users.noreply.github.com>
* Remove unused prop
Co-authored-by: Abhineet Jain <AbhineetJain@users.noreply.github.com>
- 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
* Revert "chore: ignore artifacts dir (#2132)"
This reverts commit 27acb98571.
* Revert "chore: split release workflow so the majority happens on Linux (#2092)"
This reverts commit b87096b500.
* chore: Add linting rule to help catch InTx misuse
This isn't perfect, as if you nest your misuse in another code block
like an if statement, it won't catch it :/. It is better
than nothing
* Make column renderer use the same type as its key
That way the renderer only takes `string` for example when rendering the
name field instead of `string | number` when the interface has some
fields that are strings and some fields are numbers.
This will be necessary when switching to generated types since some of
the fields are numbers (like the owner count on a template).
* Switch fully to generated types
In some places the organization ID is part of the URL but not part of
the request so I separated out the ID into a separate argument in the
relevant API functions.
Otherwise this was a straightforward replacement where I mostly only
needed to change some of the interface names (User instead of
UserResponse for example) and add a few missing but required properties.
I kind of winged the template form; I am not sure what the difference
between a template and template version is or why the latter comes
before the former so the form just returns all the data required to
create both.
* Delete handwritten types
Except for UserAgent which seems to be purely frontend and
ReconnectingPTYRequest which is not in codersdk so I am just leaving it
for now.
* Remove implemented omitempty as a future idea
This was implemented in 2d3dc436a8.
* Add missing optionalities to generated request interfaces
* 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 brings an initial E2E test (really, an integration test - it's only running the server locally, as opposed to against a deployment - but it'd be easy to point playwright to a deployment).
Demo gif:
![test2](https://user-images.githubusercontent.com/88213859/156078517-6cb4ef84-337b-4e16-a8bc-aea7d06dcbcb.gif)
This test exercises a minimal flow for login:
- Run the `coderd` binary to start a server on 3000
- Create an initial user as part of setup
- Go through the login flow and verify we land on the projects page
It will be useful to have to ensure that #360 doesn't introduce a regression in the login flow
Future E2E tests that would be useful:
- Create a project & verify it shows in the UI
- Create a workspace and verify it shows in the UI
* ci: Replace DataDog CI with custom upload script
This will reduce CI time by ~6 minutes across all of
our runners. It's a bit janky, but I believe worth
the slight maintainance burden.
* Fix test race when job would complete too early
* Fix job cancelation override
* Fix race where provisioner job is inserted before project version
* feat: Create provisioner abstraction
Creates a provisioner abstraction that takes prior art from the Terraform plugin system. It's safe to assume this code will change a lot when it becomes integrated with provisionerd.
Closes#10.
* Ignore generated files in diff view
* Check for unstaged file changes
* Install protoc-gen-go
* Use proper drpc plugin version
* Fix serve closed pipe
* Install sqlc with curl for speed
* Fix install command
* Format CI action
* Add linguist-generated and closed pipe test
* Cleanup code from comments
* Add dRPC comment
* Add Terraform installer for cross-platform
* Build provisioner tests on Linux only