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
Unknown Object (File)
Wed, Dec 25, 1:39 AM
Unknown Object (File)
Sun, Dec 22, 4:34 PM
Unknown Object (File)
Tue, Dec 17, 1:45 PM
Unknown Object (File)
Tue, Dec 17, 6:53 AM
Unknown Object (File)
Thu, Dec 12, 7:45 AM
Unknown Object (File)
Fri, Dec 6, 9:59 AM
Unknown Object (File)
Fri, Dec 6, 5:54 AM
Unknown Object (File)
Sun, Dec 1, 1:02 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).