* fix: Change uses of t.Cleanup -> defer in test bodies
Mixing t.Cleanup and defer can lead to unexpected order of execution.
* fix: Ensure t.Cleanup is not aborted by require
* chore: Add helper annotations
* 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>
* set a failed canceled job status correctly
resolves#1374
* added unit test for convertProvisionerJob
* Update coderd/provisionerjobs_internal_test.go
Co-authored-by: Cian Johnston <cian@coder.com>
* PR feedback
Co-authored-by: Cian Johnston <cian@coder.com>
Two coderd unit tests (TestPatchCancelTemplateVersion/Success and TestPatchCancelWorkspaceBuild) implied erroneously that the job was canceled successfully.
This is not the case, as these unit tests do not include a Provision_Complete response in the input to the
echo provisioner. Now explicitly checking the job error and bumping the force cancel interval to be longer.
Fixes#3083.
* return parameters from Terraform provisioner in sorted order
* persist parameter indices in database and return them in correct order from API
* don't re-sort parameters by name when creating templates
* feat: Handle pagination cases where after_id does not exist
Throw an error to the user in these cases
- Templateversions
- Workspacebuilds
User pagination does not need it as suspended users still
have rows in the database
* feat: Expose the values contained in an HCL validation string to the API
This allows the frontend to render inputs displaying these values!
* Update codersdk/parameters.go
Co-authored-by: Cian Johnston <cian@coder.com>
* Call a spade a space
* Fix linting errors with type conversion
Co-authored-by: Cian Johnston <cian@coder.com>
This enables a "kubernetes_pod" to attach multiple agents that
could be for multiple services. Each agent is required to have
a unique name, so SSH syntax is:
`coder ssh <workspace>.<agent>`
A resource can have zero agents too, they aren't required.
Customer feedback indicated projects was a confusing name.
After querying the team internally, it seemed unanimous
that it is indeed a confusing name.
Here's for a lil less confusion @ashmeer7 🥂