blob: 4d8b1cbc521b8b7ded9418138613021d7e1bc2cf [file] [log] [blame] [edit]
syntax = "proto3";
package autoroll.config;
option go_package = "go.skia.org/infra/autoroll/go/config";
// Config provides configuration for one AutoRoller.
message Config {
// roller_name is the name for this roller. It is used as the unique ID for
// the roller and must be non-empty.
// TODO(borenet): Use an actual DB-generated ID for the roller.
string roller_name = 1;
// child_bug_link is a link to file a bug for the child project.
string child_bug_link = 29;
// child_display_name is the human-readable display name of the child.
string child_display_name = 2;
// parent_bug_link is a link to file a bug for the parent project.
string parent_bug_link = 30;
// parent_display_name is the human-readable display name of the parent.
string parent_display_name = 3;
// parent_waterfall is the URL of the waterfall display of the parent repo.
string parent_waterfall = 4;
// owner_primary is the primary owner of this roller.
string owner_primary = 5;
// owner_secondary is the secondary owner of this roller.
string owner_secondary = 6;
// contacts is a list of email addresses of contacts for this roller, used
// for sending PSAs, asking questions, etc. At least one contact is required.
repeated string contacts = 7;
// service_account is the full email address of the service account for this
// roller.
string service_account = 8;
// is_internal indicates whether this roller is internal, ie. only visible
// to Googlers.
// TODO(borenet): Is this necessary?
bool is_internal = 9;
// reviewer are the email addresses to add as reviewers on rolls, or URL(s)
// from which to obtain those email addresses. At least one reviewer is required.
repeated string reviewer = 10;
// reviewer_backup are backup email addresses to add as reviewers on rolls,
// in case obtaining the email addresses from the URL fails. Only required
// if a URL is specified for the reviewer.
repeated string reviewer_backup = 11;
// roll_cooldown is a period of time after a successful roll attempt during
// which no new roll attempts will be created. Optional. The default is 10m.
string roll_cooldown = 12;
// dry_run_cooldown specifies how long successful dry run CLs will be left
// open before closing in favor of a new roll.
string dry_run_cooldown = 35;
// time_window in which the roller is allowed to upload roll CLs. See the
// go/time_window package for supported format.
string time_window = 13;
// supports_manual_rolls indicates whether this roller supports manual
// rolls.
bool supports_manual_rolls = 14;
// commit_msg provides configuration for the commit message.
CommitMsgConfig commit_msg = 15;
// code_review provides configuration for code review.
oneof code_review {
// gerrit provides configuration for code review using Gerrit.
GerritConfig gerrit = 16;
// github provides configuration for code review using GitHub.
GitHubConfig github = 17;
// google3 provides configuration for code review using Google3.
Google3Config google3 = 18;
}
// kubernetes provides configuration for Kubernetes.
KubernetesConfig kubernetes = 19;
// repo_manager provides configuration for the repo manager.
oneof repo_manager {
ParentChildRepoManagerConfig parent_child_repo_manager = 20;
AndroidRepoManagerConfig android_repo_manager = 21;
CommandRepoManagerConfig command_repo_manager = 22;
FreeTypeRepoManagerConfig freetype_repo_manager = 23;
Google3RepoManagerConfig google3_repo_manager = 25;
}
// notifiers configures any extra notifications used by this roller. Optional.
repeated NotifierConfig notifiers = 26;
// safety_throttle provides configuration for safety-throttling the roller
// in case of persistent errors.
ThrottleConfig safety_throttle = 27;
// transitive_deps is an optional mapping of dependency ID (eg. repo URL)
// to the paths within the parent and child repo, respectively, where
// those dependencies are versioned, eg. "DEPS".
// TODO(borenet): Where is this used? Why isn't it nested within the repo
// manager config?
repeated TransitiveDepConfig transitive_deps = 28;
// use_workload_identity indicates whether the roller uses workload
// identity. See skbug.com/12323
bool use_workload_identity = 31;
// valid_modes lists the valid modes for the roller. If not specified, all
// modes are allowed.
repeated Mode valid_modes = 32;
// max_roll_cq_attempts indicates the maximum number of commit queue
// attempts before abandoning a roll CL. If not set, the default is 3.
int32 max_roll_cq_attempts = 33;
// max_roll_cls_to_same_revision indicates the maximum number of roll CLs to
// the same revision before giving up. If not set, the default is 3.
int32 max_roll_cls_to_same_revision = 34;
}
// CommitMsgConfig provides configuration for commit messages.
message CommitMsgConfig {
// bug_project indicates which project (eg. in Monorail) the bugs attached
// to various revisions are associated with. If provided, any "Bug: " lines
// from revisions in the roll which match the given project name will be
// included in the roll itself.
string bug_project = 1;
// child_log_url_tmpl is a template for building log URLs using the IDs of
// the from- and to-revisions of the child for a given roll.
string child_log_url_tmpl = 2;
// cq_extra_trybots are additional tryjobs to trigger as part of the commit
// queue for every roll.
repeated string cq_extra_trybots = 3;
// cq_do_not_cancel_trybots indicates that the commit queue should not
// cancel tryjobs from old patch sets when a new patch set is uploaded.
bool cq_do_not_cancel_trybots = 4;
// include_log indicates whether the list of revisions contained in the roll
// should be included as part of the commit message.
bool include_log = 5;
// include_revision_count indicates whether the number of revisions
// contained in the roll should be included in the subject line of the
// commit message.
bool include_revision_count = 6;
// include_tbr_line indicates whether the "TBR:" line should be included in
// the commit message. This is required for some commit queues.
bool include_tbr_line = 7;
// include_tests indicates whether the "Test: " lines from the revisions in
// the roll should be propagated through to the roll itself.
bool include_tests = 8;
// extra_footers are any extra footers which should be added to all roll
// commit messages.
repeated string extra_footers = 11;
// word_wrap indicates that the commit message should be limited to the
// given number of characters per line if provided.
int32 word_wrap = 12;
// BuiltIn lists the built-in commit message templates.
enum BuiltIn {
// DEFAULT is the default commit message template.
DEFAULT = 0;
// ANDROID is the commit message template used for Android rollers.
ANDROID = 1;
// ANDROID_NO_CR is the commit message template used for Android rollers
// where the service account does not have CR+2 access.
ANDROID_NO_CR = 2;
// CANARY is the commit message template used for canary rolls.
CANARY = 3;
}
// built_in is the name of a built-in commit message template.
BuiltIn built_in = 9;
// custom is a full custom commit message template string. It is possible to
// specify a built-in template and then override parts of it in the custom
// template.
string custom = 10;
}
// GerritConfig provides configuration for code review using Gerrit.
message GerritConfig {
// url of the Gerrit host.
string url = 1;
// project name for uploaded CLs.
string project = 2;
// Config lists the built-in Gerrit configs, named for the projects which
// use them.
enum Config {
ANDROID = 0;
ANGLE = 1;
CHROMIUM = 2;
CHROMIUM_NO_CQ = 3;
LIBASSISTANT = 4;
CHROMIUM_BOT_COMMIT = 5;
CHROMIUM_BOT_COMMIT_NO_CQ = 6;
ANDROID_NO_CR = 7;
ANDROID_NO_CR_NO_PR = 8;
CHROMIUM_NO_CR = 9;
}
// config indicates the mode of operation used by the Gerrit host, which
// informs the roller of, for example, which labels to set. See the
// autoroll/go/codereview package for possible values.
Config config = 3;
}
// GitHubConfig provides configuration for code review using GitHub.
message GitHubConfig {
// repo_owner is the owner of the GitHub repo.
string repo_owner = 1;
// repo_name is the name of the GitHub repo.
string repo_name = 2;
// checks_wait_for indicates which GitHub checks must succeed before a pull
// request may be merged. If they are failing, we wait for them to succeed
// (eg. tree-status checks). Note: These checks are ignored during dry runs
// because the PR is not going to be submitted so the tree-status checks
// will not be important in that case.
repeated string checks_wait_for = 3;
// token_secret is the name of the secret containing the auth token used to
// access the GitHub API.
string token_secret = 4;
// ssh_key_secret is the name of the secret containing the SSH key used to
// access GitHub repos.
string ssh_key_secret = 5;
}
// Google3Config is an empty configuration object for Google3.
message Google3Config {}
// KubernetesConfig provides Kubernetes configuration for the autoroll backend
// service for this roller.
message KubernetesConfig {
// cpu is the requested number of CPUs, eg. "250m".
string cpu = 1;
// memory is the requested memory, eg. "2Gi".
string memory = 2;
// readiness_failure_threshold indicates how many times the ready check may
// fail.
int32 readiness_failure_threshold = 3;
// readiness_initial_delay_seconds indicates how long to wait before
// performing the ready check for the first time.
int32 readiness_initial_delay_seconds = 4;
// readiness_period_seconds indicates how often to perform the ready check.
int32 readiness_period_seconds = 5;
// disk indicates the size of the requested persistent disk. If not
// specified, no persistent disk is used.
string disk = 6;
// image used for the autoroll backend container.
string image = 8;
// extra_flags to pass to the autoroll-be binary.
repeated string extra_flags = 9;
}
// AndroidRepoManagerConfig provides configuration for a roller which rolls into
// Android.
message AndroidRepoManagerConfig {
// ProjectMetadataFileConfig provides configuration for METADATA files in
// the Android repo.
message ProjectMetadataFileConfig {
// file_path of the project metadata file within the repo.
string file_path = 1;
// name of the project.
string name = 2;
// description of the project.
string description = 3;
// home_page of the project.
string home_page = 4;
// git_url of the project.
string git_url = 5;
// license_type of the project.
string license_type = 6;
}
// child_repo_url is the URL of the child repo.
string child_repo_url = 1;
// child_branch is the Git branch of the child repo to track.
string child_branch = 2;
// child_path is the path to the child repo within the parent.
string child_path = 3;
// parent_repo_url is the URL of the parent repo.
string parent_repo_url = 4;
// parent_branch is the Git branch of the parent repo to track.
string parent_branch = 5;
// child_rev_link_tmpl is a template used to create links to revisions of
// the child repo. If not supplied, no links will be created.
string child_rev_link_tmpl = 6;
// child_subdir indicates the subdirectory of the working directory (not the
// parent repo) in which the child_path should be rooted. In most cases this
// should be empty, but if child_path is relative to the parent repo dir
// (eg. when DEPS specifies use_relative_paths), then this is required.
string child_subdir = 7;
// pre_upload_steps are named steps to run before uploading roll CLs.
repeated PreUploadStep pre_upload_steps = 8;
// metadata about the child project which should be updated in a file
// checked into the parent repo.
ProjectMetadataFileConfig metadata = 9;
// include_authors_as_reviewers determines whether the authors of rolled
// changes should be included as change reviewers.
bool include_authors_as_reviewers = 10;
// pre_upload describes command(s) to run before uploading roll CLs.
PreUploadConfig pre_upload_commands = 11;
// auto_approver_secret indicates that the roller should use the given
// secret containing an auto-approver service account key to approve its own
// changes.
string auto_approver_secret = 12;
// default_bug_project indicates the Monorail project used when no project
// is specified in "Bug: 123" lines in commit messages.
string default_bug_project = 13;
}
// CommandRepoManagerConfig provides configuration for a roller which runs
// specified commands to perform different functions.
message CommandRepoManagerConfig {
message CommandConfig {
// command to run. If this is the command used to update the revision of
// the Child, this should be a text template which uses SetPinnedRevVars
// to get the from- and to-revisions.
repeated string command = 1;
// dir is the relative path within the Git checkout to run the command.
string dir = 2;
// env are environment variables to supply to the command, in KEY=VALUE
// format.
repeated string env = 3;
}
// git_checkout configures the Git checkout of the parent repo.
GitCheckoutConfig git_checkout = 1;
// short_rev_regex is a regular expression used to shorten revision IDs for
// display.
string short_rev_regex = 2;
// get_tip_rev is a command used to obtain the latest revision of the Child.
CommandConfig get_tip_rev = 3;
// get_pinned_rev is a command used to obtain the currently-pinned revision
// of the Child.
CommandConfig get_pinned_rev = 4;
// set_pinned_rev is a command used to update the currently-pinned revision
// of the Child.
CommandConfig set_pinned_rev = 5;
}
// FreeTypeRepoManagerConfig provides configuration for the FreeType roller.
message FreeTypeRepoManagerConfig {
FreeTypeParentConfig parent = 1;
GitilesChildConfig child = 2;
}
// Google3RepoManagerConfig provides configuration for a roller into Google3.
message Google3RepoManagerConfig {
// child_branch is the branch of the child repo to track.
string child_branch = 1;
// child_repo is the URL of the child repo.
string child_repo = 2;
}
// ParentChildRepoManagerConfig provides configuration for a roller which
// combines a pre-defined Parent and Child type.
message ParentChildRepoManagerConfig {
// parent is the entity which depends on the child and receives the rolls.
oneof parent {
CopyParentConfig copy_parent = 1;
DEPSLocalGitHubParentConfig deps_local_github_parent = 2;
DEPSLocalGerritParentConfig deps_local_gerrit_parent = 3;
GitCheckoutGitHubFileParentConfig git_checkout_github_file_parent = 4;
GitilesParentConfig gitiles_parent = 5;
GoModGerritParentConfig go_mod_gerrit_parent = 14;
GitCheckoutGerritParentConfig git_checkout_gerrit_parent = 17;
}
// child is the entity which is depended on by the parent and is rolled.
oneof child {
CIPDChildConfig cipd_child = 6;
FuchsiaSDKChildConfig fuchsia_sdk_child = 7;
GitCheckoutChildConfig git_checkout_child = 8;
GitCheckoutGitHubChildConfig git_checkout_github_child = 9;
GitilesChildConfig gitiles_child = 10;
SemVerGCSChildConfig semver_gcs_child = 11;
DockerChildConfig docker_child = 16;
}
// revision_filter filters out revisions of the child which should not be
// considered as roll candidates.
repeated BuildbucketRevisionFilterConfig buildbucket_revision_filter = 12;
repeated CIPDRevisionFilterConfig cipd_revision_filter = 13;
repeated ValidHttpRevisionFilterConfig valid_http_revision_filter = 15;
}
// CopyParentConfig provides configuration for a Parent which copies the Child
// into itself. It uses Gitiles and Gerrit instead of a local checkout.
message CopyParentConfig {
message CopyEntry {
// src_rel_path is the relative path within the Child.
string src_rel_path = 1;
// dst_rel_path is the relative path within the Parent.
string dst_rel_path = 2;
}
GitilesParentConfig gitiles = 1;
repeated CopyEntry copies = 2;
}
// DEPSLocalGitHubParentConfig provides configuration for a Parent which uses a
// local Git checkout with DEPS and uploads pull requests to GitHub.
message DEPSLocalGitHubParentConfig {
DEPSLocalParentConfig deps_local = 1;
GitHubConfig github = 2;
string fork_repo_url = 3;
}
// DEPSLocalGerritParentConfig provides configuration for a Parent which uses a
// local Git checkout with DEPS and uploads CLs to Gerrit.
message DEPSLocalGerritParentConfig {
DEPSLocalParentConfig deps_local = 1;
GerritConfig gerrit = 2;
}
// GitCheckoutGitHubParentConfig provides configuration for a Parent which
// uses a local Git checkout and uploads pull requests to GitHub.
// TODO(borenet): Why doesn't this contain the GitHubConfig? Is this even
// needed?
message GitCheckoutGitHubParentConfig {
GitCheckoutParentConfig git_checkout = 1;
string fork_repo_url = 2;
}
// GitCheckoutGerritParentConfig provides configuration for a Parent which
// uses a local Git checkout and uploads CLs to Gerrit.
message GitCheckoutGerritParentConfig {
GitCheckoutParentConfig git_checkout = 1;
// pre_upload describes command(s) to run before uploading roll CLs.
PreUploadConfig pre_upload_commands = 2;
}
// GitCheckoutGitHubFileParentConfig provides configuration for a Parent which
// uses a local Git checkout and uploads pull requests to GitHub.
message GitCheckoutGitHubFileParentConfig {
GitCheckoutGitHubParentConfig git_checkout = 1;
repeated PreUploadStep pre_upload_steps = 2;
// pre_upload describes command(s) to run before uploading roll CLs.
PreUploadConfig pre_upload_commands = 3;
}
// GitilesParentConfig provides configuration for a Parent which uses Gitiles.
message GitilesParentConfig {
GitilesConfig gitiles = 1;
DependencyConfig dep = 2;
GerritConfig gerrit = 3;
}
// GitilesConfig provides configuration for a Git repo in Gitiles.
message GitilesConfig {
// branch to track.
string branch = 1;
// repo_url from which to load Git data.
string repo_url = 2;
// dependencies is an optional specification of dependencies to track.
// Revisions generated by the checkout will contain the pinned versions of
// these dependencies.
repeated VersionFileConfig dependencies = 3;
// default_bug_project indicates the Monorail project used when no project
// is specified in "Bug: 123" lines in commit messages.
string default_bug_project = 4;
}
// GoModGerritParentConfig provides configuration for a Parent which uses Go
// modules and uploads pull requests to Gerrit.
message GoModGerritParentConfig {
GoModParentConfig go_mod = 1;
GerritConfig gerrit = 2;
}
// GoModParentConfig provides configuration for a Parent which uses Go modules.
message GoModParentConfig {
GitCheckoutConfig git_checkout = 1;
// module_path is the Go module path of the dependency.
string module_path = 2;
// find_and_replace lists additional files in which all instances of the
// previous primary revision ID should be replaced with the new primary
// revision ID.
repeated string find_and_replace = 3;
// pre_upload_steps are steps to run before uploading the CL.
repeated PreUploadStep pre_upload_steps = 4;
// pre_upload describes command(s) to run before uploading roll CLs.
PreUploadConfig pre_upload_commands = 5;
// go_cmd is an alternate command to run to invoke Go, eg. for hermetic
// installation via Bazel.
string go_cmd = 6;
}
// DEPSLocalConfig provides configuration for a Parent which uses a local
// checkout and DEPS to manage dependencies.
message DEPSLocalParentConfig {
GitCheckoutParentConfig git_checkout = 1;
// child_path is the path to the child repo within the parent.
string child_path = 2;
// child_subdir is the subdirectory of the workdir in which the child_path
// should be rooted. In most cases, this should be empty, but if child_path
// is relative to the parent repo dir (eg. when DEPS specifies
// use_relative_paths), then this is required.
string child_subdir = 3;
// checkout_path is the path to the repo within the checkout root
string checkout_path = 4;
// gclient_spec overrides the default gclient spec.
string gclient_spec = 5;
// pre_upload_steps are steps to run before uploading the CL.
repeated PreUploadStep pre_upload_steps = 6;
// run_hooks indicates whether to run "gclient runhooks" after syncing.
bool run_hooks = 7;
// pre_upload describes command(s) to run before uploading roll CLs.
PreUploadConfig pre_upload_commands = 8;
}
// GitCheckoutParentConfig provides configuration for a Parent which uses a
// local checkout to create changes.
message GitCheckoutParentConfig {
GitCheckoutConfig git_checkout = 1;
DependencyConfig dep = 2;
}
// FreeTypeParentConfig provides configuration for the FreeType Parent.
message FreeTypeParentConfig {
GitilesParentConfig gitiles = 1;
}
// CIPDChildConfig provides configuration for a CIPD package Child.
message CIPDChildConfig {
// name of the package.
string name = 1;
// tag to track.
string tag = 2;
// gitiles_repo is an optional config for a git repo which should be used
// for generating the list of revisions in a roll. Both the old and new
// CIPD package version must provide a git_revision tag in order for this
// to work. If provided, the revision ID will be of the form
// `git_revision:<hash>` instead of using the CIPD package instance ID.
// Deprecated in favor of source_repo.
string gitiles_repo = 4;
// revision_id_tag is a tag key whose value will be used as the revision ID
// instead of the CIPD package instance ID. Overrides git_revision for the
// revision ID if gitiles_repo was provided.
string revision_id_tag = 5;
// revision_id_tag_strip_key indicates that the revision ID should not
// include the revision_id_tag key. Only relevant if revision_id_tag is
// set.
bool revision_id_tag_strip_key = 6;
// source_repo is an optional config for a gitiles repo which should be used
// for generating the list of revisions in a roll. Both the old and new
// CIPD package version must provide a git_revision tag in order for this
// to work. If provided, the revision ID will be of the form
// `git_revision:<hash>` instead of using the CIPD package instance ID.
GitilesConfig source_repo = 7;
}
// FuchsiaSDKChildConfig provides configuration for the Fuchsia SDK Child.
message FuchsiaSDKChildConfig {
// include_mac_sdk indicates whether to also roll the version of the Mac
// SDK. Note that the dependency is not tracked separately; the Mac SDK is
// simply rolled to the newest available version.
// DEPRECATED: The presence of latest_mac_path indicates whether the Mac
// SDK is included.
bool include_mac_sdk = 1;
// gcs_bucket containing the SDK tarballs.
string gcs_bucket = 2;
// latest_linux_path is the path to the file containing the ID of the latest
// Linux SDK.
string latest_linux_path = 3;
// latest_mac_path is the path to the file containing the ID of the latest
// Mac SDK.
string latest_mac_path = 4;
// tarball_linux_path_tmpl is a template for the GCS path of the Linux SDK,
// with the version ID to be inserted later.
string tarball_linux_path_tmpl = 5;
}
// SemVerGCSChildConfig provides configuration for a Child in GCS which uses
// semantic versioning.
message SemVerGCSChildConfig {
GCSChildConfig gcs = 1;
// short_rev_regex is a regular expression string which indicates what part
// of the revision ID string should be used as the shortened ID for display.
// If not specified, the full ID string is used.
string short_rev_regex = 2;
// version_regex is a regular expression string containing one or more
// integer capture groups. The integers matched by the capture groups are
// compared, in order, when comparing two revisions.
string version_regex = 3;
}
// GCSChildConfig provides configuration for a Child in GCS.
message GCSChildConfig {
// gcs_bucket used for finding Child revisions.
string gcs_bucket = 1;
// gcs_path within the bucket which contains child revisions.
string gcs_path = 2;
// revision_id_regex is used to extract the revision ID from a full GCS file
// path. If not provided, the base name of the file is used.
string revision_id_regex = 3;
}
// GitCheckoutChildConfig provides configuration for a Child which uses a local
// Git checkout.
message GitCheckoutChildConfig {
GitCheckoutConfig git_checkout = 1;
}
// GitCheckoutGitHubChildConfig provides configuration for a Child which uses a
// local checkout of a GitHub repo.
message GitCheckoutGitHubChildConfig {
GitCheckoutChildConfig git_checkout = 1;
string repo_owner = 2;
string repo_name = 3;
}
// GitilesChildConfig provides configuration for a Child which uses Gitiles.
message GitilesChildConfig {
GitilesConfig gitiles = 1;
// path indicates an optional single path of the repo to watch for changes;
// all commits which do not change this path are ignored. Note that this
// may produce strange results if the Git history for the path is not
// linear.
string path = 2;
}
// DockerChildConfig provides configuration for a Child which uses Docker.
message DockerChildConfig {
// registry which stores the Docker image, eg. "gcr.io".
string registry = 1;
// repository of the image, eg. "skia-public/autoroll-be".
string repository = 2;
// tag of the image to track, eg. "latest".
string tag = 3;
}
// PreUploadStep lists the known pre-upload steps which may be run before roll
// CLs are uploaded. These must be kept in sync with
// go/repo_manager/parent/pre_upload_steps.go.
enum PreUploadStep {
ANGLE_CODE_GENERATION = 0;
ANGLE_GN_TO_BP = 1;
ANGLE_ROLL_CHROMIUM = 2;
GO_GENERATE_CIPD = 3;
FLUTTER_LICENSE_SCRIPTS = 4;
FLUTTER_LICENSE_SCRIPTS_FOR_DART = 5;
FLUTTER_LICENSE_SCRIPTS_FOR_FUCHSIA = 6;
SKIA_GN_TO_BP = 7;
TRAIN_INFRA = 8;
UPDATE_FLUTTER_DEPS_FOR_DART = 9;
VULKAN_DEPS_UPDATE_COMMIT_MESSAGE = 10;
UPDATE_BORINGSSL = 11;
CHROMIUM_ROLL_WEBGPU_CTS = 12;
}
// NotifierConfig provides configuration for a notification system.
message NotifierConfig {
// LogLevel categorizes messages similarly to log severity.
enum LogLevel {
SILENT = 0;
ERROR = 1;
WARNING = 2;
INFO = 3;
DEBUG = 4;
}
// MsgType categorizes notifications based on their type.
enum MsgType {
ISSUE_UPDATE = 0;
LAST_N_FAILED = 1;
MODE_CHANGE = 2;
NEW_FAILURE = 3;
NEW_SUCCESS = 4;
ROLL_CREATION_FAILED = 5;
SAFETY_THROTTLE = 6;
STRATEGY_CHANGE = 7;
SUCCESS_THROTTLE = 8;
MANUAL_ROLL_CREATION_FAILED = 9;
}
// log_level allows all messages at and above the given severity to be
// sent. Mutually exclusive with msg_type.
LogLevel log_level = 1;
// msg_type limits the notifier to only send messages of the given
// types. Mutually exclusive with log_level.
repeated MsgType msg_type = 2;
// config provides configuration for the specific type of notifier.
oneof config {
EmailNotifierConfig email = 3;
ChatNotifierConfig chat = 4;
MonorailNotifierConfig monorail = 5;
PubSubNotifierConfig pubsub = 6;
}
// subject indicates a subject line which overrides the default subject line
// for every notification message, if provided.
string subject = 7;
}
// EmailNotifierConfig provides configuration for email notifications.
message EmailNotifierConfig {
// emails are the email addresses which should receive notifications.
repeated string emails = 1;
}
// ChatNotifierConfig provides configuration for Google Chat notifications.
message ChatNotifierConfig {
// room_id in which to post messages.
string room_id = 1;
}
// MonorailNotifierConfig provides configuration for bug-filing "notifications"
// using Monorail.
message MonorailNotifierConfig {
// project name under which to file bugs. Required.
string project = 1;
// owner of bugs filed in Monorail. Required.
string owner = 2;
// cc these email addresses on bugs filed in Monorail.
repeated string cc = 3;
// components to apply to bugs filed in Monorail.
repeated string components = 4;
// labels to apply to bugs filed in Monorail.
repeated string labels = 5;
}
// PubSubNotifierConfig provides configuration for PubSub notifications.
message PubSubNotifierConfig {
// topic under which to publish PubSub messages.
string topic = 1;
}
// ThrottleConfig provides configuration for throttling.
message ThrottleConfig {
// attempt_count indicates the number of failed attempts after which to
// begin throttling.
int32 attempt_count = 1;
// time_window during which, if the number of failed attempts exceeds the
// specified attempt_count, throttling is enabled.
string time_window = 2;
}
// TransitiveDepConfig provides configuration for a dependency referenced by
// both the parent and child, to be updated in the parent to match the revision
// depended on by the child at the revision being rolled.
message TransitiveDepConfig {
// child dependency information.
VersionFileConfig child = 1;
// parent dependency information.
VersionFileConfig parent = 2;
// log_url_tmpl is a template for constructing a URL which displays the log
// between two revisions.
string log_url_tmpl = 3;
}
// VersionFileConfig provides configuration for a dependency whose version is
// pinned within a particular file.
message VersionFileConfig {
// id of the dependency to be rolled, eg. a repo URL.
string id = 1;
// path within the repo of the file which pins the dependency. The name of
// the file dictates how we read and write the revision pin:
// - If `regex` is set, the name of this file is ignored.
// - `DEPS`: we parse the file as a DEPS file using a Python parser.
// - `*.pyl`: we assume the file contains a Python literal composed of
// dictionaries and lists. In this case, the `id` field must be a dot-
// separated path from the root of the object to the field which
// specifies the revision, where each element is either a dictionary key
// or a selector which matches a key+value of a given list element. For
// example, the id `key1.key2.id=my-dependency-id.revision` would
// traverse the following literal to find the revision ID:
//
// {
// "key1": {
// "key2": [
// {
// "id": "my-dependency-id",
// "revision": "12345",
// },
// ],
// },
// }
//
// - Otherwise, we assume that the file's sole contents are the revision
// ID and we read or write the entirety of the file.
string path = 2;
// regex which is used to extract the existing revision of the dependency
// and to update the pin to the new revision. Optional.
string regex = 3;
}
// DependencyConfig provides configuration for a dependency whose version is
// pinned in a file and which may have transitive dependencies.
message DependencyConfig {
// primary dependency.
VersionFileConfig primary = 1;
// transitive dependencies.
repeated TransitiveDepConfig transitive = 2;
// find_and_replace lists additional files in which all instances of the
// previous primary revision ID should be replaced with the new primary
// revision ID.
repeated string find_and_replace = 3;
}
// GitCheckoutConfig provides configuration for a Git checkout.
message GitCheckoutConfig {
// branch to track.
string branch = 1;
// repo_url to check out.
string repo_url = 2;
// rev_link_tmpl is an optional template used for generating links to
// revisions. If not specified, revisions generated by the checkout will not
// have an associated URL.
string rev_link_tmpl = 3;
// dependencies is an optional specification of dependencies to track.
// Revisions generated by the checkout will contain the pinned versions of
// these dependencies.
repeated VersionFileConfig dependencies = 4;
// default_bug_project indicates the Monorail project used when no project
// is specified in "Bug: 123" lines in commit messages.
string default_bug_project = 5;
}
// BuildbucketRevisionFilterConfig provides configuration for a revision filter
// which uses Buildbucket.
message BuildbucketRevisionFilterConfig {
string project = 1;
string bucket = 2;
string buildset_commit_tmpl = 3;
repeated string builder = 4;
}
// CIPDRevisionFilterConfig provides configuration for a revision filter
// which filters out revisions which don't exist on all of the configured
// packages and platforms.
message CIPDRevisionFilterConfig {
repeated string package = 1;
repeated string platform = 2;
string tag_key = 3;
}
// ValidHttpRevisionFilterConfig provides configuration for a
// revision filter which obtains a single valid revision from a file which is
// retrieved via HTTP.
message ValidHttpRevisionFilterConfig {
// URL of the file containing the valid revision.
string file_url = 1;
// Optional regular expression used to extract the valid revision from the
// file after retrieval. If not provided, we assume that the entire contents
// of the file comprise the revision ID.
string regex = 2;
}
// PreUploadConfig describes additional steps to run after updating the
// dependency but before uploading the CL, on rollers which use a local
// checkout.
message PreUploadConfig {
// CIPD packages needed by the command(s).
repeated PreUploadCIPDPackageConfig cipd_package = 1;
// Command(s) to run.
repeated PreUploadCommandConfig command = 2;
}
// PreUploadCommandConfig describes a command to run.
message PreUploadCommandConfig {
// Command to run.
string command = 1;
// Working directory in which to run the command.
string cwd = 2;
// Environment variables needed by the command, in "KEY=VALUE" format.
repeated string env = 3;
// If true, log the error returned by the command but don't error out.
bool ignore_failure = 4;
}
// CIPDPackageConfig describes a CIPD package.
message PreUploadCIPDPackageConfig {
// Full CIPD package name.
string name = 1;
// Relative path within the root dir to install the package.
string path = 2;
// Version of the package.
string version = 3;
}
// Mode describes the valid operating modes of an autoroller.
// These must be kept in sync with autoroll/go/modes/modes.go.
enum Mode {
// RUNNING is the typical operating mode of the autoroller. It will upload and
// land CLs as new revisions appear in the Child.
RUNNING = 0;
// STOPPED prevents the autoroller from uploading any CLs. The roller will
// continue to update any local checkouts to prevent them from getting too far
// out of date, and any requested manual rolls will be fulfilled.
STOPPED = 1;
// DRY_RUN is similar to RUNNING but does not land the roll CLs after the
// commit queue finishes. Instead, the active roll is left open until new
// revisions appear in the child, at which point the roll is closed and a new
// one is uploaded.
DRY_RUN = 2;
// OFFLINE is similar to STOPPED, but the roller does not update its checkouts
// and requests for manual rolls are ignored.
OFFLINE = 3;
}
// Configs provides configuration for multiple autorollers.
message Configs {
repeated Config config = 1;
}