Skip to content

Commit

Permalink
proto: update bazel protos (#6124)
Browse files Browse the repository at this point in the history
  • Loading branch information
sluongng committed Mar 12, 2024
1 parent 4c6ff68 commit e40f984
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 4 deletions.
29 changes: 27 additions & 2 deletions proto/build_event_stream.proto
Original file line number Diff line number Diff line change
Expand Up @@ -1077,7 +1077,8 @@ message BuildMetrics {
int64 analysis_phase_time_in_ms = 3;
// The elapsed wall time in milliseconds during the execution phase.
// When analysis and execution phases are interleaved, this measures the
// elapsed time from the first action execution to the last.
// elapsed time from the first action execution (excluding workspace status
// actions) to the last.
int64 execution_phase_time_in_ms = 4;
}
TimingMetrics timing_metrics = 5;
Expand Down Expand Up @@ -1210,12 +1211,16 @@ message BuildMetrics {

int64 actions_executed = 11;

int64 prior_actions_executed = 13;

// Information collected from worker at some point.
message WorkerStats {
// Epoch unix time of collection of metrics.
int64 collect_time_in_ms = 1;
// RSS size of worker process.
// Memory usage of worker process at the end of the build.
int32 worker_memory_in_kb = 2;
// Memory usage of the worker process prior to the invocation.
int32 prior_worker_memory_in_kb = 4;
// Epoch unix time of last action started on specific worker.
int64 last_action_start_time_in_ms = 3;
}
Expand Down Expand Up @@ -1288,6 +1293,26 @@ message BuildMetrics {
}

WorkerPoolMetrics worker_pool_metrics = 11;

// Information about dynamic execution.
message DynamicExecutionMetrics {
message RaceStatistics {
// Mnemonic of the action.
string mnemonic = 1;
// Name of runner of local branch.
string local_runner = 2;
// Name of runner of remote branch.
string remote_runner = 3;
// Number of wins of local branch in race.
int32 local_wins = 4;
// Number of wins of remote branch in race.
int32 remote_wins = 5;
}
// Race statistics grouped by mnemonic, local_name, remote_name.
repeated RaceStatistics race_statistics = 1;
}

DynamicExecutionMetrics dynamic_execution_metrics = 12;
}

// Event providing additional statistics/logs after completion of the build.
Expand Down
27 changes: 25 additions & 2 deletions proto/failure_details.proto
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@ message FailureDetail {
DiffAwareness diff_awareness = 182;
ModCommand mod_command = 183;
BuildReport build_report = 184;
Skyfocus skyfocus = 185;
}

reserved 102; // For internal use
Expand Down Expand Up @@ -295,7 +296,8 @@ message RemoteOptions {
CREDENTIALS_WRITE_FAILURE = 3 [(metadata) = { exit_code: 36 }];
DOWNLOADER_WITHOUT_GRPC_CACHE = 4 [(metadata) = { exit_code: 2 }];
EXECUTION_WITH_INVALID_CACHE = 5 [(metadata) = { exit_code: 2 }];
EXECUTION_WITH_SCRUBBING = 6 [(metadata) = { exit_code: 2 }];

reserved 6;
}

Code code = 1;
Expand Down Expand Up @@ -363,6 +365,20 @@ message BuildReport {
// failed to be written.
}

// Failure details for errors produced when using Skyfocus
message Skyfocus {
enum Code {
// The defined working set cannot be used for the focused targets. For
// example, this happens when the intersection of the working set and the
// transitive closure of the focused target is empty.
INVALID_WORKING_SET = 0 [(metadata) = { exit_code: 2 }];
// The user needs to augment their working set to include the new file(s).
NON_WORKING_SET_CHANGE = 1 [(metadata) = { exit_code: 2 }];
}

Code code = 1;
}

message PackageOptions {
enum Code {
reserved 2, 3; // For internal use
Expand Down Expand Up @@ -502,6 +518,7 @@ message Filesystem {
SERVER_FILE_WRITE_FAILURE = 5 [(metadata) = { exit_code: 36 }];
DEFAULT_DIGEST_HASH_FUNCTION_INVALID_VALUE = 6
[(metadata) = { exit_code: 2 }];
FILESYSTEM_JNI_NOT_AVAILABLE = 8 [(metadata) = { exit_code: 36 }];

reserved 7; // For internal use
}
Expand Down Expand Up @@ -918,6 +935,7 @@ message DumpCommand {
ACTION_GRAPH_DUMP_FAILED = 4 [(metadata) = { exit_code: 7 }];
STARLARK_HEAP_DUMP_FAILED = 5 [(metadata) = { exit_code: 8 }];
reserved 6; // For internal use
SKYFRAME_MEMORY_DUMP_FAILED = 7 [(metadata) = { exit_code: 7 }];
}

Code code = 1;
Expand Down Expand Up @@ -1034,8 +1052,11 @@ message ActionRewinding {
enum Code {
ACTION_REWINDING_UNKNOWN = 0 [(metadata) = { exit_code: 37 }];
LOST_INPUT_TOO_MANY_TIMES = 1 [(metadata) = { exit_code: 1 }];
LOST_INPUT_IS_SOURCE = 2 [(metadata) = { exit_code: 1 }];
REWIND_LOST_INPUTS_PREREQ_UNMET = 3 [(metadata) = { exit_code: 2 }];
LOST_OUTPUT_TOO_MANY_TIMES = 4 [(metadata) = { exit_code: 1 }];
// Deprecated: attempting to rewind a source artifact is now a hard crash.
DEPRECATED_LOST_INPUT_IS_SOURCE = 2
[(metadata) = { exit_code: 1 }, deprecated = true];
}

Code code = 1;
Expand Down Expand Up @@ -1296,6 +1317,7 @@ message ExternalDeps {
VERSION_RESOLUTION_ERROR = 3 [(metadata) = { exit_code: 48 }];
INVALID_REGISTRY_URL = 4 [(metadata) = { exit_code: 48 }];
ERROR_ACCESSING_REGISTRY = 5 [(metadata) = { exit_code: 32 }];
INVALID_EXTENSION_IMPORT = 6 [(metadata) = { exit_code: 48 }];
}

Code code = 1;
Expand All @@ -1316,6 +1338,7 @@ message ModCommand {
MISSING_ARGUMENTS = 1 [(metadata) = { exit_code: 2 }];
TOO_MANY_ARGUMENTS = 2 [(metadata) = { exit_code: 2 }];
INVALID_ARGUMENTS = 3 [(metadata) = { exit_code: 2 }];
BUILDOZER_FAILED = 4 [(metadata) = { exit_code: 2 }];
}

Code code = 1;
Expand Down
2 changes: 2 additions & 0 deletions proto/option_filters.proto
Original file line number Diff line number Diff line change
Expand Up @@ -55,5 +55,7 @@ enum OptionMetadataTag {
INTERNAL = 4;
reserved "TRIGGERED_BY_ALL_INCOMPATIBLE_CHANGES";
reserved 5;
reserved "EXPLICIT_IN_OUTPUT_PATH";
reserved 6;
IMMUTABLE = 7;
}

0 comments on commit e40f984

Please sign in to comment.