commit | 72d5db195fe79ed5e1c1f473df125b89a9ec4af0 | [log] [tgz] |
---|---|---|
author | Googler <leba@google.com> | Thu Aug 31 06:53:11 2023 -0700 |
committer | Copybara-Service <copybara-worker@google.com> | Thu Aug 31 06:54:19 2023 -0700 |
tree | dffed6b05ff1ae9a5c2f45c88878080f6b2ef037 | |
parent | d784ef0be344d355d97e1c871ca914348c0c45c0 [diff] |
New implementation of IncrementalArtifactConflictFinder. With Skymeld, conflict checking has to be done incrementally the moment each top level target's analysis is finished. We're essentially trying to ensure 2 goals: 1. For the "happy path", no extra ALV is traversed, and 2. For the conflict case, no top level target is allowed to enter execution without making sure that there's no conflict in its actions. Some past solutions that didn't quite work: - If we use a naive global visited set of ALKs to prune traversal, we achieve (goal#1) but fail (goal#2) - If we only add ALKs to this set when we know these ALKs are conflict-free, we achieve (goal#2) but fail (goal#1) To achieve both, we use the following algorithm: 1. [Sequential portion] Sequentially collect the ALVs in the transitive closure of a top level target. Store the visited keys in a set and use that to prune the next traversals. 2. [Concurrent portion] Concurrently check the actions in the collected ALVs. 3. Finalize the conflict checking of the ith top level key only if that of the (i - 1)th key is finalized. 4. If there's a conflict detected at any point, rerun the check for the unfinished keys without pruning (the full transitive closure would be visited). More detailed explanations can be found in the code comment. Also removed some obsolete tests (because we changed the conflict checking implementation). The existing integration tests should ensure a consistent user facing behavior. PiperOrigin-RevId: 561641710 Change-Id: I7ee3954619060ba44a41a4b215c450f2c6592891
{Fast, Correct} - Choose two
Build and test software of any size, quickly and reliably.
Speed up your builds and tests: Bazel rebuilds only what is necessary. With advanced local and distributed caching, optimized dependency analysis and parallel execution, you get fast and incremental builds.
One tool, multiple languages: Build and test Java, C++, Android, iOS, Go, and a wide variety of other language platforms. Bazel runs on Windows, macOS, and Linux.
Scalable: Bazel helps you scale your organization, codebase, and continuous integration solution. It handles codebases of any size, in multiple repositories or a huge monorepo.
Extensible to your needs: Easily add support for new languages and platforms with Bazel's familiar extension language. Share and re-use language rules written by the growing Bazel community.
Follow our tutorials:
To report a security issue, please email security@bazel.build with a description of the issue, the steps you took to create the issue, affected versions, and, if known, mitigations for the issue. Our vulnerability management team will respond within 3 working days of your email. If the issue is confirmed as a vulnerability, we will open a Security Advisory. This project follows a 90 day disclosure timeline.
See CONTRIBUTING.md