Repository navigation
feat(coderd/telemetry): add telemetry for database Tasks - #20279
Merged
Merged
Conversation
johnstcn
force-pushed
the
cj/gh-coder-internal-981
branch
from
October 13, 2025 17:01
5eefbd7 to
7b7d778
Compare
johnstcn
changed the base branch from
main
to
cj/gh-coder-internal-981-list-tasks
October 13, 2025 17:01
johnstcn
force-pushed
the
cj/gh-coder-internal-981
branch
from
October 13, 2025 17:07
7b7d778 to
0f0801f
Compare
johnstcn
force-pushed
the
cj/gh-coder-internal-981-list-tasks
branch
from
October 13, 2025 17:11
ee92a76 to
e901f8d
Compare
johnstcn
force-pushed
the
cj/gh-coder-internal-981
branch
2 times, most recently
from
October 13, 2025 17:19
d15c472 to
55e34c6
Compare
johnstcn
force-pushed
the
cj/gh-coder-internal-981-list-tasks
branch
from
October 13, 2025 20:00
e901f8d to
7b6e819
Compare
johnstcn
force-pushed
the
cj/gh-coder-internal-981
branch
from
October 13, 2025 20:01
55e34c6 to
777681a
Compare
johnstcn
force-pushed
the
cj/gh-coder-internal-981-list-tasks
branch
from
October 14, 2025 11:14
7b6e819 to
4c1b0b2
Compare
johnstcn
force-pushed
the
cj/gh-coder-internal-981
branch
from
October 14, 2025 11:17
d87670a to
9cc8e53
Compare
johnstcn
force-pushed
the
cj/gh-coder-internal-981
branch
5 times, most recently
from
October 15, 2025 17:13
4e74abd to
ebe0908
Compare
johnstcn
force-pushed
the
cj/gh-coder-internal-981
branch
from
October 15, 2025 17:46
ebe0908 to
213da47
Compare
johnstcn
commented
Oct 15, 2025
Comment on lines
1564
to
+1589
| @@ -1581,7 +1581,12 @@ func Task(t testing.TB, db database.Store, orig database.TaskTable) database.Tas | |||
| }) | |||
| require.NoError(t, err, "failed to insert task") | |||
|
|
|||
| return task | |||
| // Return the Task from the view instead of the TaskTable | |||
| fetched, err := db.GetTaskByID(genCtx, task.ID) | |||
| require.NoError(t, err, "failed to fetch task") | |||
| require.Equal(t, task.ID, fetched.ID) | |||
|
|
|||
| return fetched | |||
Member
Author
There was a problem hiding this comment.
drive-by: modified this to return the view type instead
johnstcn
commented
Oct 15, 2025
Comment on lines
+1798
to
+1799
| TemplateParametersHash: fmt.Sprintf("%x", sha256.New().Sum(task.TemplateParameters)), | ||
| PromptHash: fmt.Sprintf("%x", sha256.New().Sum([]byte(task.Prompt))), |
Member
Author
There was a problem hiding this comment.
I "defaulted" to sha256 here, but I'm open to other suggestions.
johnstcn
marked this pull request as ready for review
October 15, 2025 18:07
DanielleMaywood
left a comment
Contributor
There was a problem hiding this comment.
LGTM but will defer to Hugo for approval
2 of 3 tasks
mafredri
approved these changes
Oct 16, 2025
mafredri
left a comment
Member
There was a problem hiding this comment.
Except for the sha256, looks good 👍🏻
Co-authored-by: Mathias Fredriksson <[email protected]>
hugodutka
reviewed
Oct 17, 2025
hugodutka
approved these changes
Oct 17, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Relates to coder/internal#981
Stack: