You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
A failure after the commit is reported as a failed write #60
Found in a code review of #57, #58 and #59. It predates them.
Problem
In createRecording, CreateNewJob, RerunJob and RegisterPreParamList, the work after conn.commitTransaction runs inside the same try as the inserts: refreshing the tables (fillRecordingTable, fillJobTable, fillParams, ...), the success uiconfirm, and resetting the form. If any of it throws, the catch treats the write as failed:
it reports a failure to Slack (Recording registration, Job creation, Job rerun)
it shows "Recording was not created" / "Job was not created" / "Rerun of job failed" / "Preprocess Steps was not created"
it re-enables the button
But the rows are already committed. For createRecording the files were also already moved to cup, so an operator who retries tries to register the same recording again.
Fix
Track whether the commit happened. If something fails after it, say that the write succeeded and only refreshing the GUI failed, don't report a failed write to Slack, and don't re-enable the button for a retry.
Activity
fix: don't report a write as failed when only the GUI update after th…