aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/test/java/com/google/devtools/build/skyframe/MemoizingEvaluatorTest.java
Commit message (Collapse)AuthorAge
* Singleton-ify ErrorTransienceValueGravatar Michajlo Matijkiw2015-10-22
| | | | | | | | | | | | | | We rely on ErrorTransienceValue being different across evaluations by way of java reference inequality, instead make it a singleton and make it so that ErrorTransienceValue compares equal to nothing, including itself. Alternatively we could attach the corresponding Version to ErrorTransienceValue and use that to force inequality across evaluations. However this gets into the different possible Version implementations and their varying semantics, so go with the simplest approach first and see how it works out. -- MOS_MIGRATED_REVID=106001826
* Remove wildcard of SkyFunctionName, as it is finalGravatar Mark Schaller2015-10-22
| | | | | | | Nothing can extend SkyFunctionName. It's final. -- MOS_MIGRATED_REVID=105989976
* Minor cleanups to GraphTesterGravatar Mark Schaller2015-10-22
| | | | | | | | Refactors SkyFunction map creation into the tester from tests. Encapsulates modifiedValues better. -- MOS_MIGRATED_REVID=105982046
* Keep track of any RuntimeExceptions thrown during evaluation. Previously, ↵Gravatar Janak Ramakrishnan2015-10-21
| | | | | | | RuntimeExceptions that were thrown after an InterruptedException was thrown would be swallowed. -- MOS_MIGRATED_REVID=105902192
* Don't assert presence of root causes if they're not persistently stored.Gravatar Janak Ramakrishnan2015-10-21
| | | | | -- MOS_MIGRATED_REVID=105889244
* Move to using "well-known" SkyFunctionNames in tests exercising graphGravatar Michajlo Matijkiw2015-10-16
| | | | | -- MOS_MIGRATED_REVID=105539869
* Make Skyframe tests resilient to root causes not being stored.Gravatar Janak Ramakrishnan2015-10-07
| | | | | -- MOS_MIGRATED_REVID=104791799
* 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
* Don't remove reverse deps until node is known to be changed. This helps ↵Gravatar Janak Ramakrishnan2015-09-23
| | | | | | | avoid mutating the deps of nodes that are still going to be deps after evaluation is finished. -- MOS_MIGRATED_REVID=103659429
* Mark root causes as transient. Serializing nested sets is annoying, and ↵Gravatar Janak Ramakrishnan2015-09-21
| | | | | | | since ErrorInfo doesn't override equality, there's no issue with preserving equality for now. -- MOS_MIGRATED_REVID=103414237
* 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 bit more testing coverage to MemoizingEvaluatorTest.Gravatar Janak Ramakrishnan2015-09-03
| | | | | -- MOS_MIGRATED_REVID=102265945
* 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
* Deflake MemoizingEvaluatorTest#shutDownBuildOnCachedError_Verified from the ↵Gravatar Janak Ramakrishnan2015-09-02
| | | | | | | deflaking I just did. -- MOS_MIGRATED_REVID=102149874
* Mostly deflake MemoizingEvaluatorTest#shutDownBuildOnCachedError_Verified by ↵Gravatar Janak Ramakrishnan2015-09-02
| | | | | | | | | ensuring that the shutdown signaler starts before we do other things. Also store assertion errors in the unexpected exception variable, as opposed to allowing them to get swallowed. Note that there's still some flakiness, hence the especially verbose error messages. -- MOS_MIGRATED_REVID=102089689
* Allow value equality in some MemoizingEvaluatorTest tests.Gravatar Janak Ramakrishnan2015-08-31
| | | | | -- MOS_MIGRATED_REVID=101818063
* Don't mark ErrorInfo transient if one of its child ErrorInfos is transient.Gravatar Janak Ramakrishnan2015-08-26
| | | | | | | | | Parents should depend on their children's transience to force their re-evaluation, not say directly that they are transient. This can lead to an inconsistency between whether an ErrorInfo says it is transient and whether the node depends on the ErrorTransienceValue. This should reduce the number of edges in the graph in case of transient error without sacrificing correctness. -- MOS_MIGRATED_REVID=101537029
* Allow ErrorTransienceValue to be added back as a dep during change pruning ↵Gravatar Janak Ramakrishnan2015-08-26
| | | | | | | | | if it isn't newer than the current node. ErrorTransienceValue has to be treated specially during pruning because normally deps added during pruning remain if the node is actually rebuilt. The whole point of ErrorTransienceValue is that on a re-evaluation, the node may not depend on it anymore. So we have special logic to force a rebuild if the ErrorTransienceValue has changed. If it hasn't, however, it is ok for pruning to add it back as a dep -- we'll end up marking this value clean, since ErrorTransienceValue is always the last dep. -- MOS_MIGRATED_REVID=101522197
* Add keepGoing version of MemoizingEvaluatorTest#changeCycle.Gravatar Janak Ramakrishnan2015-08-24
| | | | | -- MOS_MIGRATED_REVID=101245691
* Fix some nits and allow alternate evaluators to use MemoizingEvaluatorTest.Gravatar Janak Ramakrishnan2015-08-21
| | | | | -- MOS_MIGRATED_REVID=101150250
* 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
* Make two Skyframe nodes with the same events and values equal.Gravatar Janak2015-07-13
| | | | | | | | | | | | | | | | | | | | | | We do this by implementing equality for TaggedEvents (and all objects it transitively includes). Before this change, if a Skyframe node re-evaluated to the same value as in the previous build, but had (transitive) events, change pruning would not cut off the evaluation of its parents. This is not a big issue in practice because most nodes that would re-evaluate to the same value (like FileValues or GlobValues) never emit events, and others (like ActionExecutionValues) have secondary caches that mask this effect. Also do a drive-by fix where we were using the hash code of a nested set instead of the shallow hash code (didn't have any bad effects in practice because we never hash these values). (Minor formatting clean-ups from https://bazel-review.googlesource.com/1610 ) -- Change-Id: I751a8479627f0456993c5ec8834528aeb593d736 Reviewed-on: https://bazel-review.googlesource.com/1610 MOS_MIGRATED_REVID=98115908
* Fix race condition in MemoizingEvaluatorTest#cycleAndErrorAndReady.Gravatar Janak Ramakrishnan2015-05-15
| | | | | | | | | If otherTop did not enqueue its dep for evaluation before errorKey threw, its dep would never be enqueued and therefore never signal. This used to be ok because we didn't shut the threadpool down as aggressively. The fix is just to delay the actual throwing of errorKey until otherTop is signaled. -- MOS_MIGRATED_REVID=93349168
* Ensure invariant that a no-keep-going build terminates as soon as it ↵Gravatar Janak Ramakrishnan2015-05-01
| | | | | | | | | encounters a node with an error. We were doing this in most cases, but not if the error was in a node that was already done or was revalidated during change pruning. -- MOS_MIGRATED_REVID=92521223
* Fixed up test that assumed a certain order in which deps, within the same ↵Gravatar Nathan Harmata2015-03-27
| | | | | | | dependency group, were checked for dirtiness. -- MOS_MIGRATED_REVID=89658366
* Inform EvaluationProgressReceiver of nodes that are built in error.Gravatar Janak Ramakrishnan2015-03-13
| | | | | | | | | This allows the pending action counter to be decremented correctly when in --keep_going mode. As part of this, there's a small refactor in ParallelEvaluator that also fixes a potential bug, that nodes in error were signaling their parents with the graph version as opposed to their actual version. Because errors never compare equal (ErrorInfo doesn't override equality), this isn't an issue in practice. But it could be in the future. -- MOS_MIGRATED_REVID=88395500
* Update from Google.Gravatar Han-Wen Nienhuys2015-02-25
-- MOE_MIGRATED_REVID=85702957