Skip to content

Tags: fbauzac/buck

Tags

v2017.10.01.01

Toggle v2017.10.01.01's commit message
Prepare release v2017.10.01.01.

Summary:
Cut a new release to include partial Java 9 build support
and many performance and usability improvements.

Test Plan: CI

Reviewed By: dinhviethoa

fbshipit-source-id: 0320950

v2017.09.04.01

Toggle v2017.09.04.01's commit message
Add retry logic to handle the case where Eden has closed a Thrift con…

…nection.

Summary:
Previously, `EdenProjectFilesystemDelegate.computeSha1()` could fail if the `EdenMount`
used an `EdenService.Client` that had been disconnected from Eden. It turns out that this
could happen fairly easily if a large Buck build went through phases were it used a lot of
build threads (creating a thread-local `EdenService.Client` for each), then continued
building over a period where not all of them were active, and then fanned out again and
used a build thread that had not used its `EdenService.Client` in over a minute because
the Eden server disconnects clients that have been idle for 60 seconds.

There were two problems with the code:
- In `EdenProjectFilesystemDelegate`, the `TException` that would be thrown by the
  disconnected Thrift client was being rethrown as an `IOException`, causing a crash.
  Although the `ProjectFilesystemDelegate.computeSha1()` allows an `IOException`
  to be thrown, it is not a good idea :P That is, if the `IOException` is thrown by the
  Thrift client, `EdenProjectFilesystemDelegate` should fall back to
  `delegate.computeSha1(path)` rather than let the `IOException` propagate.
  Only a true `IOException` from `delegate.computeSha1(path)` should be allowed to
  cause a build failure.
- In `EdenMount`, there was no logic to refresh a stale `EdenService.Client`.

This revision attempts to address both of these issues, also renaming some classes in
an attempt to clarify the separation of concerns:

- Now, no one is meant to use an `EdenService.Client` directly. Instead, a
  `com.facebook.buck.eden.EdenClient` should be used to wrap an
  `EdenService.Client`.
- The only implementation of `EdenClient` is `ReconnectingEdenClient`.
  This class takes responsibility for looking at a `TException` and deciding
  whether the request should be retried with a fresh  `EdenService.Client`.
- Rather than expose a `ThreadLocal<EdenService.Client>` directly to `EdenMount`,
  we have a separate abstraction, `EdenClientPool`, that wraps a
  `ThreadLocal<EdenClient>`.

This should yield more robust Buck builds in Eden going forward.

Test Plan:
Modified `ReconnectingEdenClient` so that it did not check the
"last used" time and modified `Sha1Command` so that it would do a 65s
sleep between iterations of the loop. Verified that I saw the expected
output in the logs:

```
INFO: Suspected closed Thrift connection: will create a new one.
com.sun.jna.LastErrorException: [32] Broken pipe
        at com.facebook.buck.io.unixsocket.UnixDomainSocketLibrary.write(Native Method)
        at com.facebook.buck.io.unixsocket.UnixDomainSocket$UnixDomainSocketOutputStream.doWrite(UnixDomainSocket.java:216)
        at com.facebook.buck.io.unixsocket.UnixDomainSocket$UnixDomainSocketOutputStream.write(UnixDomainSocket.java:207)
        at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:82)
        at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:140)
        at com.facebook.thrift.transport.TIOStreamTransport.flush(TIOStreamTransport.java:159)
        at com.facebook.eden.thrift.EdenService$Client.send_getSHA1(EdenService.java:291)
        at com.facebook.eden.thrift.EdenService$Client.getSHA1(EdenService.java:277)
        at com.facebook.buck.eden.ReconnectingEdenClient.attempt_getSHA1(ReconnectingEdenClient.java:71)
        at com.facebook.buck.eden.ReconnectingEdenClient.getSHA1(ReconnectingEdenClient.java:61)
        at com.facebook.buck.eden.EdenMount.getSha1(EdenMount.java:99)
        at com.facebook.buck.eden.cli.Sha1Command.run(Sha1Command.java:50)
        at com.facebook.buck.eden.cli.Args.run(Args.java:41)
        at com.facebook.buck.eden.cli.Main.run(Main.java:60)
        at com.facebook.buck.eden.cli.Main.main(Main.java:36)
```

and that the request was properly tried with a new client and succeeded.

Reviewed By: ttsugriy

fbshipit-source-id: d844698

v2017.09.04.02

Toggle v2017.09.04.02's commit message
Prepare release v2017.09.04.01.

Test Plan: CI

Reviewed By: dinhviethoa

fbshipit-source-id: 21b2d40

v2017.05.31.01

Toggle v2017.05.31.01's commit message
Prepare release v2017.05.31.01.

Summary: Prepare to release a new homebrew version without so big binary size.

Test Plan: CI

Reviewed By: shivanker

fbshipit-source-id: 3f9e7c3

v2017.05.09.01

Toggle v2017.05.09.01's commit message
Prepare release v2017.05.09.01.

Summary: Preparing to release v2017.05.09.01.

Test Plan: CI

Reviewed By: Coneko

fbshipit-source-id: 4a27b5f

v2017.03.29.01

Toggle v2017.03.29.01's commit message
Add provided deps query support to android_library

Summary:
For global code generation, it's beneficial to use provided_deps instead of deps
so that we do not accidentally package items into the app that are used by metagen. This change
allows us to use provided_deps instead, and it also adds better syntax for referencing the declared deps.

Test Plan: new integration test

Reviewed By: dreiss

fbshipit-source-id: a796f60

v2016.11.11.01

Toggle v2016.11.11.01's commit message
Prepare release v2016.11.11.01.

v2016.09.26.01

Toggle v2016.09.26.01's commit message
Prepare release v2016.09.26.01.

v2016.09.02.01

Toggle v2016.09.02.01's commit message
Prepare release v2016.09.02.01.

v2016.04.18.01

Toggle v2016.04.18.01's commit message
Prepare release v2016.04.18.01.