Page MenuHomePhabricator

Crash when viewing a build, whose build plan has had steps deleted
Closed, ResolvedPublic


We get:

Argument 1 passed to HarbormasterBuildTarget::attachBuildStep() must be an instance of HarbormasterBuildStep, null given, called in /srv/phabricator/phabricator/src/applications/harbormaster/query/HarbormasterBuildTargetQuery.php on line 93 and defined

when viewing a build whose build plan has had steps deleted. I'm not sure what the best course of action is here; maybe just displaying a message that says "This build has steps that have been deleted" or something of that nature and omitting any targets that are missing?

Event Timeline

hach-que raised the priority of this task from to Needs Triage.
hach-que updated the task description. (Show Details)
hach-que added a project: Harbormaster.
hach-que added subscribers: hach-que, epriestley.

I haven't looked at how hard this is specifically, but my general preference is:

  • show the targets with a message ("this target's step has been deleted")
  • hide/deactivate any functionality which takes a bunch of work to show/activate

If that's a pain, and showing "this build has steps which have been deleted" and just hiding the targets is a decent bit easier, that's totally fine too.

Yeah, I think the HarbormasterBuildTargetQuery should maybe attach a null value in this case when the step doesn't exist? Then any logic using the step can just skip over it.