- Notifications
You must be signed in to change notification settings - Fork1.1k
fix(coderd/database): add missing columns to tasks with status#20311
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
b3e76aa tob8c1478Compareb20e649 to466baebCompare466baeb to464e080CompareThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Pull Request Overview
This pull request adds missing columns to the Task API structure to expose workspace build number, workspace agent ID, and workspace app ID from the tasks_with_status database view. The changes ensure these previously unavailable fields are included in task queries and properly exposed through the API.
- Adds
WorkspaceBuildNumberandWorkspaceAppIDfields to the Task struct across Go types and TypeScript interfaces - Updates database queries and models to include the new columns from the tasks_with_status view
- Enhances test coverage to verify the new fields are properly populated and validated
Reviewed Changes
Copilot reviewed 15 out of 15 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
site/src/testHelpers/entities.ts | Adds mock values for workspace_build_number and workspace_app_id fields |
site/src/api/typesGenerated.ts | Updates TypeScript Task interface to include the new optional fields |
docs/reference/api/schemas.md | Documents the new workspace_build_number and workspace_app_id fields in API schema |
codersdk/aitasks.go | Adds WorkspaceBuildNumber and WorkspaceAppID fields to Go Task struct |
coderd/database/sqlc.yaml | Adds type override for workspace_build_number to handle nullable int32 |
coderd/database/queries.sql.go | Updates generated SQL queries to select and scan the new columns |
coderd/database/querier_test.go | Expands test cases to validate the new fields are properly set |
coderd/database/models.go | Updates database Task model to include the new columns |
coderd/database/migrations/*.sql | Creates and manages database view changes to expose the new columns |
coderd/database/dump.sql | Updates database schema dump with new view columns |
coderd/apidoc/* | Updates API documentation to include the new fields |
coderd/aitasks.go | Populates new fields in taskFromWorkspace function |
cli/exp_task_status_test.go | Updates test output to include workspace_app_id field |
Tip: Customize your code reviews with copilot-instructions.md.Create the file orlearn how to get started.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Unfortunate that sqlc trips up
82945cf intomainUh oh!
There was an error while loading.Please reload this page.
Updatescoder/internal#976