aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/actions
Commit message (Collapse)AuthorAge
...
* Provide a source exec path -> path mapping in the ArtifactFactory, which is ↵Gravatar janakr2017-10-06
| | | | | | potentially more principled than just accessing the execRoot willy-nilly. PiperOrigin-RevId: 171234480
* Speed up fingerprint and hashcode computation by:Gravatar kush2017-10-06
| | | | | | | | | | 1. Add a fingerprint of the FilesetTraversalParams rather than the transitive closure of its attributes, while adding the FilesetTraversalParams to a Fingerprint. 2. Memoize the above fingerprint computations as well as hashCode computations for FilesetTraversalparams. Use AutoValue's @Memoize as well as equals and hashcode to simplify the code. RELNOTES: None PiperOrigin-RevId: 171191126
* Don't symlink into the execroot if possible in SymlinkAction: instead, ↵Gravatar janakr2017-10-02
| | | | | | symlink directly to the target artifact. Also offer the option to not provide the package roots to create the execroot: we would like to avoid the execroot if possible. PiperOrigin-RevId: 170515263
* Fix various linter errorsGravatar ruperts2017-09-29
| | | | | RELNOTES: None. PiperOrigin-RevId: 170418147
* Collect action cache hits, misses, and reasons for the misses.Gravatar jmmv2017-09-27
| | | | | | | | As a bonus, this brings in a bunch of new unit tests for the ActionCacheChecker. RELNOTES: None. PiperOrigin-RevId: 170059577
* Ensure that SpawnResults make their way back to the SpawnActions that caused ↵Gravatar ruperts2017-09-27
| | | | | | | them to be created. RELNOTES: None. PiperOrigin-RevId: 170058295
* Stop the transitive duplication of FilesetTraversalParams when Filesets are ↵Gravatar kush2017-09-25
| | | | | | | nested. RELNOTES: None PiperOrigin-RevId: 169723791
* Move SpawnResult from build.lib.exec into build.lib.actions so that e.g. ↵Gravatar ruperts2017-09-22
| | | | | | | build.lib.actions.SpawnActionContext can import SpawnResult without creating a cyclic dependency. RELNOTES: None. PiperOrigin-RevId: 169642267
* Internal changeGravatar tomlu2017-09-22
| | | | PiperOrigin-RevId: 169631693
* Add sanity check that the runfiles middleman root is a middleman rootGravatar ulfjack2017-09-20
| | | | | | This would have prevented a large breakage. PiperOrigin-RevId: 169364731
* RELNOTES: Fix documentation typo.Gravatar Googler2017-09-18
| | | | PiperOrigin-RevId: 169060289
* Automated rollback of commit f26e8694ae78599b3e2004e3360eaf3443fa53a6.Gravatar hlopko2017-09-18
| | | | | | | | | | | | | | | | | | | | *** Reason for rollback *** Breaks clang_tidy. *** Original change description *** Introduce -c source_file -o output_file build variables Prior to this cl CompileCommandLine would (almost) unconditionally emit -c and -o flags. This cl removes this logic and relies on crosstool to emit these flags. This is another small step towards platform independent C++ rules. Memory use is not affected, since the build variables used by this cl are already exposed, this cl just forces crosstools to use it. RELNOTES: None. PiperOrigin-RevId: 168834576
* Automatic code cleanup.Gravatar cushon2017-09-15
| | | | PiperOrigin-RevId: 168802886
* Internal changeGravatar tomlu2017-09-15
| | | | PiperOrigin-RevId: 168699077
* Introduce -c source_file -o output_file build variablesGravatar hlopko2017-09-14
| | | | | | | | | | | | Prior to this cl CompileCommandLine would (almost) unconditionally emit -c and -o flags. This cl removes this logic and relies on crosstool to emit these flags. This is another small step towards platform independent C++ rules. Memory use is not affected, since the build variables used by this cl are already exposed, this cl just forces crosstools to use it. RELNOTES: None. PiperOrigin-RevId: 168671507
* Internal changeGravatar tomlu2017-09-14
| | | | PiperOrigin-RevId: 168579567
* Remove Path instance from Artifact.Gravatar tomlu2017-09-14
| | | | | | In the long run it would be good to remove the Path class altogether. PiperOrigin-RevId: 168560355
* Fix string representations for root objectsGravatar vladmos2017-09-12
| | | | | | Root objects should not expose their absolute paths as they break hermeticity. PiperOrigin-RevId: 168363549
* ActionInputFileCache: move getMetadata to a new super-interfaceGravatar ulfjack2017-09-11
| | | | | | Update the callers that only need getMetadata to use the new interface. PiperOrigin-RevId: 167992239
* AbstractAction: Use ActionInputFileCache instead of MetadataHandlerGravatar ulfjack2017-09-08
| | | | | | This is a prerequisite for merging the two interfaces. PiperOrigin-RevId: 167843789
* More BUILD file refactorings.Gravatar philwo2017-09-06
| | | | | | | | | Split collect, concurrent, vfs, windows into package-level BUILD files. Move clock classes out of "util", into their own Java package. Move CompactHashSet into its own Java package to break a dependency cycle. Give nestedset and inmemoryfs their own package-level BUILD files. PiperOrigin-RevId: 167702127
* Fix assorted ErrorProne warnings.Gravatar lberki2017-09-06
| | | | | RELNOTES: None. PiperOrigin-RevId: 167574104
* Rename all logger instances to "logger" (instead "LOG" or "log").Gravatar lberki2017-09-05
| | | | | RELNOTES: None. PiperOrigin-RevId: 167505493
* Extract authandtls, buildeventservice, buildeventstream into package-level ↵Gravatar philwo2017-09-04
| | | | | | | | BUILD files. Replace all ":relative" labels with "//absolute:path" labels for easier search & replace. PiperOrigin-RevId: 167500985
* Split the cycle between vfs and profiler.Gravatar philwo2017-08-31
| | | | | | | | | | - Move ProfilerInfo into a subpackage (it's not necessary for profiling, just for analyzing a profile). - Make some fields in Profiler public for ProfileInfo. - Mark Profiler as ThreadSafe; there's no cyclic dependency here. This is based on ulfjack's microbazel patch series: https://github.com/ulfjack/bazel/commit/44553fcac0fc876784d8f48c2e577d8c999712de PiperOrigin-RevId: 167121952
* Split "shell", "graph" into their own packages.Gravatar philwo2017-08-29
| | | | PiperOrigin-RevId: 166849610
* Allow CommandLine expansion to throw an exception.Gravatar tomlu2017-08-24
| | | | | | | | | | | | | | | | | | | This paves the way for Skylark-side compact command lines that can fail during expansion. In general, expansion happens in these scenarios: * Action execution expands the command line to execute it. This is fine since we are well equipped already to handle failing actions. * In the analysis phase we expand command lines to investigate whether we need a params file. This could be moved to the execution phase, which would have the benefit of getting params files out of the action graph and saving memory. * Key computation expands the command line. This could be fixed by allowing command lines to compute their own keys (which wouldn't try to expand the command line). This could have the benefit of being more efficient. * Extra actions expand the command line to construct the extra action proto. This could maybe be deferred to the execution phase (writing the extra action), which would also be more memory efficient. For failed key computations, we return a singleton "error" key. This means multiple actions that will fail will map to the same key. These actions will necessarily fail if executed, so we should not need to worry about these ending up in the action cache. If we do manage to make the command line compute its own keys then this will become moot in the future. RELNOTES: None PiperOrigin-RevId: 166266385
* Set a bit in ActionExecutedEvent indicating if a failure occurred before the ↵Gravatar janakr2017-08-11
| | | | | | action actually executed. PiperOrigin-RevId: 164917959
* Move core test classes to lib.analysis.testGravatar ulfjack2017-08-11
| | | | | | | | These are depended upon by analysis code, so need to live in the same library as lib.analysis. Moving them here makes it possible to split the build-base library into separate libraries for analysis, execution, and rules. PiperOrigin-RevId: 164847161
* Move extra action stuff to analysis.extraGravatar ulfjack2017-08-10
| | | | | | | This is part of splitting up the build-base library into separate libraries for analysis, exec, and rules. PiperOrigin-RevId: 164835678
* Remove `blaze` from the conflict error messageGravatar Gregg Donovan2017-08-10
| | | | | | Closes #3508. PiperOrigin-RevId: 164722086
* Use java.time.Duration for timeoutsGravatar ulfjack2017-08-09
| | | | PiperOrigin-RevId: 164577062
* Remove MetadataHandler.isRegularFileGravatar ulfjack2017-07-28
| | | | | | | Instead use MetadataHandler.getMetadata().isFile(), which is basically what isRegularFile did before. PiperOrigin-RevId: 163351014
* BEP ActionExecuted: fix typoGravatar Klaus Aehlig2017-07-27
| | | | | | | The value of stderr should go to the stderr field, not the stdout field. Change-Id: Ic5341220b2e4207aa42570d3683c66131dac38cc PiperOrigin-RevId: 163324715
* Add configuration and target label to ActionCompletedId.Gravatar Eduardo Colaco2017-07-27
| | | | | | | | This is a first step on moving the configuration checksum and target label from the ActionExecuted payload and into ActionCompletedId. Change-Id: I989c9b708cd2a4172f6483d97bc7842d9841e3a8 PiperOrigin-RevId: 163233097
* Add ActionInputPrefetcher to ActionExecutionContextGravatar ulfjack2017-07-24
| | | | | | | This is more consistent with other values, and removes the need to inject it into the constructor of the various strategy implementations. PiperOrigin-RevId: 162729187
* Move ActionInputPrefetcher to the actions packageGravatar ulfjack2017-07-21
| | | | | | The plan is to add it to ActionExecutionContext, which is also there. PiperOrigin-RevId: 162656835
* Fix string representation for the Root classGravatar vladmos2017-07-19
| | | | | | | It can be accessed as ctx.genfiles_dir and should be printed as before for compatibility. PiperOrigin-RevId: 162360940
* Simplify exception handling in spawn strategiesGravatar ulfjack2017-07-17
| | | | | | | | | | | | | | | | | | | | | | | | | The main change here is to only catch SpawnExecException in StandaloneTestStrategy, so all other exceptions simplify propagate up. As a result, Bazel no longer retries tests that fail with an exception, we only retry tests that actually ran, had a spawn result, and resulted in a UserExecException. That is probably what we want. Also do some cleanup: - Remove ExecException.timedOut; nobody was calling it (but there's still SpawnExecException.timedOut) - Remove SpawnActionContext.shouldPropagateExecException; all exceptions (except SpawnExecException) are now propagated by default - Remote the SandboxOptions from the SandboxStrategies; all sandboxing options are now handled by the underlying SpawnRunner implementations I'll send a followup CL to remove the UserExecException and EnvironmentalExecException types; the types don't do anything special, and there are no catch blocks in production code that catch one of these more specific types. This should fix #3322 by removing a bunch of special handling. PiperOrigin-RevId: 161960919
* Promote getPossibleInputsForTesting from CppCompileAction to CommandAction, inGravatar cpeyser2017-07-17
| | | | | | | order to allow tests that depend on pruned inputs to work for both the legacy and crosstool cases. PiperOrigin-RevId: 161955432
* remote: Don't cache test if marked "external". Fixes #3362Gravatar buchgr2017-07-14
| | | | | RELNOTES: None. PiperOrigin-RevId: 161937673
* BEP: Report configuration for all actionsGravatar Klaus Aehlig2017-07-14
| | | | | | | | | | Whenever we report an action in the build event protocol that has a configuration associated with it, report the configuration as well in the protocol (and not only the checksum, if the configuration is not that of one of the top-level configured targets). Change-Id: I9b085d5381b3c3509b4f3b99c8a77bc8fba6abfe PiperOrigin-RevId: 161789745
* Rewrite all the sandbox strategy implementationsGravatar ulfjack2017-07-12
| | | | | | | | | | | | | | - Make use of existing abstractions like SpawnRunner and SpawnExecutionPolicy. - Instead of having the *Strategy create a *Runner, and then call back into SandboxStrategy, create a single SandboxContainer which contains the full command line, environment, and everything needed to create and delete the sandbox directory. - Do all the work in SandboxStrategy, including creation and deletion of the sandbox directory. - Use SpawnResult instead of throwing, catching, and rethrowing. - Simplify the control flow a bit. PiperOrigin-RevId: 161644979
* Make SkylarkValue instances mutable by defaultGravatar vladmos2017-07-11
| | | | | | | | | | Simplify the code by providing the default implementation of `SkylarkValue$isImmutable` that always returns false. All objects are considered mutable unless their `isImmutable` method is overridden. This change doesn't affect the current behavior. PiperOrigin-RevId: 161422029
* Update documentation on ctx.actions.declare_directory and File.Gravatar dslomov2017-07-10
| | | | | | | Fixes #3345. RELNOTES: None. PiperOrigin-RevId: 161395466
* Fix memory regression from CL/160891204.Gravatar tomlu2017-07-10
| | | | | | | | | Java compile actions create unnecessary wrapper objects around a shared constant object. We can share the ActionEnviroment between these actions. In the general spawn case there will be a lot of empty action environments. Make sure that these are shared too. RELNOTES: None PiperOrigin-RevId: 161389056
* Clean up string representations for artifactsGravatar vladmos2017-07-10
| | | | | | | | | If --incompatible_descriptive_string_representations is passed, artifacts are converted to strings using `str`, `repr` and `print` functions differently (more descriptive, without leaking information that shouldn't be accessible). PiperOrigin-RevId: 161230209
* Simplify the ActionInputFileCacheGravatar ulfjack2017-07-06
| | | | | | | | | Add a single getMetadata method (matching MetadataHandler), and rewrite everything in those terms. This is in preparation for merging ActionInputFileCache and MetadataHandler. PiperOrigin-RevId: 161053535
* Allow the remote server to set its own default action timeout when Bazel ↵Gravatar olaola2017-07-05
| | | | | | | does not have one. Hardcoded value of 120 seconds is clearly a mistake. TESTED=remote worker PiperOrigin-RevId: 160891214
* Update SpawnAction to take an ActionEnvironmentGravatar ulfjack2017-07-05
| | | | | | | | | | Some of the callers are not using the proper one from the configuration, and are thus ignoring --action_env. Some are only using part of the configuration's action environment. I tried to carefully not change the semantics in any case. Semantic-changing changes come later. PiperOrigin-RevId: 160891204