Repository navigation
Cloud dashboards: clean up merged control-plane logging - #9944
Conversation
queueProvision moved the row to failed but sent no nudge, so other members' sidebars kept the workspace in provisioning until some other change. The provision job and the wake path already nudge after they fail a row; queueProvision has the organization id since #9936. Co-Authored-By: Claude <noreply@anthropic.com>
provision and queueProvision each wrote the same block: move the row to failed, nudge, write workspace.failed, capture the error if the row moved. That block now lives once in transition.ts. Same from, to and set; every caller keeps its console.error line word for word. No behaviour change. markSandboxUnavailable in wake.ts is the third copy; it moves to this function after #9930, which edits wake.ts, merges. Co-Authored-By: Claude <noreply@anthropic.com>
failCloudWorkspace wrote workspace.failed at error level even when the transition matched no row, so the log claimed a failure another write had already recorded (or a delete had overtaken). It now writes the record, and captures, only when this call moved the row to failed, and the status.changed attribute is gone because the event now means it. control-log.test.ts tested that logControl calls Sentry.logger; the provision tests check the whole record, so it is removed. provision.test gains the case where the row did not move. Co-Authored-By: Claude <noreply@anthropic.com>
… db enum - renew-chatgpt-sign-ins builds its capture tags with controlTags, like the cloud workspace routes, instead of by hand. - BOX_GB_MINUTES_FEATURE_ID and ACTIVE_CPU_MINUTES_FEATURE_ID satisfy the cloud_usage_feature enum from 0196, so a rename on either side fails typecheck instead of writing rows Autumn does not know. No billing call changes. Co-Authored-By: Claude <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
🧹 Preview Cleanup CompleteThe following preview resources have been cleaned up:
Thank you for your contribution! 🎉 |
|
Preview update published for development build |
What and why
A review of the control-plane logging (#9927, #9936) and schema 0196 (#9933) that are already on main. There are four commits:
queueProvisionmoved the row tofailedbut sent no nudge, so other members' sidebars kept the workspace inprovisioning. Includes a regression test (start.test.ts).failCloudWorkspacenext totransitionCloudWorkspace(no behaviour change). One function replaces the "mark failed → nudge → workspace.failed → capture if moved" block inprovision.tsandstart.ts. Same from/to/set, and everyconsole.errorline stays word for word.workspace.failedonly when the row moved. Before, it was written at error level even when the transition matched no row. Thestatus.changedattribute is removed, and so islib/control-log.test.ts, which tested the logger and not behaviour.renew-chatgpt-sign-insusescontrolTags, and the Autumn feature idssatisfies CloudUsageFeature.The PR does not change
meter.ts,wake.tsorlib/sandbox/vercel.ts, because #9930 edits them. Findings for those files are on the evidence page. No billing call changes, and no status write changes: the one write that moves keeps the same from/to/set. verify-sandbox-asleep passes, with the expected state count.Size: 8 files. Code is +66/−46 and tests +77/−62. The helper saves lines only when
wake.ts'smarkSandboxUnavailableuses it too, after #9930.What breaks and for whom
No client API change. In Sentry Logs,
workspace.failedrecords from the provision and queue sites no longer carrystatus.changed, and they are no longer written when the row did not move. A saved search that filters onstatus.changed:truemust drop that filter. Details are on the evidence page.Links
🤖 Generated with Claude Code
Summary by cubic
Cleans up the control-plane logging merged from #9927, #9936, and #9933, and fixes a missing nudge when a provision cannot be queued.
queueProvisionnow nudges the organization's clients after marking the row failed, so other members' sidebars no longer keep the workspace inprovisioning; covered by a new regression test instart.test.ts.failCloudWorkspaceintotransition.tsto replace the repeated mark-failed → nudge → log → capture block inprovision.tsandstart.ts.workspace.failedis now written only when this call actually moved the row; thestatus.changedattribute is dropped, andcontrol-log.test.tsis removed since the provision tests now check the whole record.renew-chatgpt-sign-insbuilds its capture tags withcontrolTags, and the Autumn feature ids are typed against thecloud_usage_featureenum.Impact
No client API change.
workspace.failedrecords from the provision and queue sites no longer carrystatus.changedand are not written when the row did not move; saved searches filtering onstatus.changed:truemust drop that filter. No billing call changes and no status-write changes.Written for commit 522fcde. Summary will update on new commits.
Summary by CodeRabbit