Class: Google::Apis::RemotebuildexecutionV2::BuildBazelRemoteExecutionV2ActionResult
- Inherits:
-
Object
- Object
- Google::Apis::RemotebuildexecutionV2::BuildBazelRemoteExecutionV2ActionResult
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/remotebuildexecution_v2/classes.rb,
lib/google/apis/remotebuildexecution_v2/representations.rb,
lib/google/apis/remotebuildexecution_v2/representations.rb
Overview
An ActionResult represents the result of an Action being run. It is advised
that at least one field (for example ActionResult.execution_metadata.Worker
)
have a non-default value, to ensure that the serialized value is non-empty,
which can then be used as a basic data sanity check.
Instance Attribute Summary collapse
-
#execution_metadata ⇒ Google::Apis::RemotebuildexecutionV2::BuildBazelRemoteExecutionV2ExecutedActionMetadata
ExecutedActionMetadata contains details about a completed execution.
-
#exit_code ⇒ Fixnum
The exit code of the command.
-
#output_directories ⇒ Array<Google::Apis::RemotebuildexecutionV2::BuildBazelRemoteExecutionV2OutputDirectory>
The output directories of the action.
-
#output_directory_symlinks ⇒ Array<Google::Apis::RemotebuildexecutionV2::BuildBazelRemoteExecutionV2OutputSymlink>
The output directories of the action that are symbolic links to other directories.
-
#output_file_symlinks ⇒ Array<Google::Apis::RemotebuildexecutionV2::BuildBazelRemoteExecutionV2OutputSymlink>
The output files of the action that are symbolic links to other files.
-
#output_files ⇒ Array<Google::Apis::RemotebuildexecutionV2::BuildBazelRemoteExecutionV2OutputFile>
The output files of the action.
-
#output_symlinks ⇒ Array<Google::Apis::RemotebuildexecutionV2::BuildBazelRemoteExecutionV2OutputSymlink>
New in v2.1: this field will only be populated if the command
output_paths
field was used, and not the pre v2.1output_files
oroutput_directories
fields. -
#stderr_digest ⇒ Google::Apis::RemotebuildexecutionV2::BuildBazelRemoteExecutionV2Digest
A content digest.
-
#stderr_raw ⇒ String
The standard error buffer of the action.
-
#stdout_digest ⇒ Google::Apis::RemotebuildexecutionV2::BuildBazelRemoteExecutionV2Digest
A content digest.
-
#stdout_raw ⇒ String
The standard output buffer of the action.
Instance Method Summary collapse
-
#initialize(**args) ⇒ BuildBazelRemoteExecutionV2ActionResult
constructor
A new instance of BuildBazelRemoteExecutionV2ActionResult.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ BuildBazelRemoteExecutionV2ActionResult
Returns a new instance of BuildBazelRemoteExecutionV2ActionResult.
353 354 355 |
# File 'lib/google/apis/remotebuildexecution_v2/classes.rb', line 353 def initialize(**args) update!(**args) end |
Instance Attribute Details
#execution_metadata ⇒ Google::Apis::RemotebuildexecutionV2::BuildBazelRemoteExecutionV2ExecutedActionMetadata
ExecutedActionMetadata contains details about a completed execution.
Corresponds to the JSON property executionMetadata
184 185 186 |
# File 'lib/google/apis/remotebuildexecution_v2/classes.rb', line 184 def @execution_metadata end |
#exit_code ⇒ Fixnum
The exit code of the command.
Corresponds to the JSON property exitCode
189 190 191 |
# File 'lib/google/apis/remotebuildexecution_v2/classes.rb', line 189 def exit_code @exit_code end |
#output_directories ⇒ Array<Google::Apis::RemotebuildexecutionV2::BuildBazelRemoteExecutionV2OutputDirectory>
The output directories of the action. For each output directory requested in
the output_directories
or output_paths
field of the Action, if the
corresponding directory existed after the action completed, a single entry
will be present in the output list, which will contain the digest of a Tree
message containing the directory tree, and the path equal exactly to the
corresponding Action output_directories member. As an example, suppose the
Action had an output directory a/b/dir
and the execution produced the
following contents in a/b/dir
: a file named bar
and a directory named foo
with an executable file named baz
. Then, output_directory will contain (
hashes shortened for readability): json // OutputDirectory proto: ` path: "
a/b/dir" tree_digest: ` hash: "4a73bc9d03...", size: 55 ` ` // Tree proto with
hash "4a73bc9d03..." and size 55: ` root: ` files: [ ` name: "bar", digest: `
hash: "4a73bc9d03...", size: 65534 ` ` ], directories: [ ` name: "foo", digest:
` hash: "4cf2eda940...", size: 43 ` ` ] ` children : ` // (Directory proto
with hash "4cf2eda940..." and size 43) files: [ ` name: "baz", digest: ` hash:
"b2c941073e...", size: 1294, `, is_executable: true ` ] ` `
If an output
of the same name as listed in output_files
of the Command was found in
output_directories
, but was not a directory, the server will return a
FAILED_PRECONDITION.
Corresponds to the JSON property outputDirectories
212 213 214 |
# File 'lib/google/apis/remotebuildexecution_v2/classes.rb', line 212 def output_directories @output_directories end |
#output_directory_symlinks ⇒ Array<Google::Apis::RemotebuildexecutionV2::BuildBazelRemoteExecutionV2OutputSymlink>
The output directories of the action that are symbolic links to other
directories. Those may be links to other output directories, or input
directories, or even absolute paths outside of the working directory, if the
server supports SymlinkAbsolutePathStrategy.ALLOWED. For each output directory
requested in the output_directories
field of the Action, if the directory
existed after the action completed, a single entry will be present either in
this field, or in the output_directories
field, if the directory was not a
symbolic link. If an output of the same name was found, but was a symbolic
link to a file instead of a directory, the server will return a
FAILED_PRECONDITION. If the action does not produce the requested output, then
that output will be omitted from the list. The server is free to arrange the
output list as desired; clients MUST NOT assume that the output list is sorted.
DEPRECATED as of v2.1. Servers that wish to be compatible with v2.0 API
should still populate this field in addition to output_symlinks
.
Corresponds to the JSON property outputDirectorySymlinks
230 231 232 |
# File 'lib/google/apis/remotebuildexecution_v2/classes.rb', line 230 def output_directory_symlinks @output_directory_symlinks end |
#output_file_symlinks ⇒ Array<Google::Apis::RemotebuildexecutionV2::BuildBazelRemoteExecutionV2OutputSymlink>
The output files of the action that are symbolic links to other files. Those
may be links to other output files, or input files, or even absolute paths
outside of the working directory, if the server supports
SymlinkAbsolutePathStrategy.ALLOWED. For each output file requested in the
output_files
or output_paths
field of the Action, if the corresponding file
existed after the action completed, a single entry will be present either in
this field, or in the output_files
field, if the file was not a symbolic
link. If an output symbolic link of the same name as listed in output_files
of the Command was found, but its target type was not a regular file, the
server will return a FAILED_PRECONDITION. If the action does not produce the
requested output, then that output will be omitted from the list. The server
is free to arrange the output list as desired; clients MUST NOT assume that
the output list is sorted. DEPRECATED as of v2.1. Servers that wish to be
compatible with v2.0 API should still populate this field in addition to
output_symlinks
.
Corresponds to the JSON property outputFileSymlinks
249 250 251 |
# File 'lib/google/apis/remotebuildexecution_v2/classes.rb', line 249 def output_file_symlinks @output_file_symlinks end |
#output_files ⇒ Array<Google::Apis::RemotebuildexecutionV2::BuildBazelRemoteExecutionV2OutputFile>
The output files of the action. For each output file requested in the
output_files
or output_paths
field of the Action, if the corresponding file
existed after the action completed, a single entry will be present either in
this field, or the output_file_symlinks
field if the file was a symbolic
link to another file (output_symlinks
field after v2.1). If an output listed
in output_files
was found, but was a directory rather than a regular file,
the server will return a FAILED_PRECONDITION. If the action does not produce
the requested output, then that output will be omitted from the list. The
server is free to arrange the output list as desired; clients MUST NOT assume
that the output list is sorted.
Corresponds to the JSON property outputFiles
263 264 265 |
# File 'lib/google/apis/remotebuildexecution_v2/classes.rb', line 263 def output_files @output_files end |
#output_symlinks ⇒ Array<Google::Apis::RemotebuildexecutionV2::BuildBazelRemoteExecutionV2OutputSymlink>
New in v2.1: this field will only be populated if the command output_paths
field was used, and not the pre v2.1 output_files
or output_directories
fields. The output paths of the action that are symbolic links to other paths.
Those may be links to other outputs, or inputs, or even absolute paths outside
of the working directory, if the server supports SymlinkAbsolutePathStrategy.
ALLOWED. A single entry for each output requested in output_paths
field of
the Action, if the corresponding path existed after the action completed and
was a symbolic link. If the action does not produce a requested output, then
that output will be omitted from the list. The server is free to arrange the
output list as desired; clients MUST NOT assume that the output list is sorted.
Corresponds to the JSON property outputSymlinks
277 278 279 |
# File 'lib/google/apis/remotebuildexecution_v2/classes.rb', line 277 def output_symlinks @output_symlinks end |
#stderr_digest ⇒ Google::Apis::RemotebuildexecutionV2::BuildBazelRemoteExecutionV2Digest
A content digest. A digest for a given blob consists of the size of the blob
and its hash. The hash algorithm to use is defined by the server. The size is
considered to be an integral part of the digest and cannot be separated. That
is, even if the hash
field is correctly specified but size_bytes
is not,
the server MUST reject the request. The reason for including the size in the
digest is as follows: in a great many cases, the server needs to know the size
of the blob it is about to work with prior to starting an operation with it,
such as flattening Merkle tree structures or streaming it to a worker.
Technically, the server could implement a separate metadata store, but this
results in a significantly more complicated implementation as opposed to
having the client specify the size up-front (or storing the size along with
the digest in every message where digests are embedded). This does mean that
the API leaks some implementation details of (what we consider to be) a
reasonable server implementation, but we consider this to be a worthwhile
tradeoff. When a Digest
is used to refer to a proto message, it always
refers to the message in binary encoded form. To ensure consistent hashing,
clients and servers MUST ensure that they serialize messages according to the
following rules, even if there are alternate valid encodings for the same
message: * Fields are serialized in tag order. * There are no unknown fields. *
There are no duplicate fields. * Fields are serialized according to the
default semantics for their type. Most protocol buffer implementations will
always follow these rules when serializing, but care should be taken to avoid
shortcuts. For instance, concatenating two messages to merge them may produce
duplicate fields.
Corresponds to the JSON property stderrDigest
305 306 307 |
# File 'lib/google/apis/remotebuildexecution_v2/classes.rb', line 305 def stderr_digest @stderr_digest end |
#stderr_raw ⇒ String
The standard error buffer of the action. The server SHOULD NOT inline stderr
unless requested by the client in the GetActionResultRequest message. The
server MAY omit inlining, even if requested, and MUST do so if inlining would
cause the response to exceed message size limits.
Corresponds to the JSON property stderrRaw
NOTE: Values are automatically base64 encoded/decoded in the client library.
314 315 316 |
# File 'lib/google/apis/remotebuildexecution_v2/classes.rb', line 314 def stderr_raw @stderr_raw end |
#stdout_digest ⇒ Google::Apis::RemotebuildexecutionV2::BuildBazelRemoteExecutionV2Digest
A content digest. A digest for a given blob consists of the size of the blob
and its hash. The hash algorithm to use is defined by the server. The size is
considered to be an integral part of the digest and cannot be separated. That
is, even if the hash
field is correctly specified but size_bytes
is not,
the server MUST reject the request. The reason for including the size in the
digest is as follows: in a great many cases, the server needs to know the size
of the blob it is about to work with prior to starting an operation with it,
such as flattening Merkle tree structures or streaming it to a worker.
Technically, the server could implement a separate metadata store, but this
results in a significantly more complicated implementation as opposed to
having the client specify the size up-front (or storing the size along with
the digest in every message where digests are embedded). This does mean that
the API leaks some implementation details of (what we consider to be) a
reasonable server implementation, but we consider this to be a worthwhile
tradeoff. When a Digest
is used to refer to a proto message, it always
refers to the message in binary encoded form. To ensure consistent hashing,
clients and servers MUST ensure that they serialize messages according to the
following rules, even if there are alternate valid encodings for the same
message: * Fields are serialized in tag order. * There are no unknown fields. *
There are no duplicate fields. * Fields are serialized according to the
default semantics for their type. Most protocol buffer implementations will
always follow these rules when serializing, but care should be taken to avoid
shortcuts. For instance, concatenating two messages to merge them may produce
duplicate fields.
Corresponds to the JSON property stdoutDigest
342 343 344 |
# File 'lib/google/apis/remotebuildexecution_v2/classes.rb', line 342 def stdout_digest @stdout_digest end |
#stdout_raw ⇒ String
The standard output buffer of the action. The server SHOULD NOT inline stdout
unless requested by the client in the GetActionResultRequest message. The
server MAY omit inlining, even if requested, and MUST do so if inlining would
cause the response to exceed message size limits.
Corresponds to the JSON property stdoutRaw
NOTE: Values are automatically base64 encoded/decoded in the client library.
351 352 353 |
# File 'lib/google/apis/remotebuildexecution_v2/classes.rb', line 351 def stdout_raw @stdout_raw end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
358 359 360 361 362 363 364 365 366 367 368 369 370 |
# File 'lib/google/apis/remotebuildexecution_v2/classes.rb', line 358 def update!(**args) @execution_metadata = args[:execution_metadata] if args.key?(:execution_metadata) @exit_code = args[:exit_code] if args.key?(:exit_code) @output_directories = args[:output_directories] if args.key?(:output_directories) @output_directory_symlinks = args[:output_directory_symlinks] if args.key?(:output_directory_symlinks) @output_file_symlinks = args[:output_file_symlinks] if args.key?(:output_file_symlinks) @output_files = args[:output_files] if args.key?(:output_files) @output_symlinks = args[:output_symlinks] if args.key?(:output_symlinks) @stderr_digest = args[:stderr_digest] if args.key?(:stderr_digest) @stderr_raw = args[:stderr_raw] if args.key?(:stderr_raw) @stdout_digest = args[:stdout_digest] if args.key?(:stdout_digest) @stdout_raw = args[:stdout_raw] if args.key?(:stdout_raw) end |