aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/skyframe/ActionExecutionFunction.java
Commit message (Collapse)AuthorAge
* Support for handling TreeArtifact metadata and returning TreeArtifacts from ↵Gravatar Michael Thvedt2016-02-09
| | | | | | | ArtifactFunction. -- MOS_MIGRATED_REVID=114174899
* Rename MiddlemanExpander to ArtifactExpander, and refactor it to yield ↵Gravatar Michael Thvedt2016-02-09
| | | | | | | ArtifactFiles. -- MOS_MIGRATED_REVID=114166208
* Allow an exit code to be specified in the ActionExecutionException when an ↵Gravatar Googler2016-01-25
| | | | | | | | | action fails, and propagate the exit code to BuildFailedException. And update all call sites that copy or wrap ActionExecutionExceptions. -- MOS_MIGRATED_REVID=112811857
* Use Bazel Preconditions variant which avoids varargs array creationGravatar Mark Schaller2015-12-10
| | | | | | | Reduces garbage. -- MOS_MIGRATED_REVID=109914243
* Fail build gracefully if an action discovers unexpected inputs.Gravatar Janak Ramakrishnan2015-12-08
| | | | | | | | | | | | | | | | | | | Blaze discovers inputs for some actions when running with some strategies. Those actions should not discover additional inputs when they run, regardless of the strategy they end up using. There are now no known legitimate cases of such additional input discovery, so we should reinstate this check and find new ones :) We also change the failure mode to be a normal error rather than a crash. This error does indicate a tooling issue, and a small chance of incorrect builds, but it doesn't create such an inconsistent state that a crash is warranted. -- Change-Id: I5d498d2fc1c5e23bfb5d77971f866c2027cbf03a Reviewed-on: https://bazel-review.googlesource.com/#/c/2500/3 MOS_MIGRATED_REVID=109703508
* When getting package roots for exec paths, don't start with the file, which ↵Gravatar Janak Ramakrishnan2015-11-13
| | | | | | | is guaranteed not to be a package. Instead, start with its parent. This will be faster and take less memory. -- MOS_MIGRATED_REVID=107725767
* Add debugging info in case of unexpected crash.Gravatar Janak Ramakrishnan2015-10-06
| | | | | -- MOS_MIGRATED_REVID=104658639
* Rationalize copyright headersGravatar Damien Martin-Guillerez2015-09-25
| | | | | | | | | | | The headers were modified with `find . -type f -exec 'sed' '-Ei' 's|Copyright 201([45]) Google|Copyright 201\1 The Bazel Authors|' '{}' ';'` And manual edit for not Google owned copyright. Because of the nature of ijar, I did not modified the header of file owned by Alan Donovan. The list of authors were extracted from the git log. It is missing older Google contributors that can be added on-demand. -- MOS_MIGRATED_REVID=103938715
* Move Label from the lib.syntax to the lib.cmdline package so that:Gravatar Lukacs Berki2015-09-21
| | | | | | | | | | - Label parsing can be simplified - lib.syntax is only contains the code for Skylark and is reasonably independent from the problem domain of building things This change is mostly only changes to imports declarations. The rest is reversing the dependency between :cmdline and :syntax and moving a tiny amount of code between Printer and FilesetEntry and the addition of SkylarkPrintableValue that I couldn't be bothered to separate out into its own change. -- MOS_MIGRATED_REVID=103527877
* Make exception in case a test tries to remote-log more informative.Gravatar Janak Ramakrishnan2015-09-17
| | | | | -- MOS_MIGRATED_REVID=103290841
* Move PackageIdentifier to cmdlineGravatar Kristina Chodorow2015-08-31
| | | | | | | | This is necessary to have TargetResolver depend on it without making it depend on the packages target. First step of #389. -- MOS_MIGRATED_REVID=101790345
* Actions can now request Skyframe dependencies and bypass action cache checking.Gravatar Laszlo Csomor2015-07-10
| | | | | | | | | | By implementing the SkyframeAwareAction interface an Action gains the power to request Skyframe dependencies after its declared inputs have been built and discovered but before execution. Such actions bypass the action cache check and rely on Skyframe's dependency tracking to decide when to be reexecuted. -- MOS_MIGRATED_REVID=97947856
* Relax invariant that an action's inputs discovered during execution must be ↵Gravatar Janak Ramakrishnan2015-07-01
| | | | | | | | | included in the action's inputs as found during the input discovery phase. We still require that no new metadata be discovered -- in other words, the "new" inputs are likely just symlinks to old inputs, with different nominal paths. -- MOS_MIGRATED_REVID=97257026
* Move dependency declaration out of finally block.Gravatar Janak Ramakrishnan2015-07-01
| | | | | | | This means that we will not declare additional dependencies if the action fails to execute, but that's correct -- if the action fails to execute, its inputs aren't updated, so there's nothing we'd discover. -- MOS_MIGRATED_REVID=97255120
* Add some utilities and relax some visibility restrictions to make ↵Gravatar Janak Ramakrishnan2015-06-19
| | | | | | | alternative include scanning implementations possible. -- MOS_MIGRATED_REVID=96337469
* Handle exceptions encountered resolving packages during the execution phaseGravatar Michajlo Matijkiw2015-06-10
| | | | | | | | | | | | | | Currently we may do lookups of not-already-cached packages during the execution phase for actions that discover inputs. Exceptions encountered during this would go unhandled and result in a crash. Here we introduce PackageRootResolutionException which wraps these exceptions and triggers an ActionExecutionException which is cleanly handled in the exec phase. As part of this change SkyframeActionExecutor#getArtifactRoots(...) will fail properly on errors getting package roots. -- MOS_MIGRATED_REVID=95578891
* Add runfiles to metadata caches and make them isFile awareGravatar Michajlo Matijkiw2015-05-26
| | | | | -- MOS_MIGRATED_REVID=94318260
* Allow globs to be used outside of the skyframe package.Gravatar Janak Ramakrishnan2015-05-15
| | | | | -- MOS_MIGRATED_REVID=93647914
* Mostly-automated roll-forward to return ActionInput objects from the ↵Gravatar Janak Ramakrishnan2015-04-06
| | | | | | | | | | | ActionInputFileCache when given a digest to do a reverse lookup so that metadata can be more easily retrieved. Discovered inputs are no longer ever put into SingleBuildFileCache, so it is safe to roll this forward now Because of code changes (meant to ensure the safety of this change), there were conflicts that had to be manually resolved. -- MOS_MIGRATED_REVID=90425783
* Split FileAndMetadataCache into two classes, since most of the shared ↵Gravatar Janak Ramakrishnan2015-04-06
| | | | | | | functionality is gone. -- MOS_MIGRATED_REVID=90289916
* Resolve inputs that were stored in action cache ahead of time so metadata ↵Gravatar Janak Ramakrishnan2015-03-30
| | | | | | | | | | | for them can be retrieved with other inputs, avoiding a restart. This also allows us to delete the UndeclaredInputsHandler, since we eagerly cache metadata before entering any ActionCacheChecker methods. This should also allow us to split FileAndMetadataCache into two separate classes, as well as asserting that SingleBuildFileCache only sees non-artifact ActionInputs. To be done in follow-ups. -- MOS_MIGRATED_REVID=89718712
* Move action-cache updating to inside ActionExecutionFunction, in preparation ↵Gravatar Janak Ramakrishnan2015-03-30
| | | | | | | | | for allowing it to be restarted in case of missing deps. Note that this means that action-cache writing is no longer part of the ACTION_COMPLETE profiling unit. -- MOS_MIGRATED_REVID=89702039
* Fix bug where inputs are updated from action cache but not tracked in Skyframe.Gravatar Janak Ramakrishnan2015-03-26
| | | | | | | This bug, and all of them like it, will be fixed in an upcoming cl that makes sure all input metadata is obtained through Skyframe. But I think we should have this fix now. -- MOS_MIGRATED_REVID=89540265
* Rolling forward rolled back change that did declared dependencies on ↵Gravatar Janak Ramakrishnan2015-03-23
| | | | | | | discovered inputs before execution, since the underlying cause has been fixed and a test has been added. -- MOS_MIGRATED_REVID=89134131
* Delay updating inputs of an action when processing the action cache until it ↵Gravatar Janak Ramakrishnan2015-03-20
| | | | | | | | | | | is known that the action is a cache hit. This adds momentary memory overhead when checking the action cache, but should prevent a host of potential errors. Note that this cl assumes that an action that discovers its inputs does *not* take the names of its inputs into account when calculating its key, which is already stated as part of the javadoc of Action#getKey. -- MOS_MIGRATED_REVID=88971626
* Automated [] rollback of [].Gravatar Ulf Adams2015-03-16
| | | | | | | | | | | | | | | | | *** Reason for rollback *** Broke one of our integration tests. *** Original change description *** Declare dependencies on discovered inputs before execution instead of after. As a side effect, we no longer restart ActionExecutionFunction after the action has executed unless the action ran locally (and therefore didn't discover its inputs beforehand). This also means that we no longer need to store an out-of-Skyframe cache for discovered includes except when checking the action cache. Since my suspicion is that the out-of-Skyframe cache will have a minimal performance impact once it is just... *** -- MOS_MIGRATED_REVID=88724988
* Declare dependencies on discovered inputs before execution instead of after.Gravatar Janak Ramakrishnan2015-03-13
| | | | | | | | | | | As a side effect, we no longer restart ActionExecutionFunction after the action has executed unless the action ran locally (and therefore didn't discover its inputs beforehand). This also means that we no longer need to store an out-of-Skyframe cache for discovered includes except when checking the action cache. Since my suspicion is that the out-of-Skyframe cache will have a minimal performance impact once it is just being used for the action cache, I may delete it in a follow-up cl. After this change, we will overapproximate the set of includes because we depend on all includes, rather than just the ones that the action was found to depend on after execution. This is a prerequisite for Skyframe-native include scanning in that Skyframe-native include scanning will need to add at least as many Skyframe nodes and edges. If we end up punting on it, then we may want to revert this change. But for now I think it's worth having. I'll run some more numbers to see what the actual performance impact is. -- MOS_MIGRATED_REVID=88492955
* Add OutErr#close, and call that in test strategies.Gravatar Han-Wen Nienhuys2015-02-18
| | | | | | | | This fixes "Text file is busy" when trying to execute log files for local tests just after blaze finishes. -- MOS_MIGRATED_REVID=86597766
* Replace some calls to ArtifactFactory.resolveSourceArtifact(PathFragment ↵Gravatar Marian Lobur2015-02-11
| | | | | | | execPath), with a skyframe native implementation ArtifactFactory.resolveSourceArtifact(Iterable<PathFragment> execPaths, PackageRootResolver resolver). -- MOS_MIGRATED_REVID=86062289
* Update from Google.Gravatar Han-Wen Nienhuys2015-02-25
-- MOE_MIGRATED_REVID=85702957