Page MenuHomePhabricator

Avoid possible HarbormasterBuildCommand leaks during job restarts
AbandonedPublic

Authored by epriestley on Mar 16 2021, 11:48 AM.
Tags
None
Referenced Files
F14090844: D21622.id51468.diff
Sun, Nov 24, 8:45 PM
Unknown Object (File)
Mon, Nov 18, 3:58 AM
Unknown Object (File)
Mon, Nov 4, 2:24 PM
Unknown Object (File)
Sun, Oct 27, 12:12 PM
Unknown Object (File)
Oct 12 2024, 8:39 PM
Unknown Object (File)
Oct 8 2024, 6:29 PM
Unknown Object (File)
Sep 15 2024, 11:03 AM
Unknown Object (File)
Sep 6 2024, 8:50 AM
Subscribers
Restricted Owners Package

Details

Reviewers
artms
Group Reviewers
Blessed Reviewers
Summary

HarbormasterBuildCommand might not yet be committed when HarbormasterBuildWorker is actually executed. When command is "leaked" - Harbormaster job gets into the start of "restarting" which can only be solved by submitting new changes into Revision.

Test Plan

Deploy change, try restarting harbormaster job and it should succeed

Diff Detail

Repository
rP Phabricator
Branch
master
Lint
Lint Passed
Unit
Tests Skipped
Build Status
Buildable 25276
Build 34888: Run Core Tests
Build 34887: arc lint + arc unit

Event Timeline

Owners added a subscriber: Restricted Owners Package.Mar 16 2021, 11:48 AM
src/applications/harbormaster/editor/HarbormasterBuildTransactionEditor.php
109

Leaking of commands and "no longer" restartable test job can be reproduced by adding sleep here.

sleep(30);

And after you restart job you'll see that HarbormasterBuildWorker is created in worker_activetask but build command is not created in harbomaster_buildcommand table. This causes HarbormasterBuildWorker to bail out quite soon (no command to execute) and once transaction is fully commited - build command is created which essentially locks build in 'restarting' phase which can only be fixed by adding new diff to revision

epriestley abandoned this revision.
epriestley edited reviewers, added: artms; removed: epriestley.

Please report this issue via Discourse, or, if applicable, your organization's support channel, rather than sending a patch.

This patch isn't the right way to approach this issue, and a clear bug report with clear reproduction steps would be far more useful.