Document Pubsub usage
BUG=chromium:1113286
TEST=generate
Change-Id: Idae748570440802f55060c13e3806d7f21c1aa3c
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/infra/proto/+/2340509
Tested-by: Jacob Kopczynski <jkop@chromium.org>
Reviewed-by: Xinan Lin <linxinan@chromium.org>
Commit-Queue: Jacob Kopczynski <jkop@chromium.org>
Auto-Submit: Jacob Kopczynski <jkop@chromium.org>
diff --git a/go/test_platform/config/config.pb.go b/go/test_platform/config/config.pb.go
index 4ce6668..b3e66f9 100644
--- a/go/test_platform/config/config.pb.go
+++ b/go/test_platform/config/config.pb.go
@@ -29,8 +29,8 @@
Versioning *Config_Versioning `protobuf:"bytes,7,opt,name=versioning,proto3" json:"versioning,omitempty"`
TestRunner *Config_TestRunner `protobuf:"bytes,8,opt,name=test_runner,json=testRunner,proto3" json:"test_runner,omitempty"`
TestRunnerMigration *test_runner.Config `protobuf:"bytes,9,opt,name=test_runner_migration,json=testRunnerMigration,proto3" json:"test_runner_migration,omitempty"`
- // The PubSub topic, to which CTP sends build ID when the build starts
- // and ends.
+ // Result flow topic: CTP publishes a message with build ID, once
+ // at build start and again at build end
Pubsub *Config_PubSub `protobuf:"bytes,10,opt,name=pubsub,proto3" json:"pubsub,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
@@ -455,7 +455,7 @@
// recipe.
type Config_TestRunner struct {
Buildbucket *Config_Buildbucket `protobuf:"bytes,1,opt,name=buildbucket,proto3" json:"buildbucket,omitempty"`
- // The PubSub topic to which Buildbucket sends the update of test runner build.
+ // Result flow topic: Publish a message for each build status update
Pubsub *Config_PubSub `protobuf:"bytes,2,opt,name=pubsub,proto3" json:"pubsub,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
diff --git a/go/test_platform/request.pb.go b/go/test_platform/request.pb.go
index c873ced..14c2727 100644
--- a/go/test_platform/request.pb.go
+++ b/go/test_platform/request.pb.go
@@ -881,7 +881,13 @@
// Notification defines parameters for the request to use to notify callers
// of its test's status updates.
type Request_Params_Notification struct {
- // Pubsub topic to broadcast status updates to
+ // TODO(crbug.com/1113875): Swarming only allows 1 pubsub topic. We
+ // should create a common pubsub topic for all subscribers and replace
+ // this field with a map<string, string> that allows users to attach
+ // arbitrary attributes to the pubsub message.
+ // This will require API support from Swarming and/or BuildBucket.
+ //
+ // Pubsub topic to broadcast status updates to, for external listeners
PubsubTopic string `protobuf:"bytes,1,opt,name=pubsub_topic,json=pubsubTopic,proto3" json:"pubsub_topic,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
diff --git a/src/test_platform/config/config.proto b/src/test_platform/config/config.proto
index 6ae8885..a0fc90f 100644
--- a/src/test_platform/config/config.proto
+++ b/src/test_platform/config/config.proto
@@ -72,7 +72,7 @@
// recipe.
message TestRunner {
Buildbucket buildbucket = 1;
- // The PubSub topic to which Buildbucket sends the update of test runner build.
+ // Result flow topic: Publish a message for each build status update
PubSub pubsub = 2;
}
@@ -88,7 +88,7 @@
test_platform.migration.test_runner.Config test_runner_migration = 9;
- // The PubSub topic, to which CTP sends build ID when the build starts
- // and ends.
+ // Result flow topic: CTP publishes a message with build ID, once
+ // at build start and again at build end
PubSub pubsub = 10;
}
diff --git a/src/test_platform/request.proto b/src/test_platform/request.proto
index 33b47f1..5883b37 100644
--- a/src/test_platform/request.proto
+++ b/src/test_platform/request.proto
@@ -202,7 +202,13 @@
// Notification defines parameters for the request to use to notify callers
// of its test's status updates.
message Notification {
- // Pubsub topic to broadcast status updates to
+ // TODO(crbug.com/1113875): Swarming only allows 1 pubsub topic. We
+ // should create a common pubsub topic for all subscribers and replace
+ // this field with a map<string, string> that allows users to attach
+ // arbitrary attributes to the pubsub message.
+ // This will require API support from Swarming and/or BuildBucket.
+ //
+ // Pubsub topic to broadcast status updates to, for external listeners
string pubsub_topic = 1;
}