1. 07 Dec, 2021 1 commit
    • Samuel Miller's avatar
      fix test getX509() call · 7685dc55
      Samuel Miller authored
      Summary:
      Previous change added dynamic cast but forgot to update class which `getX509()`
      is invoked on. Might as well use the cleaner `tryExtractX509()` method anyway.
      
      Reviewed By: abakiaydin
      
      Differential Revision: D32741497
      
      fbshipit-source-id: 3c9ca5340a8ca0f72acdcfe13cd68e87ae8022cf
      7685dc55
  2. 06 Dec, 2021 4 commits
    • Yedidya Feldblum's avatar
      let AsyncBase build even without eventfd available · a4f059fb
      Yedidya Feldblum authored
      Differential Revision: D32633369
      
      fbshipit-source-id: a4a1df211647a49e0f9e69dac4902f4ae9a5ee27
      a4f059fb
    • Alex Hornby's avatar
      add public_autocargo · b31f69a0
      Alex Hornby authored
      Summary: Adding this will allow autocargo references to the fb303 rust thrift targets rather than needing to hardcode internal or external paths
      
      Reviewed By: HarveyHunt
      
      Differential Revision: D32693526
      
      fbshipit-source-id: 2cbe7424e41d0a3823629ab2eb7b6efed3a1c97f
      b31f69a0
    • Alex Hornby's avatar
      fix getdeps fetch on python 3.6 · b3363872
      Alex Hornby authored
      Summary: The getdeps fetch step runs early on system python, so it has to work with it.  Subprocess capture_output was from 3.7 only, so let's switch to the alternate form that also works on ubuntu 18.04's python 3.6 install
      
      Reviewed By: Croohand
      
      Differential Revision: D32836861
      
      fbshipit-source-id: bd492c0ee90edadbc9124d5820ddfe515fa46f43
      b3363872
    • Alex Hornby's avatar
      libgit2 on ubuntu 18.04 has a bad dependency · 59a37fd1
      Alex Hornby authored
      Summary: Ubuntu 18.04 libgit2 has clash with libcurl4-openssl-dev as it depends on libcurl4-gnutls-dev.  Should be ok from 20.04 again.  There is a description at https://github.com/r-hub/sysreqsdb/issues/77
      
      Reviewed By: Croohand
      
      Differential Revision: D32833245
      
      fbshipit-source-id: 0ee6b8905e3b497c78763258b7508db731c85e70
      59a37fd1
  3. 03 Dec, 2021 8 commits
    • Shai Szulanski's avatar
      Make ExtendedCoroutineHandle truthy when it holds a truthy basic handle for a non-extended promise · fd808fcb
      Shai Szulanski authored
      Reviewed By: simpkins
      
      Differential Revision: D32838375
      
      fbshipit-source-id: d8c350715d3a5fc7ebaa69f723cb6626bdc80031
      fd808fcb
    • Laith Sakka's avatar
      use forwarding reference for ReferencedSource range loop item · 56291f47
      Laith Sakka authored
      Summary:
      When the elements in the containers are r-value references, or const l-value references, ReferencedSource fail to forward them.
      
      This update generalize the interface to make it work for all type of references.
      
      Reviewed By: ot, philippv
      
      Differential Revision: D32807312
      
      fbshipit-source-id: ec006aefd733e7f7fbf097a09b7cd50605ab0c9d
      56291f47
    • Alex Hornby's avatar
      snappy rpms break eden cmake build · 87e591be
      Alex Hornby authored
      Summary: On centos stream 8 the system snappy rpms break edenfs cmake build, so build it from the manifest instead
      
      Reviewed By: HarveyHunt
      
      Differential Revision: D32693521
      
      fbshipit-source-id: 4cc830d72cea27b6d15e55685038bb216377c9b9
      87e591be
    • Alex Hornby's avatar
      include system package state in cache key · aedb12b1
      Alex Hornby authored
      Summary: Using system packages changes the binaries, so include the used packages in the cache key when present
      
      Reviewed By: krallin
      
      Differential Revision: D32693534
      
      fbshipit-source-id: c0494667b57040dde680cea3e8e00d77ef48403b
      aedb12b1
    • Adam Simpkins's avatar
      allow explicit construction of ByteRange from std::string_view · cb6fb8cd
      Adam Simpkins authored
      Summary:
      This enables explicit construction of ByteRange from both `std::string_view`
      and `std::string`.
      
      We have allowed implicit construction of `ByteRange` from `StringPiece` ever
      since D518666.  `std::string_piece` is pretty equivalent to `StringPiece`, so
      this helps bring the behavior for the two closer to parity.
      
      Reviewed By: voznesenskym
      
      Differential Revision: D32633008
      
      fbshipit-source-id: fabba94b62bf471f1f8de5c35f844820993f0b0b
      cb6fb8cd
    • Adam Simpkins's avatar
      change some typedefs to using statements in Range.h · 3618ae79
      Adam Simpkins authored
      Summary:
      To address some lint warnings about C++ modernization, replace typedefs in
      Range.h with `using` declarations.
      
      Reviewed By: yfeldblum, ot, voznesenskym
      
      Differential Revision: D32635799
      
      fbshipit-source-id: a4d5a66b1a840fe36fd60661c21a52a4baaeeed9
      3618ae79
    • Mingtao Yang's avatar
      SSLContext: rename misleading loadClientCAList · 0121c4ee
      Mingtao Yang authored
      Summary:
      `loadClientCAList`, unlike `loadTrustedCertificates`, does not *append*
      "client ca"s to the current context, it *overrides* the list of acceptable
      client CA names.
      
      `load` vs `set` have subtle, but recognizable, semantic differences. There
      is a currently a bug in wangle::SSLContextManager that could have been
      prevented if the name was more wisely chosen.
      
      Rename to `setSupportedClientCertificateAuthorityNames`, which is verbose but
      * Makes the `load` vs `set` distinction clear.
      * Makes it clear that this has nothing to do with changing how client CAs are
        configured. All this does is set a list of supported names; nothing more.
        Existing call sites imply that authors misunderstood what this function
        was doing.
      
      Reviewed By: kylemirz
      
      Differential Revision: D32408104
      
      fbshipit-source-id: acf55c2e0b206e28e13e5922d719b43289a1c0f7
      0121c4ee
    • Adam Simpkins's avatar
      start renaming IOBuf::prependChain() to IOBuf::appendToChain() · 81f781c5
      Adam Simpkins authored
      Summary:
      The `prependChain()` and `appendChain()` method names have always been
      confusing, ever since they were first added in D271954.
      
      These methods prepend and append immediately before or after the current
      element.  However, because IOBuf chains are circular, this effectively means
      that `prependChain()` appends to the very end of the chain when called on the
      head of an IOBuf chain.  This is almost always how it is used in practice, so
      having it be named `prependChain()` is quite confusing.  (Note that in the
      initial version of D271954 these methods were originally named `appendChain()`
      and `appendChainHere()`, but were unfortunately renamed during review.)
      
      This diff adds alternate names for these methods, so we can migrate call sites
      to use the new names, and then deprecate these existing names.
      
      `appendToChain()` is the new recommended name for `prependChain()`, and
      `insertAfterThisOne()` is the new recommended name for `appendChain()`
      
      Reviewed By: voznesenskym
      
      Differential Revision: D32524091
      
      fbshipit-source-id: faf74f8803947c6452a10b58ced0c38efbd320fd
      81f781c5
  4. 02 Dec, 2021 12 commits
    • Jason Fried's avatar
      remove empty .pyx files · c424777a
      Jason Fried authored
      Summary: Remove the empty .pyx files to prevent the temptation to generate empty module.so from them.
      
      Reviewed By: nanshu
      
      Differential Revision: D32634255
      
      fbshipit-source-id: 277f954f3500811df4a8b16e08acf0b8092172c3
      c424777a
    • Nitin Garg's avatar
      Skip TSAN annotations for SharedMutex in Digest · ad230ca8
      Nitin Garg authored
      Summary:
      The slowdown from the tracking is making long running tests that also
      exercise it heavily to time out.
      
      Reviewed By: yfeldblum
      
      Differential Revision: D31715944
      
      fbshipit-source-id: 2b4354242dd035c2a4ba69a2aa3e05f2196ae949
      ad230ca8
    • Shai Szulanski's avatar
      exception_wrapper::terminate_with · 1891a99d
      Shai Szulanski authored
      Summary: Enables terminating the process with the wrapped exception, as if calling folly::terminate_with polymorphically
      
      Reviewed By: Gownta
      
      Differential Revision: D32776269
      
      fbshipit-source-id: d0d1ac374a38010bbe3ae608d22f7b2141d070e6
      1891a99d
    • Vladimir Matveev's avatar
      Convert cdef values into module level attributes · c4d6fcdd
      Vladimir Matveev authored
      Summary: As in title, replace cdef values with module level attributes
      
      Reviewed By: pranavtbhat
      
      Differential Revision: D32788433
      
      fbshipit-source-id: 7df97fd17a6aef9cd2d637f12c0bef8993fd253f
      c4d6fcdd
    • Alex Hornby's avatar
      zstd on ubuntu 18.04 is too old · b7b3c160
      Alex Hornby authored
      Summary: Ubuntu 18.04 zstd version is too old for the folly buikld
      
      Reviewed By: Croohand
      
      Differential Revision: D32693530
      
      fbshipit-source-id: 9de4b8d1eac1043b329016e487241e27bf6bb554
      b7b3c160
    • Alex Hornby's avatar
      dont use cmake 3.10 .deb, it reserves Python3::Interpreter · 39b52772
      Alex Hornby authored
      Summary:
      cmake 3.10 on ubuntu 18.04 reserves the Python3::Interpreter target so that the FBPythonBinary.cmake rules can't definite it when missing
      
      This breaks builds using the Python3::Interpreter rule, notably the python-six manifest which in turn is used by fbthrift
      
      The fix is to use the getdeps manifest cmake manifest instead on .deb platforms.  Once CI is on ubuntu 20.04 everywhere we could revisit
      
      Reviewed By: Croohand
      
      Differential Revision: D32693523
      
      fbshipit-source-id: 8521d904fba588941ab1efd0148f9d24a350e849
      39b52772
    • Alex Hornby's avatar
      add dry-run option to install-system-deps · 5783b9ab
      Alex Hornby authored
      Summary: Useful to be able to see what packages would be installed without doing it, and to see rpm vs deb packages
      
      Reviewed By: Croohand
      
      Differential Revision: D32693528
      
      fbshipit-source-id: a01257e7192f2f0299d57f6f8f7ee93452a6f3e4
      5783b9ab
    • Yedidya Feldblum's avatar
      fix MSVC C5219 conversion warnings in EventBase · de82c426
      Yedidya Feldblum authored
      Summary:
      Fixes warnings like the following:
      
      ```
      folly\io\async\EventBase.cpp(725): warning C5219: implicit conversion from '_Rep' to 'double', possible loss of data
              with
              [
                  _Rep=__int64
              ]
      folly\io\async\EventBase.cpp(738): warning C5219: implicit conversion from '_Rep' to 'double', possible loss of data
              with
              [
                  _Rep=__int64
              ]
      folly\io\async\EventBase.cpp(740): warning C5219: implicit conversion from 'size_t' to 'double', possible loss of data
      ```
      
      Reviewed By: luciang
      
      Differential Revision: D31330566
      
      fbshipit-source-id: 86a2cd10fdad53dce9c0ee0704b26bb1bce2bf18
      de82c426
    • Yedidya Feldblum's avatar
      cut macro FOLLY_HAVE_EVENTFD · a7426cc4
      Yedidya Feldblum authored
      Summary: No place which defines this nominally owns the name.
      
      Reviewed By: Gownta
      
      Differential Revision: D32632858
      
      fbshipit-source-id: ab5ee161b7c80f08a177c752c4bfe693cf9c9de3
      a7426cc4
    • Jacob Bower's avatar
      Allow custom global executor for native callbacks · 9549eeb5
      Jacob Bower authored
      Summary:
      Makes `folly::AsyncioExecutor` an abstract class and adds new `folly::python::setExecutorForLoop()` (C++) and `folly.executor.set_executor_for_loop()` (Python) functions. These control what is returned by `folly::python::getExecutor()` and `folly.executor.get_executor()` and hence allow installing a custom system for handling native callbacks on the Python event loop.
      
      In this implementation we only allow the executor for a given Python event loop to be set _once_ before being explicitly cleared. An alternative which was discussed was returning the previous executor when setting a new one, allowing the caller to stack them. My rationale for not doing this is I think this makes it too easy to accidentally "lose" callbacks registered with an existing executor.
      
      Reviewed By: vladima, pranavtbhat
      
      Differential Revision: D32486564
      
      fbshipit-source-id: 4c9ad4e5f2b7b89f1edafdb4eddd9ccacb23635f
      9549eeb5
    • Yedidya Feldblum's avatar
      invoke-qual macros · 91a18af1
      Yedidya Feldblum authored
      Summary: For invoking things given possible-qualified names. Differs from invoke-free as the latter accepts an optional list of namespaces scope to include in name lookup but does not permit qualified names and does not admit a lambda variation.
      
      Reviewed By: Gownta
      
      Differential Revision: D32670267
      
      fbshipit-source-id: f9b9e33bd1e3cfa1c191eb8c91b3f50bb0e9734e
      91a18af1
    • Yedidya Feldblum's avatar
      a comment about not using badges with unknown callees · a97e36d6
      Yedidya Feldblum authored
      Reviewed By: Gownta
      
      Differential Revision: D32747533
      
      fbshipit-source-id: f3fe004797eeaf22ae1db85f27b547dc7ad7cfbc
      a97e36d6
  5. 01 Dec, 2021 5 commits
    • Alex Hornby's avatar
      add os type filtering to generate-github-actions · 823ec7bd
      Alex Hornby authored
      Summary: Hand to do just one
      
      Reviewed By: zpao
      
      Differential Revision: D32693529
      
      fbshipit-source-id: ac27c79f8a43c540e3b0836eba3a40bd61dd725b
      823ec7bd
    • Vladimir Matveev's avatar
      Add a cache for the last seen event loop to avoid lookup cost · b62b4231
      Vladimir Matveev authored
      Summary: As in title, skip lookup in `WeakKeyDictionary` for repeated `get_fiber_manager` calls on the same event loop
      
      Reviewed By: pranavtbhat
      
      Differential Revision: D32566214
      
      fbshipit-source-id: 7a9305ef88538ae4ef422283bc1b8a4140b8ea33
      b62b4231
    • Alex Hornby's avatar
      change to upload-artifact@v2 · d873835c
      Alex Hornby authored
      Summary: Update to new version of upload-artifact without branch name as that's a separate repo that our dynamic branch settings should not apply to.
      
      Reviewed By: zpao
      
      Differential Revision: D32717494
      
      fbshipit-source-id: 968908d1072d6d4550705e7df0b3828528e057dc
      d873835c
    • Alex Hornby's avatar
      run the github actions update · 8cf76910
      Alex Hornby authored
      Summary: Pick up the changes from master to main change
      
      Reviewed By: zpao
      
      Differential Revision: D32693532
      
      fbshipit-source-id: 8cf68e3310b4d2daf71fb10eee7a801c6eabbd48
      8cf76910
    • Alex Hornby's avatar
      update github actions default from master to main · fc008166
      Alex Hornby authored
      Summary: Branches updated some time ago, update this to match
      
      Reviewed By: zpao
      
      Differential Revision: D32693531
      
      fbshipit-source-id: 02da79e3fb5fcd3b204be4605521a151b977ce2c
      fc008166
  6. 30 Nov, 2021 9 commits
    • Samuel Miller's avatar
      Migrate get509() callsite to OpenSSLTransportCert · ec528801
      Samuel Miller authored
      Summary:
      Before removing `getX509()` from `AsyncTransportCertificate` we need to migrate
      all the callsites to `OpenSSLTransportCertificate`.
      
      Differential Revision: D30487611
      
      fbshipit-source-id: 50deea4904b7b6a6c08c6d4fd0c635a4bc8774cb
      ec528801
    • Shai Szulanski's avatar
      Add method pointer overloads of CoInvoke gmock helpers · b0d73b7b
      Shai Szulanski authored
      Summary: Match overloads of upstream Invoke action to ease migration
      
      Reviewed By: ispeters
      
      Differential Revision: D32706320
      
      fbshipit-source-id: d9564f63e534e3651433806fcf4f1fff7730fcc5
      b0d73b7b
    • Yan Soares Couto's avatar
      Delete Mononoke getdeps builds · 9d7c9e70
      Yan Soares Couto authored
      Summary: Mononoke has decided to no longer support getdeps builds. This diff deletes all mentions to those I could find.
      
      Reviewed By: StanislavGlebik
      
      Differential Revision: D32469441
      
      fbshipit-source-id: a11b3f1d5c57ef20792deb0e7f164e655f62648c
      9d7c9e70
    • Dmytro Stechenko's avatar
      Add subset to superset badge lifting · 9a519751
      Dmytro Stechenko authored
      Summary:
      Conversion for cases when we have a `folly::any_badge<A, B>` and want to call some function that accepts `folly::any_badge<A, B, C>`.
      ```
      void call_superset(folly::any_badge<A, B, C>);
      void call_subset(folly::any_badge<A, B> badges) { call_superset(badges); }
      
      // somewhere in A class
      call_subset(folly::badge<A>{});
      
      // somewhere in B class
      call_subset(folly::badge<B>{});
      ```
      
      Also establish bidirectional conversions between `folly::badge<A>` and `folly::any_badge<A>`.
      
      Reviewed By: yfeldblum
      
      Differential Revision: D32697212
      
      fbshipit-source-id: 2f55d0b5015e133166fcdd6d9c25a0e396c2a151
      9a519751
    • Alex Hornby's avatar
      fix distro name · 4faac360
      Alex Hornby authored
      Summary: Missed this when switching from spaces to underscores in distro names
      
      Reviewed By: krallin
      
      Differential Revision: D32693527
      
      fbshipit-source-id: 658504d76c96defd3f1a217ada8b05f99c841ede
      4faac360
    • Alex Hornby's avatar
      update openssl · fae3a56c
      Alex Hornby authored
      Summary: Update it
      
      Reviewed By: krallin
      
      Differential Revision: D32641645
      
      fbshipit-source-id: 77ad7a2771804ac9d32dc38982635b45863af4dc
      fae3a56c
    • Yedidya Feldblum's avatar
      fix param name in FOLLY_CREATE_FREE_INVOKER_SUITE · 51391b69
      Yedidya Feldblum authored
      Reviewed By: Gownta
      
      Differential Revision: D32669969
      
      fbshipit-source-id: 4e0cd2cf73ba695720dd41416d0d04a3996385da
      51391b69
    • Yedidya Feldblum's avatar
      more asan wrappers for fibers · 20047d63
      Yedidya Feldblum authored
      Summary: Wrap more of poisoning/unpoisoning and fiber stack switching.
      
      Reviewed By: luciang
      
      Differential Revision: D31635307
      
      fbshipit-source-id: 9a6f9adbefe6fd995cfa864e0498102e237e6351
      20047d63
    • Yedidya Feldblum's avatar
      tweak in-place backport · d9ae16d1
      Yedidya Feldblum authored
      Summary:
      Use inline variables to avoid the function-pointer trick.
      
      Use explicit default constructors per the types in the standard.
      
      Import the names from the standard in C++17.
      
      This allows declaring a function with tags from one namespace and calling the function with tags from the other namespace in C++17.
      
      Reviewed By: vitaut
      
      Differential Revision: D32588945
      
      fbshipit-source-id: 0ece26ebf7f9f6acf9abb8b008327f06f84091f2
      d9ae16d1
  7. 29 Nov, 2021 1 commit
    • Lucian Grijincu's avatar
      __folly_memcpy: allow overlapping buffers of any size and provide drop-in replacement for memmove · e19669d3
      Lucian Grijincu authored
      Summary:
      `__folly_memcpy` already behaved as `memmove` for n <= 256B.
      
      For n > 256B and overlapping buffers `__folly_memcpy` did some work
      - it determined the size is large enough for 128B AVX loads/stores
      - it has already copied the first 128B and the last 128B in YMM registers
      
      but then discarded it and fell back on `memmove`.
      
      Instead of wasting this work, forward copy (dst < src) or backward copy (dst > src).
      - use unaligned loads + aligned stores, but not non-temporal stores
      - for dst < src forward copy in 128 byte batches:
      -- unaligned load the first 32 bytes & last 4 x 32 bytes
      -- forward copy (unaligned load + aligned stores) 4 x 32 bytes at a time
      -- unaligned store the first 32 bytes & last 4 x 32 bytes
      - for dst > src backward copy in 128 byte batches:
      -- unaligned load the first 4 x 32 bytes & last 32 bytes
      -- backward copy (unaligned load + aligned stores) 4 x 32 bytes at a time
      -- unaligned store the first 4 x 32 bytes & last 32 bytes
      
      Reviewed By: yfeldblum
      
      Differential Revision: D31915389
      
      fbshipit-source-id: 2c0197b2bddc102a7fb8f70a6f43e79ac994dc73
      e19669d3