aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/test/java/com/google/devtools/build/skyframe/ParallelEvaluatorTest.java
Commit message (Collapse)AuthorAge
* Allow Skyframe tests to use the NotifyingGraph and DeterministicGraph ↵Gravatar Janak Ramakrishnan2016-05-11
| | | | | | | helpers to enforce concurrency synchronization points and determinism even if they are not using an InMemoryGraph-backed evaluator. -- MOS_MIGRATED_REVID=121977783
* Use static creation method for SkyKey. This allows interning SkyKeys as they ↵Gravatar Janak Ramakrishnan2016-03-03
| | | | | | | are created, as opposed to when they are requested from the ParallelEvaluator. That delay can lead to large memory spikes and churn. -- MOS_MIGRATED_REVID=116224565
* Intern IntVersions.Gravatar Janak Ramakrishnan2016-01-28
| | | | | -- MOS_MIGRATED_REVID=113197641
* Fix SkyframeBuilder's error handling, and change the contract of ↵Gravatar Janak Ramakrishnan2016-01-28
| | | | | | | | | | | EvaluationResult to return true for hasError() iff errorMap is non-empty or there is a catastrophe. There was no good reason for the previous behavior of saying hasError even if there was a transitive recovered-from error, since callers shouldn't care. This was a latent bug that was only benign since none of the consumers of hasError were invoking Skyframe with recoverable SkyFunctions. Also add an EvaluationResultSubject so that tests can more fluently assert things about EvaluationResult objects going forward. -- MOS_MIGRATED_REVID=113192415
* Add catastrophe field to EvaluationResult so that callers can identify the ↵Gravatar Janak Ramakrishnan2016-01-04
| | | | | | | | | cause of a catastrophic failure (this is distinct from a crash). Also clean up catastrophe logic in ParallelEvaluator -- the catastrophic nature of an exception is important only if the build is keep_going, and only if the exception is catastrophic can we have an exception in the first place. -- MOS_MIGRATED_REVID=111293164
* Migrate blaze from their own duplicated copy of MoreAsserts and use Truth ↵Gravatar Googler2015-11-11
| | | | | | | instead. -- MOS_MIGRATED_REVID=107480889
* Remove unnecessary use of Reporter.Gravatar Ulf Adams2015-10-27
| | | | | -- MOS_MIGRATED_REVID=106410378
* Simplify uses of EventCollector.Gravatar Ulf Adams2015-10-27
| | | | | -- MOS_MIGRATED_REVID=106389517
* Minor cleanups to GraphTesterGravatar Mark Schaller2015-10-22
| | | | | | | | Refactors SkyFunction map creation into the tester from tests. Encapsulates modifiedValues better. -- MOS_MIGRATED_REVID=105982046
* Make ParallelEvaluatorTest#unrecoverableError failure messages more informative.Gravatar Janak Ramakrishnan2015-10-13
| | | | | -- MOS_MIGRATED_REVID=105312124
* Don't iterate over children when building events if events won't be stored ↵Gravatar Janak Ramakrishnan2015-10-12
| | | | | | | anyway. Also batch retrievals of children when building events. -- MOS_MIGRATED_REVID=105174435
* 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
* Fix Bazel breakageGravatar Damien Martin-Guillerez2015-09-11
| | | | | -- MOS_MIGRATED_REVID=102835622
* Delay cleaning of in-flight nodes until the following build. This allows us ↵Gravatar Janak Ramakrishnan2015-09-11
| | | | | | | | | to interrupt evaluation in constant time. Some ParallelEvaluator tests that implicitly relied on cleaning happening before the next evaluation were moved into MemoizingEvaluatorTest as a result. -- MOS_MIGRATED_REVID=102696653
* Automatically record exceptions and assert that there aren't any when using ↵Gravatar Janak Ramakrishnan2015-09-09
| | | | | | | NotifyingInMemoryGraph in tests. -- MOS_MIGRATED_REVID=102616906
* Add a method to EvaluationProgressReceiver for getting information on ↵Gravatar Nathan Harmata2015-09-03
| | | | | | | SkyFunction#compute calls. -- MOS_MIGRATED_REVID=102268773
* Use TrackingAwaiter properly to track lost exceptions. Using the static ↵Gravatar Janak Ramakrishnan2015-09-02
| | | | | | | method wasn't guaranteed to catch all bugs. Also convert to a singleton since there's no reason to have multiple instances. -- MOS_MIGRATED_REVID=102158719
* Convert evaluated tracking to take a lazy SkyValueGravatar Mark Schaller2015-08-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The EvaluationProgressReceiver#evaluated method took a SkyValue, but that parameter was only used by some of its implementations, and only under some conditions. Outside of tests, the main users are SkyframeBuildView's ConfiguredTargetValueInvalidationReceiver and SkyframeBuilder's ExecutionProgressReceiver. The former builds up a set of built ConfiguredTarget keys when the SkyValue is non-null and the EvaluationState is BUILT, and so its nullity check can live behind those two conditions. The latter cares about builting up a set of ConfiguredTargets, and raising events on the eventBus when a TARGET_COMPLETION or ASPECT_COMPLETION value is evaluated and is non-null. The extraction of these values can live behind the conditions that check the type of the SkyKey. By making the SkyValue parameter lazy, this change enforces that it's only accessed under these conditions. This CL introduces a semantic change that should be small in effect. The SkyframeBuildView keeps track of a set, dirtiedConfiguredTargetKeys, and ConfiguredTarget keys evaluated as CLEAN were removed from it if they had a non-null value. With this change, ConfiguredTarget keys evaluated as CLEAN get removed regardless of whether their values are null or non-null. The set is used to determine whether artifact conflict search has to be rerun, and the extra removals that result from this CL could cause fewer artifact conflict searches to run, but the only affected searches would be those that were caused by dirtied configured target values in error all of which were subsequently marked as clean, which is probably rare. -- MOS_MIGRATED_REVID=101144655
* Convert invalidated tracking from per-value to per-keyGravatar Mark Schaller2015-08-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The primary user of invalidation tracking is the SkyframeBuildView, which monitored which ConfiguredTargetValues were invalidated. It did that so the SkyframeExecutor could limit its search for artifact conflicts to when the set of configured targets in the build changed. For the newly introduced set of dirtied keys, "dirtiedConfiguredTargetKeys" in SkyframeBuildView, to be as useful as the "dirtyConfiguredTargets" set it replaced, the ConfiguredTargetValueInvalidationReceiver must only remove a key from the set if it was found to be clean when it was re-evaluated. If it was rebuilt, then the key must stay in the set, to represent that the set of configured target values has truly changed. This CL introduces a semantic change that hopefully has a small effect, if any. Previously, the informInvalidationReceiver method in InvalidatingNodeVisitor only informed the invalidationReceiver when a non-null value was invalidated. (This is usually, but not always, equivalent to a non-error value. The uncommon exception is that in keep-going builds, some nodes with errors may also have values, and the invalidator would inform the receiver when such a node was invalidated.) Now, the receiver is informed that a node is invalidated regardless of whether its value is null. Because the receiver uses this information to determine whether artifact conflict search has to be rerun, and that search is expensive, it's possible this change will negatively impact performance. However, the only way an extra search could be invoked is if the invalidated configured target nodes are all in error. That seems like it would happen rarely, if at all. Further cleanup of unused SkyValues returned by markDirty to come in a subsequent CL. -- MOS_MIGRATED_REVID=100304744
* Merge JunitTestUtils into MoreAsserts; update all callers.Gravatar Ulf Adams2015-07-23
| | | | | -- MOS_MIGRATED_REVID=98914195
* Pass filter for what events should be stored in the Skyframe graph into the ↵Gravatar Janak Ramakrishnan2015-07-16
| | | | | | | ParallelEvaluator, to allow users to customize which events they want to store. -- MOS_MIGRATED_REVID=98299604
* Remove unused SkyFunctionName isComputed.Gravatar Michajlo Matijkiw2015-06-26
| | | | | | | | | Removing since we don't appear to need it. Replaced SkyFunctionName.computed with create to simplify changing everything. Moved all constructors using new to use create for consistency. Chose create over new since it was less changes. -- MOS_MIGRATED_REVID=96914199
* Fix for flaky hanging unit testGravatar Mark Schaller2015-03-05
| | | | | | | | | | | | | | | | | | | | | | Rarely, the raceConditionWithNoKeepGoingErrors_InflightError unit test would timeout because the "errorKey" node's error caused preventNewEvaluations to be called before the otherKey node started evaluation. The "otherKey" node's function decrements a CountdownLatch that the test waits on. Usually both nodes' functions would start evaluating before preventNewEvaluations was called, but this wasn't guaranteed. This change makes the execution of the unit test deterministic. Both nodes will begin evaluation before either finishes. The "otherErrorKey" node will wait for "errorKey" to commit before trying to get its value. The "otherErrorKey" compute function will get called exactly once because its dependency on "errorKey" will not be registered because "errorKey" errored first and in nokeep_going mode only the first erroring node's dependencies are registered. -- MOS_MIGRATED_REVID=87657504
* Reenable Mac tests, but without ParallelEvaluatorTests.Gravatar Han-Wen Nienhuys2015-02-20
| | | | | -- MOS_MIGRATED_REVID=86780976
* Don't assert in method that is called on other thread.Gravatar Han-Wen Nienhuys2015-02-17
| | | | | -- MOS_MIGRATED_REVID=86478884
* Update from Google.Gravatar Han-Wen Nienhuys2015-02-25
-- MOE_MIGRATED_REVID=85702957