Skip to content
Snippets Groups Projects
This project is mirrored from https://github.com/bazelbuild/bazel.git. Pull mirroring updated .
  1. Mar 28, 2023
    • Xùdōng Yáng's avatar
      [6.2.0] Add native.module_{name,version} (#17893) · 99b3f386
      Xùdōng Yáng authored
      * Remove BzlmodRepoRuleHelper
      
      The helper logic is only used in the BzlmodRepoRuleFunction so no need to have it in a separate place.
      - Remove BzlmodRepoRuleHelper Interface & its implementations
      - Refactor BzlmodRepoRuleFunction to use the helper logic
      - Update tests and Build files accordingly
      
      PiperOrigin-RevId: 486712547
      Change-Id: I9a274a6a0afcc77be56bbe20e0c4d17c41c31c58
      
      * Separate selection from bazel dependency graph
      
      * Created new K/F/V for Bazel dependency graph named "BazelDepGraph"
      * Refactored "BazelModuleResolution" to only run resolution (discovery, selection and checks) to create pruned and unpruned graph and not create any dependency value
      * BazelDepGraphResolution calls BazelModuleResolution and extracts the dependency graph from it
      * Updated tests
      
      PiperOrigin-RevId: 499026445
      Change-Id: Id1237f9d09015ffe8987d933431fccfcfa0c0963
      
      * Add native.module_{name,version}
      
      Extension authors often want to write some macro and change its behavior depending on which module is using it. For example, for rules_go, they want to look at the `go_deps` tags in a certain module and only allow access to repos generated from those tags.
      
      We do this by introducing two new methods on `native`, callable only during the loading phase. They return the name and version of the module associated with the current repo. If the repo is from WORKSPACE, they return `None`. If the repo is generated by an extension, they return info about the module hosting the extension.
      
      The implementation works by storing the "associated module" information in `RepositoryMappingValue`. I had attempted to store them in `BzlmodRepoRuleValue` or even `RepositoryDirectoryValue`, but those are not the right places since they might happen before we even evaluate the MODULE.bazel file (i.e. for non-registry overrides).
      
      Fixes https://github.com/bazelbuild/bazel/issues/17652
      
      .
      
      RELNOTES: Added `native.module_name()` and `native.module_version()` to allow BUILD macro authors to acquire information about which Bazel module the current repo is associated with.
      PiperOrigin-RevId: 518849334
      Change-Id: I06b4bc95b5a57de2412ee02544240b054c708165
      
      * fix BUILD
      
      * remove test case that was accidentally cherry-picked
      
      ---------
      
      Co-authored-by: default avatarsalma-samy <salmasamy@google.com>
      Co-authored-by: default avatarkshyanashree <109167932+kshyanashree@users.noreply.github.com>
      99b3f386
    • kshyanashree's avatar
      Add suggestions to invalid tag class errors (#17896) · 10792ce9
      kshyanashree authored
      
      Closes #17888.
      
      PiperOrigin-RevId: 519729739
      Change-Id: I0ae8b18acd1a88de4da40b6883cf24c5ce6586bb
      
      Co-authored-by: default avatarFabian Meumertzheim <fabian@meumertzhe.im>
      10792ce9
  2. Mar 27, 2023
  3. Mar 24, 2023
    • kshyanashree's avatar
      Use less subshells and `tee`s in running tests with `bazel run`. (#17869) · b8e92cc5
      kshyanashree authored
      
      Fixes #17754.
      
      What we have seen prior to this change was that sometimes for quick tests the output was swallowed. After a lot of poking it became clear that the culprit is the use of subshell and `tee`, e.g. if you remove `tee` completely from the picture the behavior never shows up.
      
      The issue is that with a fast test, `tee` seems to be killed (or its parent subshell) before the printing the output to stdout.
      
      With this change, we reduce the number of subshells and processes to set up and reduce the chance of the race condition but not remove it.
      
      However, for practical purposes, the race condition is gone.
      
      With the reproduction steps in #17754, and this command
      ```
      for i in {1..10000}; do /tmp/bazel run :foo &> /tmp/log ; grep -q "useful echo" /tmp/log ; if [ $? -eq 0 ]; then echo -n '+'; else  echo -n '-'; fi; done
      ```
      a bazel from head fails ~3900 out of 10000 times.
      
      After this commit, it never failed.
      
      Closes #17846.
      
      PiperOrigin-RevId: 518794237
      Change-Id: I8c1862d3a274799b864f0f5f42b85d6df5af78c7
      
      Co-authored-by: default avatarTobias Werth <twerth@google.com>
      b8e92cc5
    • Alexandre Rostovtsev's avatar
      Relax JSON parser, ensure duplicate keys are overridden (#17868) · dee2ac05
      Alexandre Rostovtsev authored
      
      Resolves #15605
      
      Closes #17645.
      
      PiperOrigin-RevId: 514491743
      Change-Id: I17ea9fb57682b668bff02bc64fefd75edb2cf2ee
      
      Co-authored-by: default avatarAdam Lavin <adam@lavoaster.co.uk>
      dee2ac05
  4. Mar 23, 2023
  5. Mar 21, 2023
    • kshyanashree's avatar
      Rework ByteStreamUploader early return logic. (#17832) · f03abe03
      kshyanashree authored
      There are several points where ByteStreamUploader may discover that the server already has the blob fully uploaded. These points tried to effect an early return from the upload code, generally by "lying" to higher layers that the upload fully finished. That could lead to bugs. For example, consider the added test case: A compressed upload completes its writing but receives an error instead of a server ACK. On retry, QueryWriteStatus reveals the blob exists and returns its uncompressed size. This confused the checkCommittedSize logic, which expected the final committed size of a compressed upload to be the total compressed data size or -1. The code added by https://github.com/bazelbuild/bazel/commit/daa3dbe22adb03338c75b53ea97954c9434099b4
      
       also looks broken in the case of compressed uploads.
      
      Rework the uploader code, so that early returns throw a AlreadyExists exception. The exception control flow naturally reflects the desire to escape quickly to the top level.
      
      Closes #17791.
      
      PiperOrigin-RevId: 517389227
      Change-Id: I23a2ae92fd4ad27dad750418c128c0d0b245e573
      
      Co-authored-by: default avatarBenjamin Peterson <benjamin@engflow.com>
      f03abe03
    • kshyanashree's avatar
      Fix seeking of empty chunkers. (#17830) · 44aa3b8d
      kshyanashree authored
      
      Empty chunkers are strange in that they emit one empty chunk and then end. This change makes them properly resetable. Previously, reset() on a empty chunker could result in a NullPointerException.
      
      Also, it's important to call close() on the underlying data stream even if it's empty.
      
      Closes #17797.
      
      PiperOrigin-RevId: 517119206
      Change-Id: Iff7908d6cd0633aa2a355ea89f8e647a9fefffcd
      
      Co-authored-by: default avatarBenjamin Peterson <benjamin@engflow.com>
      44aa3b8d
    • keertk's avatar
      [6.2.0] Allows --query_file to be used for cquery and aquery too. (#17823) · ee32efff
      keertk authored
      Fixes https://github.com/bazelbuild/bazel/issues/12924.
      
      RELNOTES[NEW]: The aquery and cquery commands now respect the --query_file flag just like the query command.
      
      PiperOrigin-RevId: 487689456
      Change-Id: Ia2c9d85e88fdf769a823eaf7b6585a77d654ae70
      ee32efff
    • kshyanashree's avatar
      [6.2.0]Add support for alias targets to cquery's `providers` (#17786) · a87b8e0b
      kshyanashree authored
      
      * Add support for alias targets to cquery's `providers`
      
      When applied to an `alias` target, the `providers` function of `cquery`'s `--output=starlark` mode now returns the providers of the aliased target rather than `None`.
      
      This is achieved by moving `getProvidersDict` from `AbstractConfiguredTarget` up to `ConfiguredTarget`.
      
      Fixes #17749
      
      Closes #17753.
      
      PiperOrigin-RevId: 516707744
      Change-Id: I840588d605e3a64b968a019cf4bf43b56d18f4f5
      
      * Remove extra code
      
      ---------
      
      Co-authored-by: default avatarFabian Meumertzheim <fabian@meumertzhe.im>
      Co-authored-by: default avatarkeertk <keerthanakumar@google.com>
      a87b8e0b
  6. Mar 20, 2023
    • keertk's avatar
      Allow WORKSPACE and WORKSPACE-loaded .bzl files to see Bzlmod root module's mappings (#17818) · 3a7236be
      keertk authored
      Currently, we evaluate WORKSPACE (`WorkspaceFileFunction`) and WORKSPACE-loaded .bzl files (`BzlLoadFunction` with `BzlLoadValue.KeyForWorkspace`) with the repo mapping purely computed from previous WORKSPACE chunks. This is unlike BUILD-loaded .bzl files from WORKSPACE-defined repos (`BzlLoadFunction` with `BzlLoadValue.KeyForBuild`, which is the same as `RepositoryMappingFunction`), which take the mappings of the Bzlmod root module into account. This CL fixes that discrepancy by doing the same "repo mapping composition" everywhere.
      
      Fixes https://github.com/bazelbuild/bazel/issues/17655
      
      
      
      RELNOTES: Fixed an issue where WORKSPACE and WORKSPACE-loaded .bzl files couldn't see the Bzlmod root module's mappings when Bzlmod is enabled.
      PiperOrigin-RevId: 515318590
      Change-Id: I4babc922f6cdb932d17ce18d9a9d9d427dbed2eb
      
      Co-authored-by: default avatarGoogler <wyv@google.com>
      3a7236be
    • Tiago Quelhas's avatar
      [6.2.0] Include build-tools/X.Y.Z/{lib,lib64}/** in the minimal set of SDK... · fb695edf
      Tiago Quelhas authored
      [6.2.0] Include build-tools/X.Y.Z/{lib,lib64}/** in the minimal set of SDK files used by the Android integration tests. (#17826)
      
      This is necessary to reenable remote caching/execution for these tests (and make CI runs faster!). In the absence of this change, the tests will fail because the aapt/appt2/aidl/zipalign tools can't be dynamically linked in the remote environment. See issue #8235.
      
      We need to wait until this change makes it into a Bazel release before reenabling the tests, as they inherit the SDK files from the Bazel that runs them.
      
      Related to #8235.
      
      PiperOrigin-RevId: 517180365
      Change-Id: I2baa66af15af85349187e75e3acd4e3cb5d84a49
      fb695edf
  7. Mar 15, 2023
  8. Mar 14, 2023
  9. Mar 13, 2023
    • kshyanashree's avatar
      [credentialhelper] Ignore failing to provide request (#17745) · e3625091
      kshyanashree authored
      This fixes a race condition where writing to stdin of the subprocess fails because the subprocess terminated quickly (e.g., because it did not need the request to provide credentials, or some other error occurred in the helper before it reads from stdin).
      
      ```
      Starting local Bazel server and connecting to it...
      INFO: Writing tracer profile to '/private/var/tmp/_bazel_yannic/bb6c3b02ccc98aaca966df445b5024eb/command.profile.gz'
      INFO: Invocation ID: 86e227bc-187e-4d28-8f04-40b1ce9a36a4
      ERROR: java.io.IOException: Stream closed
      	at java.base/java.lang.ProcessBuilder$NullOutputStream.write(Unknown Source)
      	at java.base/java.io.OutputStream.write(Unknown Source)
      	at java.base/java.io.BufferedOutputStream.flushBuffer(Unknown Source)
      	at java.base/java.io.BufferedOutputStream.flush(Unknown Source)
      	at java.base/java.io.FilterOutputStream.close(Unknown Source)
      	at java.base/sun.nio.cs.StreamEncoder.implClose(Unknown Source)
      	at java.base/sun.nio.cs.StreamEncoder.close(Unknown Source)
      	at java.base/java.io.OutputStreamWriter.close(Unknown Source)
      	at com.google.devtools.build.lib.authandtls.credentialhelper.CredentialHelper.getCredentials(CredentialHelper.java:82)
      	at com.google.devtools.build.lib.authandtls.credentialhelper.CredentialHelperCredentials.getCredentialsFromHelper(CredentialHelperCredentials.java:108)
      	at com.github.benmanes.caffeine.cache.BoundedLocalCache.lambda$doComputeIfAbsent$14(BoundedLocalCache.java:2413)
      	at java.base/java.util.concurrent.ConcurrentHashMap.compute(Unknown Source)
      	at com.github.benmanes.caffeine.cache.BoundedLocalCache.doComputeIfAbsent(BoundedLocalCache.java:2411)
      	at com.github.benmanes.caffeine.cache.BoundedLocalCache.computeIfAbsent(BoundedLocalCache.java:2394)
      	at com.github.benmanes.caffeine.cache.LocalCache.computeIfAbsent(LocalCache.java:108)
      	at com.github.benmanes.caffeine.cache.LocalManualCache.get(LocalManualCache.java:62)
      	at com.google.devtools.build.lib.authandtls.credentialhelper.CredentialHelperCredentials.getRequestMetadata(CredentialHelperCredentials.java:80)
      	at com.google.auth.Credentials.blockingGetToCallback(Credentials.java:112)
      	at com.google.auth.Credentials$1.run(Credentials.java:98)
      	at io.grpc.stub.ClientCalls$ThreadlessExecutor.runQuietly(ClientCalls.java:771)
      	at io.grpc.stub.ClientCalls$ThreadlessExecutor.waitAndDrain(ClientCalls.java:754)
      	at io.grpc.stub.ClientCalls.blockingUnaryCall(ClientCalls.java:157)
      	at build.bazel.remote.execution.v2.CapabilitiesGrpc$CapabilitiesBlockingStub.getCapabilities(CapabilitiesGrpc.java:218)
      	at com.google.devtools.build.lib.remote.RemoteServerCapabilities.lambda$get$0(RemoteServerCapabilities.java:84)
      	at com.google.devtools.build.lib.remote.ReferenceCountedChannel.lambda$withChannelBlocking$2(ReferenceCountedChannel.java:85)
      	at com.google.devtools.build.lib.remote.ReferenceCountedChannel.lambda$withChannel$4(ReferenceCountedChannel.java:108)
      	at io.reactivex.rxjava3.internal.operators.single.SingleUsing.subscribeActual(SingleUsing.java:59)
      	at io.reactivex.rxjava3.core.Single.subscribe(Single.java:4855)
      	at io.reactivex.rxjava3.internal.operators.single.SingleFlatMap$SingleFlatMapCallback.onSuccess(SingleFlatMap.java:85)
      	at io.reactivex.rxjava3.internal.operators.single.SingleFlatMap$SingleFlatMapCallback$FlatMapSingleObserver.onSuccess(SingleFlatMap.java:112)
      	at io.reactivex.rxjava3.internal.operators.single.SingleMap$MapSingleObserver.onSuccess(SingleMap.java:65)
      	at io.reactivex.rxjava3.internal.operators.single.SingleDoOnDispose$DoOnDisposeObserver.onSuccess(SingleDoOnDispose.java:84)
      	at io.reactivex.rxjava3.internal.operators.single.SingleDoOnError$DoOnError.onSuccess(SingleDoOnError.java:52)
      	at io.reactivex.rxjava3.internal.operators.observable.ObservableSingleSingle$SingleElementObserver.onComplete(ObservableSingleSingle.java:110)
      	at io.reactivex.rxjava3.internal.observers.DeferredScalarDisposable.complete(DeferredScalarDisposable.java:85)
      	at io.reactivex.rxjava3.subjects.AsyncSubject.subscribeActual(AsyncSubject.java:233)
      	at io.reactivex.rxjava3.core.Observable.subscribe(Observable.java:13176)
      	at io.reactivex.rxjava3.internal.operators.observable.ObservableSingleSingle.subscribeActual(ObservableSingleSingle.java:36)
      	at io.reactivex.rxjava3.core.Single.subscribe(Single.java:4855)
      	at io.reactivex.rxjava3.internal.operators.single.SingleDoOnError.subscribeActual(SingleDoOnError.java:35)
      	at io.reactivex.rxjava3.core.Single.subscribe(Single.java:4855)
      	at io.reactivex.rxjava3.internal.operators.single.SingleDoOnDispose.subscribeActual(SingleDoOnDispose.java:38)
      	at io.reactivex.rxjava3.core.Single.subscribe(Single.java:4855)
      	at io.reactivex.rxjava3.internal.operators.single.SingleMap.subscribeActual(SingleMap.java:35)
      	at io.reactivex.rxjava3.core.Single.subscribe(Single.java:4855)
      	at io.reactivex.rxjava3.internal.operators.single.SingleFlatMap$SingleFlatMapCallback.onSuccess(SingleFlatMap.java:85)
      	at io.reactivex.rxjava3.internal.operators.single.SingleCreate$Emitter.onSuccess(SingleCreate.java:68)
      	at com.google.devtools.build.lib.remote.grpc.TokenBucket$1.onNext(TokenBucket.java:79)
      	at io.reactivex.rxjava3.internal.util.NotificationLite.accept(NotificationLite.java:247)
      	at io.reactivex.rxjava3.subjects.BehaviorSubject$BehaviorDisposable.test(BehaviorSubject.java:507)
      	at io.reactivex.rxjava3.subjects.BehaviorSubject$BehaviorDisposable.emitFirst(BehaviorSubject.java:468)
      	at io.reactivex.rxjava3.subjects.BehaviorSubject.subscribeActual(BehaviorSubject.java:224)
      	at io.reactivex.rxjava3.core.Observable.subscribe(Observable.java:13176)
      	at com.google.devtools.build.lib.remote.grpc.TokenBucket.lambda$acquireToken$0(TokenBucket.java:64)
      	at io.reactivex.rxjava3.internal.operators.single.SingleCreate.subscribeActual(SingleCreate.java:40)
      	at io.reactivex.rxjava3.core.Single.subscribe(Single.java:4855)
      	at io.reactivex.rxjava3.internal.operators.single.SingleFlatMap.subscribeActual(SingleFlatMap.java:37)
      	at io.reactivex.rxjava3.core.Single.subscribe(Single.java:4855)
      	at io.reactivex.rxjava3.internal.operators.single.SingleDefer.subscribeActual(SingleDefer.java:43)
      	at io.reactivex.rxjava3.core.Single.subscribe(Single.java:4855)
      	at io.reactivex.rxjava3.internal.operators.single.SingleFlatMap.subscribeActual(SingleFlatMap.java:37)
      	at io.reactivex.rxjava3.core.Single.subscribe(Single.java:4855)
      	at io.reactivex.rxjava3.core.Single.blockingGet(Single.java:3644)
      	at com.google.devtools.build.lib.remote.ReferenceCountedChannel.withChannelBlocking(ReferenceCountedChannel.java:85)
      	at com.google.devtools.build.lib.remote.RemoteServerCapabilities.lambda$get$1(RemoteServerCapabilities.java:83)
      	at com.google.devtools.build.lib.remote.Retrier.execute(Retrier.java:244)
      	at com.google.devtools.build.lib.remote.RemoteRetrier.execute(RemoteRetrier.java:125)
      	at com.google.devtools.build.lib.remote.RemoteRetrier.execute(RemoteRetrier.java:114)
      	at com.google.devtools.build.lib.remote.RemoteServerCapabilities.get(RemoteServerCapabilities.java:81)
      	at com.google.devtools.build.lib.remote.RemoteModule.getAndVerifyServerCapabilities(RemoteModule.java:209)
      	at com.google.devtools.build.lib.remote.RemoteModule.beforeCommand(RemoteModule.java:542)
      	at com.google.devtools.build.lib.runtime.BlazeCommandDispatcher.execExclusively(BlazeCommandDispatcher.java:379)
      	at com.google.devtools.build.lib.runtime.BlazeCommandDispatcher.exec(BlazeCommandDispatcher.java:233)
      	at com.google.devtools.build.lib.server.GrpcServerImpl.executeCommand(GrpcServerImpl.java:550)
      	at com.google.devtools.build.lib.server.GrpcServerImpl.lambda$run$1(GrpcServerImpl.java:614)
      	at io.grpc.Context$1.run(Context.java:566)
      	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
      	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
      	at java.base/java.lang.Thread.run(Unknown Source)
      
      ERROR: Failed to query remote execution capabilities: Stream closed
      java.io.IOException: Stream closed
      	at java.base/java.lang.ProcessBuilder$NullOutputStream.write(Unknown Source)
      	at java.base/java.io.OutputStream.write(Unknown Source)
      	at java.base/java.io.BufferedOutputStream.flushBuffer(Unknown Source)
      	at java.base/java.io.BufferedOutputStream.flush(Unknown Source)
      	at java.base/java.io.FilterOutputStream.close(Unknown Source)
      	at java.base/sun.nio.cs.StreamEncoder.implClose(Unknown Source)
      	at java.base/sun.nio.cs.StreamEncoder.close(Unknown Source)
      	at java.base/java.io.OutputStreamWriter.close(Unknown Source)
      	at com.google.devtools.build.lib.authandtls.credentialhelper.CredentialHelper.getCredentials(CredentialHelper.java:82)
      	at com.google.devtools.build.lib.authandtls.credentialhelper.CredentialHelperCredentials.getCredentialsFromHelper(CredentialHelperCredentials.java:108)
      	at com.github.benmanes.caffeine.cache.BoundedLocalCache.lambda$doComputeIfAbsent$14(BoundedLocalCache.java:2413)
      	at java.base/java.util.concurrent.ConcurrentHashMap.compute(Unknown Source)
      	at com.github.benmanes.caffeine.cache.BoundedLocalCache.doComputeIfAbsent(BoundedLocalCache.java:2411)
      	at com.github.benmanes.caffeine.cache.BoundedLocalCache.computeIfAbsent(BoundedLocalCache.java:2394)
      	at com.github.benmanes.caffeine.cache.LocalCache.computeIfAbsent(LocalCache.java:108)
      	at com.github.benmanes.caffeine.cache.LocalManualCache.get(LocalManualCache.java:62)
      	at com.google.devtools.build.lib.authandtls.credentialhelper.CredentialHelperCredentials.getRequestMetadata(CredentialHelperCredentials.java:80)
      	at com.google.auth.Credentials.blockingGetToCallback(Credentials.java:112)
      	at com.google.auth.Credentials$1.run(Credentials.java:98)
      	at io.grpc.stub.ClientCalls$ThreadlessExecutor.runQuietly(ClientCalls.java:771)
      	at io.grpc.stub.ClientCalls$ThreadlessExecutor.waitAndDrain(ClientCalls.java:754)
      	at io.grpc.stub.ClientCalls.blockingUnaryCall(ClientCalls.java:157)
      	at build.bazel.remote.execution.v2.CapabilitiesGrpc$CapabilitiesBlockingStub.getCapabilities(CapabilitiesGrpc.java:218)
      	at com.google.devtools.build.lib.remote.RemoteServerCapabilities.lambda$get$0(RemoteServerCapabilities.java:84)
      	at com.google.devtools.build.lib.remote.ReferenceCountedChannel.lambda$withChannelBlocking$2(ReferenceCountedChannel.java:85)
      	at com.google.devtools.build.lib.remote.ReferenceCountedChannel.lambda$withChannel$4(ReferenceCountedChannel.java:108)
      	at io.reactivex.rxjava3.internal.operators.single.SingleUsing.subscribeActual(SingleUsing.java:59)
      	at io.reactivex.rxjava3.core.Single.subscribe(Single.java:4855)
      	at io.reactivex.rxjava3.internal.operators.single.SingleFlatMap$SingleFlatMapCallback.onSuccess(SingleFlatMap.java:85)
      	at io.reactivex.rxjava3.internal.operators.single.SingleFlatMap$SingleFlatMapCallback$FlatMapSingleObserver.onSuccess(SingleFlatMap.java:112)
      	at io.reactivex.rxjava3.internal.operators.single.SingleMap$MapSingleObserver.onSuccess(SingleMap.java:65)
      	at io.reactivex.rxjava3.internal.operators.single.SingleDoOnDispose$DoOnDisposeObserver.onSuccess(SingleDoOnDispose.java:84)
      	at io.reactivex.rxjava3.internal.operators.single.SingleDoOnError$DoOnError.onSuccess(SingleDoOnError.java:52)
      	at io.reactivex.rxjava3.internal.operators.observable.ObservableSingleSingle$SingleElementObserver.onComplete(ObservableSingleSingle.java:110)
      	at io.reactivex.rxjava3.internal.observers.DeferredScalarDisposable.complete(DeferredScalarDisposable.java:85)
      	at io.reactivex.rxjava3.subjects.AsyncSubject.subscribeActual(AsyncSubject.java:233)
      	at io.reactivex.rxjava3.core.Observable.subscribe(Observable.java:13176)
      	at io.reactivex.rxjava3.internal.operators.observable.ObservableSingleSingle.subscribeActual(ObservableSingleSingle.java:36)
      	at io.reactivex.rxjava3.core.Single.subscribe(Single.java:4855)
      	at io.reactivex.rxjava3.internal.operators.single.SingleDoOnError.subscribeActual(SingleDoOnError.java:35)
      	at io.reactivex.rxjava3.core.Single.subscribe(Single.java:4855)
      	at io.reactivex.rxjava3.internal.operators.single.SingleDoOnDispose.subscribeActual(SingleDoOnDispose.java:38)
      	at io.reactivex.rxjava3.core.Single.subscribe(Single.java:4855)
      	at io.reactivex.rxjava3.internal.operators.single.SingleMap.subscribeActual(SingleMap.java:35)
      	at io.reactivex.rxjava3.core.Single.subscribe(Single.java:4855)
      	at io.reactivex.rxjava3.internal.operators.single.SingleFlatMap$SingleFlatMapCallback.onSuccess(SingleFlatMap.java:85)
      	at io.reactivex.rxjava3.internal.operators.single.SingleCreate$Emitter.onSuccess(SingleCreate.java:68)
      	at com.google.devtools.build.lib.remote.grpc.TokenBucket$1.onNext(TokenBucket.java:79)
      	at io.reactivex.rxjava3.internal.util.NotificationLite.accept(NotificationLite.java:247)
      	at io.reactivex.rxjava3.subjects.BehaviorSubject$BehaviorDisposable.test(BehaviorSubject.java:507)
      	at io.reactivex.rxjava3.subjects.BehaviorSubject$BehaviorDisposable.emitFirst(BehaviorSubject.java:468)
      	at io.reactivex.rxjava3.subjects.BehaviorSubject.subscribeActual(BehaviorSubject.java:224)
      	at io.reactivex.rxjava3.core.Observable.subscribe(Observable.java:13176)
      	at com.google.devtools.build.lib.remote.grpc.TokenBucket.lambda$acquireToken$0(TokenBucket.java:64)
      	at io.reactivex.rxjava3.internal.operators.single.SingleCreate.subscribeActual(SingleCreate.java:40)
      	at io.reactivex.rxjava3.core.Single.subscribe(Single.java:4855)
      	at io.reactivex.rxjava3.internal.operators.single.SingleFlatMap.subscribeActual(SingleFlatMap.java:37)
      	at io.reactivex.rxjava3.core.Single.subscribe(Single.java:4855)
      	at io.reactivex.rxjava3.internal.operators.single.SingleDefer.subscribeActual(SingleDefer.java:43)
      	at io.reactivex.rxjava3.core.Single.subscribe(Single.java:4855)
      	at io.reactivex.rxjava3.internal.operators.single.SingleFlatMap.subscribeActual(SingleFlatMap.java:37)
      	at io.reactivex.rxjava3.core.Single.subscribe(Single.java:4855)
      	at io.reactivex.rxjava3.core.Single.blockingGet(Single.java:3644)
      	at com.google.devtools.build.lib.remote.ReferenceCountedChannel.withChannelBlocking(ReferenceCountedChannel.java:85)
      	at com.google.devtools.build.lib.remote.RemoteServerCapabilities.lambda$get$1(RemoteServerCapabilities.java:83)
      	at com.google.devtools.build.lib.remote.Retrier.execute(Retrier.java:244)
      	at com.google.devtools.build.lib.remote.RemoteRetrier.execute(RemoteRetrier.java:125)
      	at com.google.devtools.build.lib.remote.RemoteRetrier.execute(RemoteRetrier.java:114)
      	at com.google.devtools.build.lib.remote.RemoteServerCapabilities.get(RemoteServerCapabilities.java:81)
      	at com.google.devtools.build.lib.remote.RemoteModule.getAndVerifyServerCapabilities(RemoteModule.java:209)
      	at com.google.devtools.build.lib.remote.RemoteModule.beforeCommand(RemoteModule.java:542)
      	at com.google.devtools.build.lib.runtime.BlazeCommandDispatcher.execExclusively(BlazeCommandDispatcher.java:379)
      	at com.google.devtools.build.lib.runtime.BlazeCommandDispatcher.exec(BlazeCommandDispatcher.java:233)
      	at com.google.devtools.build.lib.server.GrpcServerImpl.executeCommand(GrpcServerImpl.java:550)
      	at com.google.devtools.build.lib.server.GrpcServerImpl.lambda$run$1(GrpcServerImpl.java:614)
      	at io.grpc.Context$1.run(Context.java:566)
      	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
      	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
      	at java.base/java.lang.Thread.run(Unknown Source)
      
      INFO: Streaming build results to: https://opal.cluster.engflow.com/invocation/86e227bc-187e-4d28-8f04-40b1ce9a36a4
      
      
      ```
      
      Closes #17666.
      
      PiperOrigin-RevId: 514377908
      Change-Id: I772a5e462146e3e9699b45090120634a057a5532
      
      Co-authored-by: default avatarYannic Bonenberger <yannic@engflow.com>
      e3625091
    • kshyanashree's avatar
      Force the Bazel server Java runtime to use the root locale (#17733) · 94575fd8
      kshyanashree authored
      
      This ensures consistent behavior of string operations even if the individual operations do not set a locale.
      
      Without this change, Bazel can't operate in e.g. a Turkish locale, where it fails with error messages such as:
      
      In rule 'test', size 'medium' is not a valid size.
      
      This is because Turkish case mapping rules make it so that a capital ASCII 'I' lowercases to a non-ASCII variant of 'i'.
      
      Fixes #17541
      
      Closes #17702.
      
      PiperOrigin-RevId: 515339563
      Change-Id: I8417d0befd76ba6d140588be5f7e50529af3f6c7
      
      Co-authored-by: default avatarFabian Meumertzheim <fabian@meumertzhe.im>
      94575fd8
  10. Mar 12, 2023
    • kshyanashree's avatar
      Silence setlocale warnings in Java stub (#17741) · db5c9ec1
      kshyanashree authored
      Since 17cfa015, the java_stub_template.txt file calls into the locale tool to check for the presence of cetain locales.  These calls correctly send error messages to stderr.
      
      Unfortunately, *bash* itself is doing locale lookups as soon as it sees that the LANG or LC_* variables are touched, and this results in warnings that pollute the output.  In our builds, the output is polluted with hundreds of warnings like these:
      
      ```
      bazel-out/aarch64-opt-exec-CF41B97/bin/external/bfg/lang/java/src/main/java/com/google/devtools/build/bfg/JavaSourceFileParserCli: line 100: warning: setlocale: LC_CTYPE: cannot change locale (): No such file or directory
      bazel-out/aarch64-opt-exec-CF41B97/bin/external/bfg/lang/java/src/main/java/com/google/devtools/build/bfg/JavaSourceFileParserCli: line 102: warning: setlocale: LC_CTYPE: cannot change locale (): No such file or directory
      ```
      
      There is nothing we can do to avoid these warnings.  Trying to set the LANG or LC_* variables via --action_env and --host_action_env has no effect (other than trigger more/different warnings).
      
      The problem stems from https://bugzilla.redhat.com/show_bug.cgi?id=1361965
      
      , which has been fixed in various distros but hasn't made its way to the one we are currently using.
      
      Given that it's bash that is complaining, we can easily side-step this issue by patching the template and wrapping the problematic invocations behind "env".  In this way, bash never gets to see the locale changes. This change does precisely this.
      
      Closes #17670.
      
      PiperOrigin-RevId: 515350095
      Change-Id: I1887003802aa329e7fb96f644a2fba906daf5165
      
      Co-authored-by: default avatarJulio Merino <julio.merino+oss@snowflake.com>
      db5c9ec1
  11. Mar 11, 2023
    • Tiago Quelhas's avatar
      [6.2.0] Correctly handle templated tree artifacts in the prefetcher. (#17735) · 3526c72a
      Tiago Quelhas authored
      Due to the existence of templated tree artifacts (tree artifacts where each file is produced by a separate action) and nested artifacts (artifacts whose output path is a descendant of another artifact's), the prefetcher must not assume every tree artifact is fetched as a whole.
      
      In addition, concurrent actions calling the prefetcher might write to the same directory in the output tree, so they must synchronize when making the directory temporarily writable.
      
      Fixes #16333.
      
      PiperOrigin-RevId: 513205572
      Change-Id: I827c4643643f63c9425e63bdf9177805c5f0f409
      3526c72a
    • Tiago Quelhas's avatar
      [6.2.0] Remove actionId from RemoteFileArtifactValue. (#17724) · 60749d53
      Tiago Quelhas authored
      actionId was added by https://github.com/bazelbuild/bazel/pull/11236
      
       to track download requests for input prefetches.
      
      However, according to the REAPI spec, action_id is
      
      > An identifier that ties multiple requests to the same action. For example, multiple requests to the CAS, Action Cache, and Execution API are used in order to compile foo.cc.
      
      The input prefetches are requested by local actions that depend on outputs of remote executed action (which is identified by the action_id). These requests are not part of generating action hence shouldn't be bound with the action_id.
      
      We could include ActionExecutionMetadata of the local action for the requests for the tracking purpose, but that desires another CL.
      
      PiperOrigin-RevId: 510430853
      Change-Id: I8d64a4f7033320a394e02a2b11498f09a3d15310
      
      Co-authored-by: default avatarGoogler <chiwang@google.com>
      60749d53
  12. Mar 10, 2023
    • kshyanashree's avatar
      Skip empty directories instead of throwing in prefetcher. (#17718) · 94c519bc
      kshyanashree authored
      While non-empty tree artifacts in the inputs to an action are expanded into the files they contain and omitted from the input mapping, empty tree artifacts are still present, as they signal the need to create the directory. Thus, the check added in 763f966a
      
       is incorrect.
      
      I'm explicitly skipping the empty tree artifacts in prefetchFiles() as otherwise they get skipped as a result of FileArtifactValue#isRemote() returning false for the FileArtifactValue associated with an empty tree artifact (even if it was produced remotely!), which is extremely subtle.
      
      Closes #17183.
      
      PiperOrigin-RevId: 501207095
      Change-Id: Ib52727d6fdc6b7a291a61fba33914e57531fb1f4
      
      Co-authored-by: default avatarTiago Quelhas <tjgq@google.com>
      94c519bc
  13. Mar 09, 2023
  14. Mar 07, 2023
    • Bazel Release System's avatar
      Release 6.1.0 (2023-03-06) · 755cd4bc
      Bazel Release System authored
      Baseline: d60ce2c7
      
      Cherry picks:
      
         + 490f8bad:
           kshyanashree is the release manager of 6.0.0
         + 4e66d934:
           Automated rollback of commit
           2a289091.
         + 48a8d01b:
           Allow C/C++ coverage collection for external targets
         + ec7be346:
           Temporarily set parent directory of the input to writable if it
           is not.
         + b0984342:
           Infer CPUs for tvOS and watchOS when on Apple Silicon
         + 5cea7dda:
           Improve the documentation for ctx.actions.symlink.
         + a82d26f1:
           Add quotes to "Tip"
         + 75b0f3aa:
           Write a repo mapping manifest in the runfiles directory (#16555)
         + 07c5c1aa:
           Ensure repository names don't start with `~`
         + 30f6c823:
           Escape tilde more gracefully
         + cf3f48ca:
           Relax `Label` repo visibility validation
         + 4477823e:
           Use "apparent name" instead of "local name" in Bzlmod docs
         + 55f4f483:
           Bazel DevSite: Add required css file.
         + a706994a:
           Remove logic that increases delay between progress updates over
           time
         + 1d514ab0:
           Remove references to io_bazel repository
         + b0357bd3:
           Relnotes python script
         + 8f956511:
           Allow Java coverage collection for external targets
         + bddb191d:
           Fix race condition in package-bazel.sh
         + a7578527:
           Decanonicalize labels emitted by {a,c,}query if possible
         + 9d250edb:
           Add uniquify parameter to TemplateDict.add_joined
         + f02bcf8d:
           Fix identical gcov json file name problem
         + a1593309:
           Add `$(rlocationpath(s) ...)` expansion
         + 56f54daf:
           Rollup of SBOM correctness fixes (#16655)
         + 72e6e948:
           [cc] Add cc toolchain to starlark cc_proto_library (#16661)
         + 8f285138:
           Make C++ runfiles library repo mapping aware
         + 95f9adc5:
           Always collect FileProvider's filesToBuild as data runfiles
         + 4959d34e:
           fix: export constraints.bzl file from @local_config_platform so
           it can be used in downstream bzl_library targets
         + 4919d4a6:
           Add --host_per_file_copt (#16695)
         + 0a23d469:
           Moving some tests for `RemoteActionFileSystem` of BwoB to a base
           class.
         + 9296068b:
           [remote/downloader] Don't include headers in `FetchBlobRequest`
         + 128d833f:
           [remote] Respect whether the server supports action cache updates
         + 38c50191:
           [remote/downloader] Migrate `Downloader` to take `Credentials`
           (#16732)
         + 5929cb72:
           Stage repository mapping manifest as a root symlink (#16733)
         + 455454a5:
           Expose current repository name to Java with @AutoBazelRepository
         + 97dea593:
           Implement getDirectoryEntries and readdir for
           RemoteActionFileSystem.
         + aa45f5f3:
           Move integration tests for BwoB to a base class and add more
           tests there.
         + 1b073ac0:
           Make Java runfiles library repo mapping aware
         + 148bbb1c:
           Use `_repo_mapping` in C++ runfiles library (#16752)
         + 25558ada:
           Add --experimental_action_cache_store_output_metadata to the
           expansio…
         + 6e945e8a:
           Treat `DEBUG` events as progress-like.
         + 1940c5d6:
           redact 'token' strings from logging
         + 0b645254:
           Make Bash runfiles library repo mapping aware (#16753)
         + 4caae75b:
           Automated rollback of commit
           8f956511.
         + 13ff6d9e:
           Fix Bash rlocation failure with stricter Bash options
         + bd88c7e4:
           Make bazel Android remote deps compatible with bzlmod (#16772)
         + 6f6d4cca:
           Flip `--incompatible_always_include_files_in_data`
         + 94355b1b:
           Add required `--add-opens` server JVM args also with
           non-embedded JDK
         + 8349c95f:
           Also collect clang resource directory with
           `-no-canonical-prefixes`
         + dce6ed77:
           Make `bazel run` works with minimal mode
         + ca8674cc:
           Include source files with `cquery --output=files` (#16826)
         + 9cb5e0a3:
           Fsync before rename after copy in DiskCacheClient
         + 23ffce53:
           Update GetActionResult for disk cache to check referenced files
           when …
         + 0bc0ff52:
           Make Java runfiles library compilable with JDK 8
         + fe169654:
           [6.0.0] Default --incompatible_strict_conflict_checks to true.
           (#16864)
         + 99ca86f7:
           Revert "[6.0.0] Default --incompatible_strict_conflict_checks to
           true. (#16864)" (#16872)
         + 312238f2:
           Make C++ runfiles library build with `-Werror=shadow`
         + 2baa5a42:
           Keep credentials cached across build commands.
         + 8818a57f:
           [6.0.0] Only inject metadata for outputs that cannot be
           reconstructed by skyf… (#16879)
         + 31e4bf40:
           Update java_tools v11.9
         + cd406660:
           replace _get_canonical_form(label) with str(label)
         + e2bc2374:
           Avoid exceptions from hermetic sandbox for unsupported artifact
           subclasses
         + b564d145:
           Remove warnings about ignored starlark options
         + 7ccc6610:
           [6.0.0] Emit Tree objects in topological order (#16904)
         + 86dee6d2:
           Correctly match regex with tree artifact
         + 14925b57:
           Always use target's attributes to set Python version (#16959)
         + a247502d:
           Add 'toolchain' parameter to actions.{run,run_shell}
         + 497b7e40:
           Fix Bash `runfiles_current_repository` with RBE
         + 0a2c4edb:
           Fix corner cases in Bash runfiles library
         + 33b514b2:
           Fix runfiles creation with MANIFEST when building without the
           bytes
         + 3a13af41:
           Remove LCOV merger dependency of `cc_test` without coverage
           (#17004)
         + 25ba76c1:
           Include full tree artifact in inputs when prefetcher doesn't
           support partial tree artifacts.
         + 06deebfb:
           Release 6.0.0 (2022-12-19)
         + c2bfb2e9:
           Enable git_submodules tests and merge git_repository and
           starlark_git_repository (#17247)
         + e8182ce3:
           have 'bazel test' non-test targets depend on
           --remote_download_output
         + c3245cd0:
           Add `SpellChecker` suggestions for common Bzlmod errors
         + 8ec87434:
           Use xcrun to invoke install_name_tool
         + 2b2bea4e:
           Extra resources
         + 5b4de12b:
           Do not clear `--platforms` on no-op change to `--cpu`
         + db3c0130:
           Report `AspectCreationException` to the user
         + 53e9fea3:
           Use long executable path instead of `argv[0]` in all launchers
         + abae5ca3:
           Add sanitizer features to unix_cc_toolchain_config
         + db684196:
           Allow `map_each` to return `None` in `TemplateDict#add_joined`
         + 66b58ee9:
           Always emit trailing zero in human-readable download progress
         + 17b8e448:
           Upload all logs in BEP even with minimal upload
         + 28d2daae:
           Set `--experimental_action_listeners` to default in `exec` config
         + 16427c90:
           Do not count tests as failed that have not started
         + 094a0aab:
           Accept tildes in --override_module
         + 5f2866f8:
           Do the AC integrity check for disk part of the combined cache.
         + cd10d508:
           Fix `--nozip_undeclared_test_outputs` on Windows
         + 073f54b9:
           Allow pyd in extensions of dynamic libraries
         + ac504cbb:
           Register JavaCompileActionContext in Bazel.
         + f090433f:
           Rollback #14510 because it causes remote test execution to fail
         + 942dddaa:
           Prepare backwards compatible usage of optional C++ toolchain
         + 88b51f57:
           Emit LLVM coverage for source file paths with a `tmp` segment
         + bb0b8862:
           Enable archive_param_file feature by default for Windows
         + baf97c00:
           Allow `TemplateDict#map_each` callback to return a list of
           strings (#17306)
         + fcb00774:
           Only try to create groups of test actions in the ui.
         + 3c47b471:
           Find `libtool` when using `BAZEL_USE_CPP_ONLY_TOOLCHAIN`.
         + 1da8a825:
           Add -dead_strip in default opt link flags for darwin
         + b0c5eb30:
           Dont query remote cache but always use bytestream protocol
         + 00e9af19:
           Allow Java coverage collection for external targets.
         + dd24a002:
           Test and fix root symlink edge case in runfiles library
         + af97d983:
           [6.1.0] Fix broken CI (#17422)
         + b8595718:
           Add `native.package_relative_label` function
         + 82168d44:
           Make Bazel more responsive and use less memory when --jobs is
           high (#17398)
         + 84c1ed43:
           Multiplex worker fixes and tests for Android busybox tools
           (#17371)
         + 07590818:
           Improve error message for concurrent modifications (#17396)
         + 27bc896f:
           [6.1.0] Make bazel coverage work with minimal mode (#17397)
         + 544b8164:
           [6.1.0] Fix cc_binary bug related to cc_shared_library on
           Windows and prepare for future removal of
           --experimental_cc_shared_library flag (#17445)
         + 9a7aa21c:
           Fix Bash `runfiles_current_repository` for tools
         + 911eedc0:
           Fix label unambiguous canonical form to correctly report
           non-visible repo names
         + e132653e:
           Remove O1 from sanitizer feature flag defaults
         + ba9e2f8f:
           Remove usage of gRPC Context cancellation in the remote
           execution client.
         + de03a236:
           Allow -v to libtool
         + 4e35c02c:
           Prettify labels in action progress messages with Bzlmod (#17278)
         + 1be0ac3e:
           Expand tree outputs before eagerly prefetching them for local
           actions. (#17494)
         + c2666510:
           Fix Java coverage collection with Java 8 runtime
         + 1a6ffe6d:
           Add a flag to disable execution log sorting.
         + fbec8e2a:
           Reduce flakiness on Windows for BwoB tests
         + 420659a9:
           Make AutoBazelRepositoryProcessor compatible with Java 8
         + dde6d20b:
           Do not recommend `shallow_since` for `git_repository`
         + f76fc616:
           Allow the timeout value for execute calls on a mac to be set via
           an environment variable
         + 773d232f:
           Fix RPATHs for cc toolchain solib when sibling layout is used
         + 5932b3b8:
           [6.1.0] Add --host_features (#17528)
         + a0fa77cc:
           Exit with code 39 if remote cache evicted blobs that Bazel need
           during an invocation (#17496)
         + 1a438b41:
           Only fetch @remote_coverage_tools when collecting coverage
           (#17512)
         + ee1daaf9:
           [6.1.0]Only fetch @remote_coverage_tools when collecting
           coverage (#17287)
         + 350e3295:
           [6.1.0]Fix symlink file creation overhead (#17488)
         + 5406c953:
           [6.1.0] Cleanup stale state when remote cache evicted (#17538)
         + 2d1b570e:
           Bump version number in runfiles.bash init code
         + 3ab8a0a5:
           [6.1.0]Let `aquery` print effective environment for all
           `CommandAction`s (#17274)
         + 51e6c38a:
           Properly report repo fetch progress during main repo mapping
           computation
         + 744108e8:
           [docs] Update migrating to Xcode tutorial (#17563)
         + 9dc7a7e6:
           Update //third_party:jsr305 (#17557)
         + 43dadb27:
           Bump minimum supported macOS versions to 10.13
         + 7d9d23c1:
           Correctly set default subprocess factory when loading class
           `SubprocessBuilder`.
         + 77f82f4f:
           Add an --incompatible_strict_conflict_checks alias for
           --experimental_strict_conflict_checks.
         + e05345de:
           Add support for wrapping system streams in WorkRequestHandler
         + 68e1924c:
           Also handle remote cache eviction for tree artifacts. (#17601)
         + 4a6d056a:
           Add host transition to lcov_merger in Java version of py_test
         + 546e9e29:
           Fix Bazel 6.0 crash regression (#17613)
         + 7e328bb7:
           Include Bazel version information in profile metadata. (#17616)
         + aafe1235:
           [6.1.0] Handle remote cache eviction when uploading inputs for
           remote actions. (#17605)
         + 938e3482:
           [6.1.0] Rerun the artifact conflict check when
           --incompatible_strict_conflict_checks changes. (#17592)
         + 034a2815:
           Report background download for BwoB (#17619)
         + 5afbce52:
           [6.1.0] Flag for writable outputs (experimental) (#17617)
         + d4105e65:
           [6.1.0] Allow .wasm cc executable and dynamic library extension
           (#17440)
         + a306f4f7:
           make desugar dependencies deterministic
         + 37953c56:
           Apply exec transition to lcov_merger in sh_test and cc_test
         + 1d73d72a:
           [6.1.0]Fix --host_features with multiple transitions (#17641)
      
      Incompatible changes:
      
        - Bazel no longer increases the delay between progress updates when
          there is no cursor control.
        - `--incompatible_always_include_files_in_data` is flipped
          to true. See https://github.com/bazelbuild/bazel/issues/16654 for
          details.
        - `cquery --output=files` also outputs source files.
      
          Closes #16602.
        - `--incompatible_strict_conflict_checks` is flipped to true. See
          https://github.com/bazelbuild/bazel/issues/16729 for details.
        - This changes the behavior of Python version in exec/host
          configuration. Mitigation is to set Python version on the targets.
        - `--features` only applies to targets built in the target
          configuration, and `--host_features` is used for the host / exec
          configuration (gated behind `--incompatible_use_host_features`)
      
          Fixes https://github.com/bazelbuild/bazel/issues/13839
      
          Closes #16626.
      
      Important changes:
      
        - The new path variable `$(rlocationpath ...)` and its plural form
          `$(rlocationpaths ...)` can be used to expand labels to the paths
          accepted by the `Rlocation` function of runfiles libraries. This
          is the preferred way to access data dependencies at runtime and
          works on all platforms, even when runfiles are not enabled (e.g.,
          on Windows by default).
      
          Work towards #16124
          Fixes #10923
      
          Closes #16428.
        - Starlark `print()` statements are now emitted iff the line of
          code is executed. They are no longer replayed on subsequent
          invocations unless the Starlark code is re-executed.
          Additionally, multiple identical `print()` statements (same
          string from the same line of code, e.g. from a loop) are all
          emitted and no longer deduplicated.
        - Fixes a bug where some compilation flags would not be applied to
          a cc_test
        - Added a `native.package_relative_label()` function, which
          converts a label string to a Label object in the context of the
          calling package, in contrast to `Label()`, which does so in the
          context of the current .bzl file. Both functions now also accept
          relative labels such as `:foo`, and are idempotent.
      
      This release contains contributions from many people at Google, as well as Brentley Jones, Ezekiel Warren, Fabian Meumertzheim, keertk, Keith Smiley, Krzysztof Naglik, kshyanashree, lunch-glide-pepper, oquenchil, Ted Kaplan, Ted Kaplan, UebelAndre, Xùdōng Yáng, Yannic, yuzhy8701.
      6.1.0
      755cd4bc
  15. Mar 02, 2023
  16. Mar 01, 2023
    • Alex Humesky's avatar
      make desugar dependencies deterministic (#17217) · 1154a3f7
      Alex Humesky authored
      
      Desugar dependencies are added to the result jar file as metadata, this desugar dependency object contains a few lists that we found out the order of this list can be different in different builds with the same inputs, therefore the final result will have a different hash and it cause cache miss in the builds solution is to make the lists in this object sorted. So for the same input, we always get the same output
      
      Closes #16859.
      
      PiperOrigin-RevId: 500842557
      Change-Id: I051e74e7147d590fcfe5cda9731b8e012396bb65
      
      Co-authored-by: default avatarmohamadk <mohamad.khaleghy@gmail.com>
      Co-authored-by: default avatarkshyanashree <109167932+kshyanashree@users.noreply.github.com>
      1154a3f7
    • Ezekiel Warren's avatar
      [6.1.0] Allow .wasm cc executable and dynamic library extension (#17440) · d4105e65
      Ezekiel Warren authored
      
      * Add .wasm cc artifact executable extension
      
      This allows creating a custom cc_toolchain that compiles to WebAssembly that outputs a wasm file with the standard extension, without needing to have a genrule that renames the file
      
      Closes #16091.
      
      PiperOrigin-RevId: 503921110
      Change-Id: I3ed9e50a945d2e415e2ab34bd99ceea481c987f0
      
      * Add .wasm cc dynamic library extension
      
      Similar to #16091 except also allow the `.wasm` extension for dynamic libraries.
      
      Closes #17374.
      
      PiperOrigin-RevId: 507668339
      Change-Id: Id85f98bb804e573e5f93a922b67baf75a22baf16
      
      ---------
      
      Co-authored-by: default avatarScott Bennett <scottbennett@google.com>
      Co-authored-by: default avatarkshyanashree <109167932+kshyanashree@users.noreply.github.com>
      d4105e65
    • Tiago Quelhas's avatar
      [6.1.0] Flag for writable outputs (experimental) (#17617) · 5afbce52
      Tiago Quelhas authored
      
      This feature is tied to an experimental flag `--experimental_writable_outputs`. When enabled, Bazel will set the permissions of all output files to 0755 instead of 0555.
      
      RELNOTES: None.
      PiperOrigin-RevId: 500786227
      Change-Id: I59e15f3fec09c40a052a60b00da209547f10d7fc
      
      Co-authored-by: default avatarGoogler <cparsons@google.com>
      Co-authored-by: default avatarkshyanashree <109167932+kshyanashree@users.noreply.github.com>
      Co-authored-by: default avatarkeertk <110264242+keertk@users.noreply.github.com>
      5afbce52
    • Chi Wang's avatar
      Report background download for BwoB (#17619) · 034a2815
      Chi Wang authored
      When building without the bytes, downloads can happen when Bazel need to fetch inputs for local actions, download outputs of toplevel targets, and etc. The downloads happen silently at the background.
      
      This PR makes output downloads of toplevel targets visible to the UI.
      
      For downloads during the build, the UI looks like:
      
      ```
      [2 / 5] 2 actions, 1 running
          [Prepa] Executing genrule //:foo
          Executing genrule //:bar; 2s
          Fetching bazel-out/darwin-fastbuild/bin/baz; 50.8 MiB / 1.0 GiB; 4s
      ```
      
      For downloads after build is completed, the UI looks like:
      
      ```
      INFO: 2 processes: 1 remote cache hit, 1 internal.
      INFO: Build completed successfully, 2 total actions
          Fetching bazel-out/darwin-fastbuild/bin/baz; 48.8 MiB / 1.0 GiB
      ```
      
      Fixes https://github.com/bazelbuild/bazel/issues/17417.
      
      Closes #17604.
      
      PiperOrigin-RevId: 512934756
      Change-Id: I502489420ab9b84efb74ceabbe3dd4cb4a7a62e2
      034a2815
    • Tiago Quelhas's avatar
      [6.1.0] Rerun the artifact conflict check when... · 938e3482
      Tiago Quelhas authored
      [6.1.0] Rerun the artifact conflict check when --incompatible_strict_conflict_checks changes. (#17592)
      
      Related to #16729.
      
      PiperOrigin-RevId: 511432374
      Change-Id: I00b0bff5731a3468bf0a56c4a44e95590da7b463
      
      Co-authored-by: default avatarkshyanashree <109167932+kshyanashree@users.noreply.github.com>
      938e3482
    • Chi Wang's avatar
      [6.1.0] Handle remote cache eviction when uploading inputs for remote actions. (#17605) · aafe1235
      Chi Wang authored
      
      * Extract code for cleaning stale state when remote CAS evicted blobs into another class.
      
      PiperOrigin-RevId: 512049304
      Change-Id: I87e9e6bcd4d4c4d8be27be13cfb8ba70b199b6e6
      
      * Handle remote cache eviction when uploading inputs for remote actions.
      
      Previously, we handle remote cache eviction when downloading inputs for local actions. However, it's possible that when Bazel need to re-execute an remote action, it detected that some inputs are missing from remote CAS. In this case, Bazel will try to upload inputs by reading from local filesystem. Since the inputs were generated remotely, not downloaded and evicted remotely, the upload will fail with FileNotFoundException.
      
      This CL changes the code to correctly handles above case by reading through ActionFS when uploading inputs and propagate CacheNotFoundException.
      
      Related to #16660.
      
      PiperOrigin-RevId: 512568547
      Change-Id: I3a28cadbb6285fa3727e1603f37abf8843c093c9
      
      * Fix tests
      
      ---------
      
      Co-authored-by: default avatarkshyanashree <109167932+kshyanashree@users.noreply.github.com>
      aafe1235
  17. Feb 28, 2023
  18. Feb 27, 2023