Page MenuHomePhabricator

Allow external systems to send messages to build targets
ClosedPublic

Authored by epriestley on Mar 23 2014, 9:03 PM.
Tags
None
Referenced Files
F13051468: D8604.id20434.diff
Fri, Apr 19, 3:32 AM
F13051467: D8604.id20394.diff
Fri, Apr 19, 3:32 AM
F13051466: D8604.id.diff
Fri, Apr 19, 3:32 AM
Unknown Object (File)
Thu, Apr 11, 4:44 AM
Unknown Object (File)
Mon, Apr 8, 9:37 AM
Unknown Object (File)
Tue, Apr 2, 8:31 PM
Unknown Object (File)
Tue, Apr 2, 2:19 AM
Unknown Object (File)
Fri, Mar 29, 1:18 AM
Subscribers

Details

Summary

Ref T1049. Allows external systems to send a message to a build target. The primary intended use case is:

  • You make an HTTP request to Jenkins.
  • The build goes into a "waiting" state.
  • Later, Jenkins calls harbormaster.sendmessage to report that the target passed or failed.
  • The build continues as appropriate.

This is deceptively complicated because:

  • There are a lot of race concerns. We might get a message back from an external system before it even responds to the request we made. We want to make sure we process these messages no matter when we receive them.
  • These messages need to be sent to a build target (vs a build or buildable) because we'll get into trouble with parallelization later on otherwise (Jenkins is told to do 3 builds; we can't tell which ones failed or what overall state is unless the message are sent to targets).
  • I initially thought about implementing this as a separate "Wait for a response from an external system" build step. This gets a lot more complicated for users once we do parallelization, though. Particularly, in the case where you've told Jenkins to do 3 builds, the three "wait" steps need to know which target they're waiting for (and jenkins needs to know some unique identifier for each target). So this pretty much boils down to a more complicated, more error-prone version of using target PHIDs.

This makes the already-muddy Build UI a bit worse, but it needs a general clarity pass anyway (it's showing way too much uninteresting data, and should show a better summary of results instead).

Test Plan
  • This doesn't really do anything interesting yet.
  • Used Conduit to send messages to build plans.
  • Viewed the messages on the build screen.

Diff Detail

Repository
rP Phabricator
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

epriestley retitled this revision from to Allow external systems to send messages to build targets.
epriestley updated this object.
epriestley edited the test plan for this revision. (Show Details)
epriestley added a reviewer: btrahan.
btrahan edited edge metadata.
This revision is now accepted and ready to land.Mar 25 2014, 8:51 PM
epriestley updated this revision to Diff 20434.

Closed by commit rPd6b937ca2796 (authored by @epriestley).