- Notifications
You must be signed in to change notification settings - Fork928
feat: add agent timings#14713
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
feat: add agent timings#14713
Uh oh!
There was an error while loading.Please reload this page.
Conversation
3d5cf74
to41e8085
CompareThere 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.
Excellent work!
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Not sure how this came to be, I do not recall manually changingthese files.
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.
Nice job piping this through! And sorry for the amount of comments. 😅
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
enum Stage { | ||
START = 0; | ||
STOP = 1; | ||
CRON = 2; |
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.
I feel there's a slight mismatch in naming here as I have trouble fittingcron understage, but I also don't have a better suggestion 😅, just an observation.
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.
Yeah it does feel a little strange. Couldn't think of a better way of handling this though.
'cron' | ||
); | ||
CREATE TABLE workspace_agent_script_timings |
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.
I think calling this timings could work but I feel it's primarily aexec_status
orexec_result
table, it contains timing information which feels like more of a side-effect.
Renaming it would give us more flexibility to store more data in it if needed.
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.
Renaming a table isn't too difficult; we could do this as a follow-up if needed?
coderd/database/migrations/testdata/fixtures/000256_workspace_agent_script_timings.up.sql OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
coderd/database/migrations/000256_workspace_agent_script_timings.up.sql OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
DROP TYPE IF EXISTS workspace_agent_script_timing_status CASCADE; | ||
DROP TYPE IF EXISTS workspace_agent_script_timing_stage CASCADE; |
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.
note:DROP TYPE ... CASCADE
is already done for000246_provisioner_job_timings
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.
I don't have any further blocking comments.
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.
Looking great, thanks for your hard work on this PR!
Uh oh!
There was an error while loading.Please reload this page.
coderd/database/migrations/000257_workspace_agent_script_timings.up.sql OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
coderd/database/migrations/000257_workspace_agent_script_timings.up.sql OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
ae522c5
intomainUh oh!
There was an error while loading.Please reload this page.
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.
Post-merge approval, excellent work! ✅
Uh oh!
There was an error while loading.Please reload this page.
Closes#14630
Adds timing information for workspace agent scripts.
This change adds:
display_name
,id
columns toworkspace_agent_scripts
tableworkspace_agent_script_timings
tableDemo
Extend the default docker template with the following scripts.
Create a workspace, start it, then stop it. This then gives us the following data in our database.
coder=# select * from workspace_agent_script_timings;