Page MenuHomePhabricator

Avoid possible HarbormasterBuildCommand leaks during job restarts
AbandonedPublic

Authored by epriestley on Mar 16 2021, 11:48 AM.
Tags
None
Referenced Files
Unknown Object (File)
Feb 8 2024, 5:40 PM
Unknown Object (File)
Feb 4 2024, 12:51 AM
Unknown Object (File)
Dec 28 2023, 4:49 PM
Unknown Object (File)
Dec 25 2023, 2:52 AM
Unknown Object (File)
Dec 24 2023, 4:36 PM
Unknown Object (File)
Dec 21 2023, 10:00 PM
Unknown Object (File)
Nov 26 2023, 12:26 AM
Unknown Object (File)
Nov 25 2023, 9:04 PM
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.