Skip to content

[grid] Migrate cache builder to use Caffeine #15547

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 2 commits into
base: trunk
Choose a base branch
from
Draft

Conversation

VietND96
Copy link
Member

@VietND96 VietND96 commented Apr 2, 2025

Thanks for contributing to Selenium!
A PR well described will help maintainers to quickly review and merge it

Before submitting your PR, please check our contributing guidelines.
Avoid large PRs, help reviewers by making them as simple and short as possible.

Motivation and Context

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist

  • I have read the contributing document.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@VietND96 VietND96 added the B-grid Everything grid and server related label Apr 2, 2025
@VietND96 VietND96 requested a review from joerg1985 April 2, 2025 00:18
Copy link
Contributor

qodo-merge-pro bot commented Apr 2, 2025

CI Feedback 🧐

A test triggered by this PR failed. Here is an AI-generated analysis of the failure:

Action: Ruby / Local Tests (chrome, windows) / Local Tests (chrome, windows)

Failed stage: Run Bazel [❌]

Failed test name: //rb/spec/integration/selenium/webdriver:fedcm-chrome

Failure summary:

The action failed because the test //rb/spec/integration/selenium/webdriver:fedcm-chrome failed with
timeout errors. Specifically, three test cases in the FedCM module failed:

1. "returns the type" - Failed with timeout after 5 seconds when waiting for FedCM dialog
2.
"selects an account" - Failed with timeout after 5 seconds when waiting for FedCM dialog
3. "resets
the cooldown" - Failed with timeout after 5 seconds when waiting for FedCM dialog

All three failures occurred in the wait_for_fedcm_dialog method at line 46 in
./rb/lib/selenium/webdriver/common/driver_extensions/has_fedcm_dialog.rb with the same error: "timed
out after 5 seconds".

Relevant error logs:
1:  ##[group]Operating System
2:  Microsoft Windows Server 2022
...

527:  ==> Locally signing trusted keys in keyring...
528:  -> Locally signed 5 keys.
529:  ==> Importing owner trust values...
530:  gpg: setting ownertrust to 4
531:  gpg: setting ownertrust to 4
532:  gpg: setting ownertrust to 4
533:  gpg: setting ownertrust to 4
534:  gpg: setting ownertrust to 4
535:  ==> Disabling revoked keys in keyring...
536:  -> Disabled 4 keys.
537:  ==> Updating trust database...
538:  gpg: marginals needed: 3  completes needed: 1  trust model: pgp
539:  gpg: depth: 0  valid:   1  signed:   5  trust: 0-, 0q, 0n, 0m, 0f, 1u
540:  gpg: depth: 1  valid:   5  signed:   6  trust: 0-, 0q, 0n, 5m, 0f, 0u
541:  gpg: depth: 2  valid:   3  signed:   2  trust: 3-, 0q, 0n, 0m, 0f, 0u
542:  gpg: error retrieving '[email protected]' via WKD: No data
543:  gpg: error reading key: No data
544:  gpg: refreshing 1 key from hkps://keyserver.ubuntu.com
545:  gpg: key F40D263ECA25678A: "Alexey Pavlov (Alexpux) <[email protected]>" not changed
546:  gpg: Total number processed: 1
547:  gpg:              unchanged: 1
548:  gpg: error retrieving '[email protected]' via WKD: No data
549:  gpg: error reading key: No data
550:  gpg: refreshing 1 key from hkps://keyserver.ubuntu.com
551:  gpg: key 790AE56A1D3CFDDC: "David Macek (MSYS2 master key) <[email protected]>" not changed
552:  gpg: Total number processed: 1
553:  gpg:              unchanged: 1
554:  gpg: error retrieving '[email protected]' via WKD: No data
555:  gpg: error reading key: No data
556:  gpg: refreshing 1 key from hkps://keyserver.ubuntu.com
557:  gpg: key DA7EF2ABAEEA755C: "Martell Malone (martell) <[email protected]>" not changed
558:  gpg: Total number processed: 1
559:  gpg:              unchanged: 1
560:  gpg: error retrieving '[email protected]' via WKD: No data
561:  gpg: error reading key: No data
562:  gpg: refreshing 1 key from hkps://keyserver.ubuntu.com
563:  gpg: key 755B8182ACD22879: "Christoph Reiter (MSYS2 master key) <[email protected]>" not changed
564:  gpg: Total number processed: 1
565:  gpg:              unchanged: 1
566:  gpg: error retrieving '[email protected]' via WKD: No data
567:  gpg: error reading key: No data
568:  gpg: refreshing 1 key from hkps://keyserver.ubuntu.com
569:  gpg: key 9F418C233E652008: "Ignacio Casal Quinteiro <[email protected]>" not changed
570:  gpg: Total number processed: 1
571:  gpg:              unchanged: 1
572:  gpg: error retrieving '[email protected]' via WKD: No data
573:  gpg: error reading key: No data
574:  gpg: refreshing 1 key from hkps://keyserver.ubuntu.com
575:  gpg: key BBE514E53E0D0813: "Ray Donnelly (MSYS2 Developer - master key) <[email protected]>" not changed
576:  gpg: Total number processed: 1
577:  gpg:              unchanged: 1
578:  gpg: error retrieving '[email protected]' via WKD: No data
579:  gpg: error reading key: No data
580:  gpg: refreshing 1 key from hkps://keyserver.ubuntu.com
581:  gpg: key 5F92EFC1A47D45A1: "Alexey Pavlov (Alexpux) <[email protected]>" not changed
582:  gpg: Total number processed: 1
583:  gpg:              unchanged: 1
584:  gpg: error retrieving '[email protected]' via WKD: No data
585:  gpg: error reading key: No data
586:  gpg: refreshing 1 key from hkps://keyserver.ubuntu.com
587:  gpg: key 974C8BE49078F532: "David Macek <[email protected]>" 3 new signatures
588:  gpg: key 974C8BE49078F532: "David Macek <[email protected]>" 1 signature cleaned
589:  gpg: Total number processed: 1
590:  gpg:         new signatures: 3
591:  gpg:     signatures cleaned: 1
592:  gpg: marginals needed: 3  completes needed: 1  trust model: pgp
593:  gpg: depth: 0  valid:   1  signed:   5  trust: 0-, 0q, 0n, 0m, 0f, 1u
594:  gpg: depth: 1  valid:   5  signed:   7  trust: 0-, 0q, 0n, 5m, 0f, 0u
595:  gpg: depth: 2  valid:   4  signed:   2  trust: 4-, 0q, 0n, 0m, 0f, 0u
596:  gpg: next trustdb check due at 2025-08-13
597:  gpg: error retrieving '[email protected]' via WKD: No data
598:  gpg: error reading key: No data
599:  gpg: refreshing 1 key from hkps://keyserver.ubuntu.com
600:  gpg: key FA11531AA0AA7F57: "Christoph Reiter (MSYS2 development key) <[email protected]>" not changed
601:  gpg: Total number processed: 1
602:  gpg:              unchanged: 1
603:  �[32mAnalyzing:�[0m 30 targets (298 packages loaded, 9403 targets configured)
604:  �[32mAnalyzing:�[0m 30 targets (328 packages loaded, 9890 targets configured)
605:  �[35mWARNING: �[0mD:/_bazel/external/io_bazel_rules_closure/java/com/google/javascript/jscomp/BUILD:19:13: in java_library rule @@io_bazel_rules_closure//java/com/google/javascript/jscomp:jscomp: target '@@io_bazel_rules_closure//java/com/google/javascript/jscomp:jscomp' depends on deprecated target '@@io_bazel_rules_closure//java/io/bazel/rules/closure:build_info_java_proto': Use java_proto_library from com_google_protobuf
606:  �[32mAnalyzing:�[0m 30 targets (346 packages loaded, 10587 targets configured)
607:  gpg: error retrieving '[email protected]' via WKD: Try again later
608:  gpg: error reading key: Try again later
609:  gpg: refreshing 1 key from hkps://keyserver.ubuntu.com
610:  gpg: key 794DCF97F93FC717: "Martell Malone (martell) <[email protected]>" not changed
611:  gpg: Total number processed: 1
612:  gpg:              unchanged: 1
613:  gpg: error retrieving '[email protected]' via WKD: No data
614:  gpg: error reading key: No data
615:  gpg: refreshing 1 key from hkps://keyserver.ubuntu.com
616:  gpg: key D595C9AB2C51581E: "Martell Malone (MSYS2 Developer) <[email protected]>" not changed
617:  gpg: Total number processed: 1
618:  gpg:              unchanged: 1
619:  gpg: error retrieving '[email protected]' via WKD: No data
620:  gpg: error reading key: No data
621:  gpg: refreshing 1 key from hkps://keyserver.ubuntu.com
...

726:  cl : Command line warning D9002 : ignoring unknown option '-std=c++14'
727:  �[32mINFO: �[0mFrom Compiling absl/debugging/internal/vdso_support.cc [for tool]:
728:  cl : Command line warning D9002 : ignoring unknown option '-std=c++14'
729:  �[32mINFO: �[0mFrom Compiling absl/debugging/internal/elf_mem_image.cc [for tool]:
730:  cl : Command line warning D9002 : ignoring unknown option '-std=c++14'
731:  �[32mINFO: �[0mFrom Compiling absl/debugging/internal/address_is_readable.cc [for tool]:
732:  cl : Command line warning D9002 : ignoring unknown option '-std=c++14'
733:  �[32mINFO: �[0mFrom Compiling absl/debugging/stacktrace.cc [for tool]:
734:  cl : Command line warning D9002 : ignoring unknown option '-std=c++14'
735:  �[32mINFO: �[0mFrom Compiling absl/types/bad_variant_access.cc [for tool]:
736:  cl : Command line warning D9002 : ignoring unknown option '-std=c++14'
737:  �[32mINFO: �[0mFrom Compiling absl/profiling/internal/exponential_biased.cc [for tool]:
738:  cl : Command line warning D9002 : ignoring unknown option '-std=c++14'
739:  �[32mINFO: �[0mFrom Compiling absl/strings/internal/cordz_functions.cc [for tool]:
740:  cl : Command line warning D9002 : ignoring unknown option '-std=c++14'
741:  �[32mINFO: �[0mFrom Compiling absl/base/internal/strerror.cc [for tool]:
742:  cl : Command line warning D9002 : ignoring unknown option '-std=c++14'
...

1779:  variable set to see warnings about usage of the old API. This will
1780:  help you to identify any changes that you need to make to your code.
1781:  See https://github.com/rubyzip/rubyzip/wiki/Updating-to-version-3.x for
1782:  more information.
1783:  Please ensure that your Gemfiles and .gemspecs are suitably restrictive
1784:  to avoid an unexpected breakage when 3.0 is released (e.g. ~> 2.3.0).
1785:  See https://github.com/rubyzip/rubyzip for details. The Changelog also
1786:  lists other enhancements and bugfixes that have been implemented since
1787:  version 2.3.0.
1788:  2 installed gems you directly depend on are looking for funding.
1789:  Run `bundle fund` for details
1790:  �[32m[1,098 / 1,099]�[0m Running bundle install (@bundle//:bundle); 401s local, disk-cache
1791:  �[32m[1,099 / 1,102]�[0m checking cached actions
1792:  �[32m[1,099 / 1,122]�[0m [Prepa] Testing //rb/spec/integration/selenium/webdriver:manager-chrome
1793:  �[32m[1,099 / 1,123]�[0m [Prepa] Testing //rb/spec/integration/selenium/webdriver:manager-chrome ... (4 actions, 0 running)
1794:  �[32m[1,099 / 1,123]�[0m Testing //rb/spec/integration/selenium/webdriver:error-chrome; 1s disk-cache ... (4 actions, 0 running)
1795:  �[32m[1,099 / 1,123]�[0m Testing //rb/spec/integration/selenium/webdriver:error-chrome; 8s disk-cache ... (4 actions, 0 running)
1796:  �[32m[1,099 / 1,123]�[0m Testing //rb/spec/integration/selenium/webdriver:error-chrome; 33s disk-cache ... (4 actions, 0 running)
1797:  �[32m[1,099 / 1,123]�[0m Testing //rb/spec/integration/selenium/webdriver:navigation-chrome; 1s local, disk-cache ... (4 actions, 1 running)
...

1832:  �[31m�[1mFAIL: �[0m//rb/spec/integration/selenium/webdriver:fedcm-chrome (see D:/_bazel/execroot/_main/bazel-out/x64_windows-fastbuild/testlogs/rb/spec/integration/selenium/webdriver/fedcm-chrome/test_attempts/attempt_2.log)
1833:  �[32m[1,107 / 1,123]�[0m 8 / 30 tests;�[0m Testing //rb/spec/integration/selenium/webdriver:fedcm-chrome; 107s local, disk-cache ... (4 actions, 2 running)
1834:  �[32m[1,107 / 1,123]�[0m 8 / 30 tests;�[0m Testing //rb/spec/integration/selenium/webdriver:fedcm-chrome; 117s local, disk-cache ... (4 actions, 3 running)
1835:  �[32m[1,108 / 1,123]�[0m 9 / 30 tests;�[0m Testing //rb/spec/integration/selenium/webdriver:fedcm-chrome; 118s local, disk-cache ... (4 actions, 2 running)
1836:  �[32m[1,108 / 1,123]�[0m 9 / 30 tests;�[0m Testing //rb/spec/integration/selenium/webdriver:fedcm-chrome; 128s local, disk-cache ... (4 actions, 2 running)
1837:  �[32m[1,108 / 1,123]�[0m 9 / 30 tests;�[0m Testing //rb/spec/integration/selenium/webdriver:fedcm-chrome; 130s local, disk-cache ... (4 actions, 3 running)
1838:  �[32m[1,109 / 1,123]�[0m 10 / 30 tests;�[0m Testing //rb/spec/integration/selenium/webdriver:fedcm-chrome; 131s local, disk-cache ... (4 actions, 2 running)
1839:  �[32m[1,109 / 1,123]�[0m 10 / 30 tests;�[0m Testing //rb/spec/integration/selenium/webdriver:fedcm-chrome; 132s local, disk-cache ... (4 actions, 2 running)
1840:  �[32m[1,109 / 1,123]�[0m 10 / 30 tests;�[0m Testing //rb/spec/integration/selenium/webdriver:fedcm-chrome; 138s local, disk-cache ... (4 actions, 2 running)
1841:  �[32m[1,110 / 1,123]�[0m 11 / 30 tests;�[0m Testing //rb/spec/integration/selenium/webdriver:fedcm-chrome; 140s local, disk-cache ... (4 actions, 1 running)
1842:  �[32m[1,110 / 1,123]�[0m 11 / 30 tests;�[0m Testing //rb/spec/integration/selenium/webdriver:fedcm-chrome; 147s local, disk-cache ... (4 actions, 1 running)
1843:  �[32m[1,110 / 1,123]�[0m 11 / 30 tests;�[0m Testing //rb/spec/integration/selenium/webdriver:fedcm-chrome; 150s local, disk-cache ... (4 actions, 1 running)
1844:  �[32m[1,110 / 1,123]�[0m 11 / 30 tests;�[0m Testing //rb/spec/integration/selenium/webdriver:fedcm-chrome; 154s local, disk-cache ... (4 actions, 1 running)
1845:  �[32m[1,110 / 1,123]�[0m 11 / 30 tests;�[0m Testing //rb/spec/integration/selenium/webdriver:fedcm-chrome; 165s local, disk-cache ... (4 actions, 2 running)
1846:  �[31m�[1mFAIL: �[0m//rb/spec/integration/selenium/webdriver:fedcm-chrome (see D:/_bazel/execroot/_main/bazel-out/x64_windows-fastbuild/testlogs/rb/spec/integration/selenium/webdriver/fedcm-chrome/test.log)
1847:  �[31m�[1mFAILED: �[0m//rb/spec/integration/selenium/webdriver:fedcm-chrome (Summary)
1848:  D:/_bazel/execroot/_main/bazel-out/x64_windows-fastbuild/testlogs/rb/spec/integration/selenium/webdriver/fedcm-chrome/test.log
1849:  D:/_bazel/execroot/_main/bazel-out/x64_windows-fastbuild/testlogs/rb/spec/integration/selenium/webdriver/fedcm-chrome/test_attempts/attempt_1.log
1850:  D:/_bazel/execroot/_main/bazel-out/x64_windows-fastbuild/testlogs/rb/spec/integration/selenium/webdriver/fedcm-chrome/test_attempts/attempt_2.log
1851:  �[32mINFO: �[0mFrom Testing //rb/spec/integration/selenium/webdriver:fedcm-chrome:
1852:  ==================== Test output for //rb/spec/integration/selenium/webdriver:fedcm-chrome:
1853:  Running Ruby specs:
1854:  browser: chrome
1855:  driver: chrome
1856:  version: 135.0.7049.42
1857:  platform: windows
1858:  ci: github
1859:  rbe: false
1860:  ruby: ruby 3.1.6p260 (2024-05-29 revision a777087be6) [x64-mingw-ucrt]
1861:  Selenium::WebDriver::FedCM
1862:  without dialog present
1863:  throws an error
1864:  with dialog present
1865:  returns the title
1866:  returns the subtitle (PENDING: Investigate flakiness only on pipeline)
1867:  returns the type (FAILED - 1)
1868:  returns the accounts
1869:  selects an account (FAILED - 2)
1870:  clicks the dialog (PENDING: Investigate IDP config issue)
1871:  cancels the dialog
1872:  sets the delay
1873:  resets the cooldown (FAILED - 3)
1874:  Pending: (Failures listed here are expected and do not affect your suite's status)
1875:  1) Selenium::WebDriver::FedCM with dialog present returns the subtitle
1876:  # Investigate flakiness only on pipeline
1877:  # ./rb/spec/integration/selenium/webdriver/fedcm_spec.rb:53
1878:  2) Selenium::WebDriver::FedCM with dialog present clicks the dialog
1879:  # Investigate IDP config issue
1880:  # ./rb/spec/integration/selenium/webdriver/fedcm_spec.rb:70
1881:  Failures:
1882:  1) Selenium::WebDriver::FedCM with dialog present returns the type
1883:  Failure/Error: driver.wait_for_fedcm_dialog
1884:  Selenium::WebDriver::Error::TimeoutError:
1885:  timed out after 5 seconds
1886:  # ./rb/lib/selenium/webdriver/common/wait.rb:73:in `until'
1887:  # ./rb/lib/selenium/webdriver/common/driver_extensions/has_fedcm_dialog.rb:46:in `wait_for_fedcm_dialog'
1888:  # ./rb/spec/integration/selenium/webdriver/fedcm_spec.rb:46:in `block (3 levels) in <module:FedCM>'
1889:  2) Selenium::WebDriver::FedCM with dialog present selects an account
1890:  Failure/Error: driver.wait_for_fedcm_dialog
1891:  Selenium::WebDriver::Error::TimeoutError:
1892:  timed out after 5 seconds
1893:  # ./rb/lib/selenium/webdriver/common/wait.rb:73:in `until'
1894:  # ./rb/lib/selenium/webdriver/common/driver_extensions/has_fedcm_dialog.rb:46:in `wait_for_fedcm_dialog'
1895:  # ./rb/spec/integration/selenium/webdriver/fedcm_spec.rb:46:in `block (3 levels) in <module:FedCM>'
1896:  3) Selenium::WebDriver::FedCM with dialog present resets the cooldown
1897:  Failure/Error: driver.wait_for_fedcm_dialog
1898:  Selenium::WebDriver::Error::TimeoutError:
1899:  timed out after 5 seconds
1900:  # ./rb/lib/selenium/webdriver/common/wait.rb:73:in `until'
1901:  # ./rb/lib/selenium/webdriver/common/driver_extensions/has_fedcm_dialog.rb:46:in `wait_for_fedcm_dialog'
1902:  # ./rb/spec/integration/selenium/webdriver/fedcm_spec.rb:46:in `block (3 levels) in <module:FedCM>'
1903:  Finished in 22.98 seconds (files took 1.5 seconds to load)
1904:  10 examples, 3 failures, 2 pending
1905:  Failed examples:
1906:  rspec ./rb/spec/integration/selenium/webdriver/fedcm_spec.rb:57 # Selenium::WebDriver::FedCM with dialog present returns the type
1907:  rspec ./rb/spec/integration/selenium/webdriver/fedcm_spec.rb:66 # Selenium::WebDriver::FedCM with dialog present selects an account
1908:  rspec ./rb/spec/integration/selenium/webdriver/fedcm_spec.rb:83 # Selenium::WebDriver::FedCM with dialog present resets the cooldown
1909:  ================================================================================
1910:  ==================== Test output for //rb/spec/integration/selenium/webdriver:fedcm-chrome:
1911:  Running Ruby specs:
1912:  browser: chrome
1913:  driver: chrome
1914:  version: 135.0.7049.42
1915:  platform: windows
1916:  ci: github
1917:  rbe: false
1918:  ruby: ruby 3.1.6p260 (2024-05-29 revision a777087be6) [x64-mingw-ucrt]
1919:  Selenium::WebDriver::FedCM
1920:  without dialog present
1921:  throws an error
1922:  with dialog present
1923:  returns the title
1924:  returns the subtitle (PENDING: Investigate flakiness only on pipeline)
1925:  returns the type (FAILED - 1)
1926:  returns the accounts
1927:  selects an account (FAILED - 2)
1928:  clicks the dialog (PENDING: Investigate IDP config issue)
1929:  cancels the dialog
1930:  sets the delay
1931:  resets the cooldown (FAILED - 3)
1932:  Pending: (Failures listed here are expected and do not affect your suite's status)
1933:  1) Selenium::WebDriver::FedCM with dialog present returns the subtitle
1934:  # Investigate flakiness only on pipeline
1935:  # ./rb/spec/integration/selenium/webdriver/fedcm_spec.rb:53
1936:  2) Selenium::WebDriver::FedCM with dialog present clicks the dialog
1937:  # Investigate IDP config issue
1938:  # ./rb/spec/integration/selenium/webdriver/fedcm_spec.rb:70
1939:  Failures:
1940:  1) Selenium::WebDriver::FedCM with dialog present returns the type
1941:  Failure/Error: driver.wait_for_fedcm_dialog
1942:  Selenium::WebDriver::Error::TimeoutError:
1943:  timed out after 5 seconds
1944:  # ./rb/lib/selenium/webdriver/common/wait.rb:73:in `until'
1945:  # ./rb/lib/selenium/webdriver/common/driver_extensions/has_fedcm_dialog.rb:46:in `wait_for_fedcm_dialog'
1946:  # ./rb/spec/integration/selenium/webdriver/fedcm_spec.rb:46:in `block (3 levels) in <module:FedCM>'
1947:  2) Selenium::WebDriver::FedCM with dialog present selects an account
1948:  Failure/Error: driver.wait_for_fedcm_dialog
1949:  Selenium::WebDriver::Error::TimeoutError:
1950:  timed out after 5 seconds
1951:  # ./rb/lib/selenium/webdriver/common/wait.rb:73:in `until'
1952:  # ./rb/lib/selenium/webdriver/common/driver_extensions/has_fedcm_dialog.rb:46:in `wait_for_fedcm_dialog'
1953:  # ./rb/spec/integration/selenium/webdriver/fedcm_spec.rb:46:in `block (3 levels) in <module:FedCM>'
1954:  3) Selenium::WebDriver::FedCM with dialog present resets the cooldown
1955:  Failure/Error: driver.wait_for_fedcm_dialog
1956:  Selenium::WebDriver::Error::TimeoutError:
1957:  timed out after 5 seconds
1958:  # ./rb/lib/selenium/webdriver/common/wait.rb:73:in `until'
1959:  # ./rb/lib/selenium/webdriver/common/driver_extensions/has_fedcm_dialog.rb:46:in `wait_for_fedcm_dialog'
1960:  # ./rb/spec/integration/selenium/webdriver/fedcm_spec.rb:46:in `block (3 levels) in <module:FedCM>'
1961:  Finished in 22.88 seconds (files took 1.13 seconds to load)
1962:  10 examples, 3 failures, 2 pending
1963:  Failed examples:
1964:  rspec ./rb/spec/integration/selenium/webdriver/fedcm_spec.rb:57 # Selenium::WebDriver::FedCM with dialog present returns the type
1965:  rspec ./rb/spec/integration/selenium/webdriver/fedcm_spec.rb:66 # Selenium::WebDriver::FedCM with dialog present selects an account
1966:  rspec ./rb/spec/integration/selenium/webdriver/fedcm_spec.rb:83 # Selenium::WebDriver::FedCM with dialog present resets the cooldown
1967:  ================================================================================
1968:  ==================== Test output for //rb/spec/integration/selenium/webdriver:fedcm-chrome:
1969:  Running Ruby specs:
1970:  browser: chrome
1971:  driver: chrome
1972:  version: 135.0.7049.42
1973:  platform: windows
1974:  ci: github
1975:  rbe: false
1976:  ruby: ruby 3.1.6p260 (2024-05-29 revision a777087be6) [x64-mingw-ucrt]
1977:  Selenium::WebDriver::FedCM
1978:  without dialog present
1979:  throws an error
1980:  with dialog present
1981:  returns the title
1982:  returns the subtitle (PENDING: Investigate flakiness only on pipeline)
1983:  returns the type (FAILED - 1)
1984:  returns the accounts
1985:  selects an account (FAILED - 2)
1986:  clicks the dialog (PENDING: Investigate IDP config issue)
1987:  cancels the dialog
1988:  sets the delay
1989:  resets the cooldown (FAILED - 3)
1990:  Pending: (Failures listed here are expected and do not affect your suite's status)
1991:  1) Selenium::WebDriver::FedCM with dialog present returns the subtitle
1992:  # Investigate flakiness only on pipeline
1993:  # ./rb/spec/integration/selenium/webdriver/fedcm_spec.rb:53
1994:  2) Selenium::WebDriver::FedCM with dialog present clicks the dialog
1995:  # Investigate IDP config issue
1996:  # ./rb/spec/integration/selenium/webdriver/fedcm_spec.rb:70
1997:  Failures:
1998:  1) Selenium::WebDriver::FedCM with dialog present returns the type
1999:  Failure/Error: driver.wait_for_fedcm_dialog
2000:  Selenium::WebDriver::Error::TimeoutError:
2001:  timed out after 5 seconds
2002:  # ./rb/lib/selenium/webdriver/common/wait.rb:73:in `until'
2003:  # ./rb/lib/selenium/webdriver/common/driver_extensions/has_fedcm_dialog.rb:46:in `wait_for_fedcm_dialog'
2004:  # ./rb/spec/integration/selenium/webdriver/fedcm_spec.rb:46:in `block (3 levels) in <module:FedCM>'
2005:  2) Selenium::WebDriver::FedCM with dialog present selects an account
2006:  Failure/Error: driver.wait_for_fedcm_dialog
2007:  Selenium::WebDriver::Error::TimeoutError:
2008:  timed out after 5 seconds
2009:  # ./rb/lib/selenium/webdriver/common/wait.rb:73:in `until'
2010:  # ./rb/lib/selenium/webdriver/common/driver_extensions/has_fedcm_dialog.rb:46:in `wait_for_fedcm_dialog'
2011:  # ./rb/spec/integration/selenium/webdriver/fedcm_spec.rb:46:in `block (3 levels) in <module:FedCM>'
2012:  3) Selenium::WebDriver::FedCM with dialog present resets the cooldown
2013:  Failure/Error: driver.wait_for_fedcm_dialog
2014:  Selenium::WebDriver::Error::TimeoutError:
2015:  timed out after 5 seconds
2016:  # ./rb/lib/selenium/webdriver/common/wait.rb:73:in `until'
2017:  # ./rb/lib/selenium/webdriver/common/driver_extensions/has_fedcm_dialog.rb:46:in `wait_for_fedcm_dialog'
2018:  # ./rb/spec/integration/selenium/webdriver/fedcm_spec.rb:46:in `block (3 levels) in <module:FedCM>'
2019:  Finished in 22.98 seconds (files took 1.35 seconds to load)
2020:  10 examples, 3 failures, 2 pending
2021:  Failed examples:
2022:  rspec ./rb/spec/integration/selenium/webdriver/fedcm_spec.rb:57 # Selenium::WebDriver::FedCM with dialog present returns the type
2023:  rspec ./rb/spec/integration/selenium/webdriver/fedcm_spec.rb:66 # Selenium::WebDriver::FedCM with dialog present selects an account
2024:  rspec ./rb/spec/integration/selenium/webdriver/fedcm_spec.rb:83 # Selenium::WebDriver::FedCM with dialog present resets the cooldown
2025:  ================================================================================
2026:  �[32m[1,111 / 1,123]�[0m 12 / 30 tests, �[31m�[1m1 failed�[0m;�[0m [Sched] Testing //rb/spec/integration/selenium/webdriver:action_builder-chrome; 19s ... (4 actions, 1 running)
2027:  �[32m[1,111 / 1,123]�[0m 12 / 30 tests, �[31m�[1m1 failed�[0m;�[0m [Sched] Testing //rb/spec/integration/selenium/webdriver/remote:driver-chrome; 16s ... (4 actions, 2 running)
2028:  �[32m[1,112 / 1,123]�[0m 13 / 30 tests, �[31m�[1m1 failed�[0m;�[0m [Sched] Testing //rb/spec/integration/selenium/webdriver/remote:driver-chrome; 18s ... (4 actions, 1 running)
2029:  �[32m[1,112 / 1,123]�[0m 13 / 30 tests, �[31m�[1m1 failed�[0m;�[0m [Sched] Testing //rb/spec/integration/selenium/webdriver/remote:driver-chrome; 27s ... (4 actions, 1 running)
2030:  �[32m[1,112 / 1,123]�[0m 13 / 30 tests, �[31m�[1m1 failed�[0m;�[0m [Sched] Testing //rb/spec/integration/selenium/webdriver/remote:driver-chrome; 29s ... (4 actions, 1 running)
2031:  �[32m[1,112 / 1,123]�[0m 13 / 30 tests, �[31m�[1m1 failed�[0m;�[0m [Sched] Testing //rb/spec/integration/selenium/webdriver/remote:driver-chrome; 33s ... (4 actions, 1 running)
2032:  �[32m[1,113 / 1,123]�[0m 14 / 30 tests, �[31m�[1m1 failed�[0m;�[0m [Sched] Testing //rb/spec/integration/selenium/webdriver:network-chrome; 6s ... (4 actions, 1 running)
2033:  �[32m[1,113 / 1,123]�[0m 14 / 30 tests, �[31m�[1m1 failed�[0m;�[0m [Sched] Testing //rb/spec/integration/selenium/webdriver:network-chrome; 7s ... (4 actions, 1 running)
2034:  �[32m[1,113 / 1,123]�[0m 14 / 30 tests, �[31m�[1m1 failed�[0m;�[0m [Sched] Testing //rb/spec/integration/selenium/webdriver:window-chrome; 4s ... (4 actions, 2 running)
2035:  �[32m[1,114 / 1,123]�[0m 15 / 30 tests, �[31m�[1m1 failed�[0m;�[0m [Sched] Testing //rb/spec/integration/selenium/webdriver:window-chrome; 6s ... (4 actions, 1 running)
2036:  �[32m[1,114 / 1,123]�[0m 15 / 30 tests, �[31m�[1m1 failed�[0m;�[0m Testing //rb/spec/integration/selenium/webdriver:select-chrome; 8s disk-cache ... (4 actions, 2 running)
2037:  �[32m[1,115 / 1,123]�[0m 16 / 30 tests, �[31m�[1m1 failed�[0m;�[0m Testing //rb/spec/integration/selenium/webdriver:select-chrome; 9s disk-cache ... (4 actions, 1 running)
2038:  �[32m[1,115 / 1,123]�[0m 16 / 30 tests, �[31m�[1m1 failed�[0m;�[0m Testing //rb/spec/integration/selenium/webdriver:select-chrome; 16s disk-cache ... (4 actions, 1 running)
2039:  �[32m[1,116 / 1,123]�[0m 17 / 30 tests, �[31m�[1m1 failed�[0m;�[0m Testing //rb/spec/integration/selenium/webdriver:select-chrome; 17s disk-cache ... (4 actions, 0 running)
2040:  �[32m[1,116 / 1,123]�[0m 17 / 30 tests, �[31m�[1m1 failed�[0m;�[0m Testing //rb/spec/integration/selenium/webdriver:zipper-chrome; 20s disk-cache ... (4 actions, 0 running)
2041:  �[32m[1,116 / 1,123]�[0m 17 / 30 tests, �[31m�[1m1 failed�[0m;�[0m Testing //rb/spec/integration/selenium/webdriver:zipper-chrome; 22s disk-cache ... (4 actions, 1 running)
2042:  �[32m[1,116 / 1,123]�[0m 17 / 30 tests, �[31m�[1m1 failed�[0m;�[0m Testing //rb/spec/integration/selenium/webdriver:zipper-chrome; 23s disk-cache ... (4 actions, 1 running)
2043:  �[32m[1,116 / 1,123]�[0m 17 / 30 tests, �[31m�[1m1 failed�[0m;�[0m Testing //rb/spec/integration/selenium/webdriver:driver-chrome; 26s disk-cache ... (4 actions, 1 running)
2044:  �[32m[1,116 / 1,123]�[0m 17 / 30 tests, �[31m�[1m1 failed�[0m;�[0m Testing //rb/spec/integration/selenium/webdriver/chrome:profile-chrome; 22s disk-cache ... (4 actions, 1 running)
2045:  �[32m[1,116 / 1,123]�[0m 17 / 30 tests, �[31m�[1m1 failed�[0m;�[0m Testing //rb/spec/integration/selenium/webdriver/chrome:profile-chrome; 23s disk-cache ... (4 actions, 2 running)
2046:  �[32m[1,117 / 1,123]�[0m 18 / 30 tests, �[31m�[1m1 failed�[0m;�[0m Testing //rb/spec/integration/selenium/webdriver/chrome:profile-chrome; 24s disk-cache ... (4 actions, 1 running)
2047:  �[32m[1,117 / 1,123]�[0m 18 / 30 tests, �[31m�[1m1 failed�[0m;�[0m [Sched] Testing //rb/spec/integration/selenium/webdriver:driver-chrome ... (4 actions, 1 running)
2048:  �[32m[1,117 / 1,123]�[0m 18 / 30 tests, �[31m�[1m1 failed�[0m;�[0m Testing //rb/spec/integration/selenium/webdriver:zipper-chrome; 4s local, disk-cache ... (4 actions, 2 running)
2049:  �[32m[1,118 / 1,123]�[0m 19 / 30 tests, �[31m�[1m1 failed�[0m;�[0m Testing //rb/spec/integration/selenium/webdriver:takes_screenshot-chrome; 4s disk-cache ... (4 actions, 1 running)
2050:  �[32m[1,118 / 1,123]�[0m 19 / 30 tests, �[31m�[1m1 failed�[0m;�[0m Testing //rb/spec/integration/selenium/webdriver:takes_screenshot-chrome; 14s disk-cache ... (4 actions, 1 running)
2051:  �[32m[1,118 / 1,123]�[0m 19 / 30 tests, �[31m�[1m1 failed�[0m;�[0m [Sched] Testing //rb/spec/integration/selenium/webdriver/chrome:profile-chrome; 18s ... (4 actions, 1 running)
2052:  �[32m[1,119 / 1,123]�[0m 20 / 30 tests, �[31m�[1m1 failed�[0m;�[0m Testing //rb/spec/integration/selenium/webdriver:virtual_authenticator-chrome; 16s disk-cache ... (4 actions, 1 running)
2053:  �[32m[1,119 / 1,123]�[0m 20 / 30 tests, �[31m�[1m1 failed�[0m;�[0m Testing //rb/spec/integration/selenium/webdriver:virtual_authenticator-chrome; 19s disk-cache ... (4 actions, 2 running)
2054:  �[32m[1,120 / 1,123]�[0m 21 / 30 tests, �[31m�[1m1 failed�[0m;�[0m Testing //rb/spec/integration/selenium/webdriver:guard-chrome; 5s disk-cache ... (3 actions, 1 running)
2055:  �[32m[1,120 / 1,123]�[0m 21 / 30 tests, �[31m�[1m1 failed�[0m;�[0m Testing //rb/spec/integration/selenium/webdriver:guard-chrome; 9s disk-cache ... (3 actions, 2 running)
2056:  �[32m[1,121 / 1,123]�[0m 22 / 30 tests, �[31m�[1m1 failed�[0m;�[0m Testing //rb/spec/integration/selenium/webdriver:guard-chrome; 10s disk-cache ... (2 actions, 1 running)
2057:  �[32m[1,121 / 1,123]�[0m 22 / 30 tests, �[31m�[1m1 failed�[0m;�[0m Testing //rb/spec/integration/selenium/webdriver:virtual_authenticator-chrome; 4s local, disk-cache ... (2 actions, 1 running)
2058:  �[32m[1,122 / 1,123]�[0m 23 / 30 tests, �[31m�[1m1 failed�[0m;�[0m Testing //rb/spec/integration/selenium/webdriver:guard-chrome; 0s local, disk-cache
2059:  �[32m[1,122 / 1,123]�[0m 23 / 30 tests, �[31m�[1m1 failed�[0m;�[0m Testing //rb/spec/integration/selenium/webdriver:guard-chrome; 11s local, disk-cache
2060:  �[32m[1,122 / 1,123]�[0m 23 / 30 tests, �[31m�[1m1 failed�[0m;�[0m Testing //rb/spec/integration/selenium/webdriver:guard-chrome; 12s local, disk-cache
2061:  �[32m[1,123 / 1,124]�[0m 24 / 30 tests, �[31m�[1m1 failed�[0m;�[0m Testing //rb/spec/integration/selenium/webdriver/bidi:log_inspector-chrome; 1s disk-cache
2062:  �[32m[1,123 / 1,124]�[0m 24 / 30 tests, �[31m�[1m1 failed�[0m;�[0m [Sched] Testing //rb/spec/integration/selenium/webdriver/bidi:log_inspector-chrome
2063:  �[32m[1,123 / 1,124]�[0m 24 / 30 tests, �[31m�[1m1 failed�[0m;�[0m Testing //rb/spec/integration/selenium/webdriver/bidi:log_inspector-chrome; 1s local, disk-cache
2064:  �[32m[1,123 / 1,124]�[0m 24 / 30 tests, �[31m�[1m1 failed�[0m;�[0m Testing //rb/spec/integration/selenium/webdriver/bidi:log_inspector-chrome; 3s local, disk-cache
2065:  �[32m[1,124 / 1,125]�[0m 25 / 30 tests, �[31m�[1m1 failed�[0m;�[0m Testing //rb/spec/integration/selenium/webdriver/bidi:network-chrome; 0s disk-cache
2066:  �[32m[1,124 / 1,125]�[0m 25 / 30 tests, �[31m�[1m1 failed�[0m;�[0m [Sched] Testing //rb/spec/integration/selenium/webdriver/bidi:network-chrome
2067:  �[32m[1,124 / 1,125]�[0m 25 / 30 tests, �[31m�[1m1 failed�[0m;�[0m Testing //rb/spec/integration/selenium/webdriver/bidi:network-chrome; 1s local, disk-cache
2068:  �[32m[1,124 / 1,125]�[0m 25 / 30 tests, �[31m�[1m1 failed�[0m;�[0m Testing //rb/spec/integration/selenium/webdriver/bidi:network-chrome; 3s local, disk-cache
2069:  �[32m[1,125 / 1,126]�[0m 26 / 30 tests, �[31m�[1m1 failed�[0m;�[0m Testing //rb/spec/integration/selenium/webdriver:devtools-chrome; 1s disk-cache
2070:  �[32m[1,125 / 1,126]�[0m 26 / 30 tests, �[31m�[1m1 failed�[0m;�[0m [Sched] Testing //rb/spec/integration/selenium/webdriver:devtools-chrome
2071:  �[32m[1,125 / 1,126]�[0m 26 / 30 tests, �[31m�[1m1 failed�[0m;�[0m Testing //rb/spec/integration/selenium/webdriver:devtools-chrome; 1s local, disk-cache
2072:  �[32m[1,125 / 1,126]�[0m 26 / 30 tests, �[31m�[1m1 failed�[0m;�[0m Testing //rb/spec/integration/selenium/webdriver:devtools-chrome; 155s local, disk-cache
2073:  �[32m[1,126 / 1,127]�[0m 27 / 30 tests, �[31m�[1m1 failed�[0m;�[0m Testing //rb/spec/integration/selenium/webdriver:bidi-chrome; 0s disk-cache
2074:  �[32m[1,126 / 1,127]�[0m 27 / 30 tests, �[31m�[1m1 failed�[0m;�[0m [Sched] Testing //rb/spec/integration/selenium/webdriver:bidi-chrome
2075:  �[32m[1,126 / 1,127]�[0m 27 / 30 tests, �[31m�[1m1 failed�[0m;�[0m Testing //rb/spec/integration/selenium/webdriver:bidi-chrome; 1s local, disk-cache
2076:  �[32m[1,126 / 1,127]�[0m 27 / 30 tests, �[31m�[1m1 failed�[0m;�[0m Testing //rb/spec/integration/selenium/webdriver:bidi-chrome; 3s local, disk-cache
2077:  �[32m[1,127 / 1,128]�[0m 28 / 30 tests, �[31m�[1m1 failed�[0m;�[0m Testing //rb/spec/integration/selenium/webdriver/bidi:browsing_context-chrome; 0s disk-cache
2078:  �[32m[1,127 / 1,128]�[0m 28 / 30 tests, �[31m�[1m1 failed�[0m;�[0m [Sched] Testing //rb/spec/integration/selenium/webdriver/bidi:browsing_context-chrome
2079:  �[32m[1,127 / 1,128]�[0m 28 / 30 tests, �[31m�[1m1 failed�[0m;�[0m Testing //rb/spec/integration/selenium/webdriver/bidi:browsing_context-chrome; 1s local, disk-cache
2080:  �[32m[1,127 / 1,128]�[0m 28 / 30 tests, �[31m�[1m1 failed�[0m;�[0m Testing //rb/spec/integration/selenium/webdriver/bidi:browsing_context-chrome; 3s local, disk-cache
2081:  �[32m[1,128 / 1,129]�[0m 29 / 30 tests, �[31m�[1m1 failed�[0m;�[0m Testing //rb/spec/integration/selenium/webdriver/bidi:script-chrome; 0s disk-cache
2082:  �[32m[1,128 / 1,129]�[0m 29 / 30 tests, �[31m�[1m1 failed�[0m;�[0m [Sched] Testing //rb/spec/integration/selenium/webdriver/bidi:script-chrome
2083:  �[32m[1,128 / 1,129]�[0m 29 / 30 tests, �[31m�[1m1 failed�[0m;�[0m Testing //rb/spec/integration/selenium/webdriver/bidi:script-chrome; 1s local, disk-cache
2084:  �[32m[1,128 / 1,129]�[0m 29 / 30 tests, �[31m�[1m1 failed�[0m;�[0m Testing //rb/spec/integration/selenium/webdriver/bidi:script-chrome; 3s local, disk-cache
2085:  �[32mINFO: �[0mFound 30 test targets...
2086:  �[32mINFO: �[0mElapsed time: 1182.443s, Critical Path: 600.90s
2087:  �[32mINFO: �[0m1129 processes: 553 disk cache hit, 501 internal, 75 local.
2088:  �[32mINFO: �[0mBuild completed, 1 test FAILED, 1129 total actions
2089:  //rb/spec/integration/selenium/webdriver:action_builder-chrome           �[0m�[32mPASSED�[0m in 17.4s
2090:  //rb/spec/integration/selenium/webdriver:bidi-chrome                     �[0m�[32mPASSED�[0m in 3.8s
2091:  //rb/spec/integration/selenium/webdriver:devtools-chrome                 �[0m�[32mPASSED�[0m in 155.2s
2092:  //rb/spec/integration/selenium/webdriver:driver-chrome                   �[0m�[32mPASSED�[0m in 16.2s
2093:  //rb/spec/integration/selenium/webdriver:element-chrome                  �[0m�[32mPASSED�[0m in 19.3s
2094:  //rb/spec/integration/selenium/webdriver:error-chrome                    �[0m�[32mPASSED�[0m in 5.9s
2095:  //rb/spec/integration/selenium/webdriver:guard-chrome                    �[0m�[32mPASSED�[0m in 12.5s
...

2103:  //rb/spec/integration/selenium/webdriver:target_locator-chrome           �[0m�[32mPASSED�[0m in 12.9s
2104:  //rb/spec/integration/selenium/webdriver:timeout-chrome                  �[0m�[32mPASSED�[0m in 12.5s
2105:  //rb/spec/integration/selenium/webdriver:virtual_authenticator-chrome    �[0m�[32mPASSED�[0m in 5.8s
2106:  //rb/spec/integration/selenium/webdriver:window-chrome                   �[0m�[32mPASSED�[0m in 8.1s
2107:  //rb/spec/integration/selenium/webdriver:zipper-chrome                   �[0m�[32mPASSED�[0m in 4.7s
2108:  //rb/spec/integration/selenium/webdriver/bidi:browsing_context-chrome    �[0m�[32mPASSED�[0m in 3.8s
2109:  //rb/spec/integration/selenium/webdriver/bidi:log_inspector-chrome       �[0m�[32mPASSED�[0m in 3.7s
2110:  //rb/spec/integration/selenium/webdriver/bidi:network-chrome             �[0m�[32mPASSED�[0m in 3.6s
2111:  //rb/spec/integration/selenium/webdriver/bidi:script-chrome              �[0m�[32mPASSED�[0m in 3.7s
2112:  //rb/spec/integration/selenium/webdriver/chrome:driver-chrome            �[0m�[32mPASSED�[0m in 35.6s
2113:  //rb/spec/integration/selenium/webdriver/chrome:options-chrome           �[0m�[32mPASSED�[0m in 8.7s
2114:  //rb/spec/integration/selenium/webdriver/chrome:profile-chrome           �[0m�[32mPASSED�[0m in 4.7s
2115:  //rb/spec/integration/selenium/webdriver/chrome:service-chrome           �[0m�[32mPASSED�[0m in 5.8s
2116:  //rb/spec/integration/selenium/webdriver/remote:driver-chrome            �[0m�[32mPASSED�[0m in 4.4s
2117:  //rb/spec/integration/selenium/webdriver/remote:element-chrome           �[0m�[32mPASSED�[0m in 4.8s
2118:  //rb/spec/integration/selenium/webdriver:fedcm-chrome                    �[0m�[31m�[1mFAILED�[0m in 3 out of 3 in 26.8s
2119:  Stats over 3 runs: max = 26.8s, min = 25.7s, avg = 26.3s, dev = 0.4s
2120:  D:/_bazel/execroot/_main/bazel-out/x64_windows-fastbuild/testlogs/rb/spec/integration/selenium/webdriver/fedcm-chrome/test.log
2121:  D:/_bazel/execroot/_main/bazel-out/x64_windows-fastbuild/testlogs/rb/spec/integration/selenium/webdriver/fedcm-chrome/test_attempts/attempt_1.log
2122:  D:/_bazel/execroot/_main/bazel-out/x64_windows-fastbuild/testlogs/rb/spec/integration/selenium/webdriver/fedcm-chrome/test_attempts/attempt_2.log
2123:  Executed 30 out of 30 tests: 29 tests pass and �[0m�[31m�[1m1 fails locally�[0m.
2124:  There were tests whose specified size is too big. Use the --test_verbose_timeout_warnings command line option to see which ones these are.
2125:  �[0m
2126:  ##[error]Process completed with exit code 1.
2127:  Post job cleanup.
2128:  ##[group]Save cache for disk-rb-chrome-windows-test
2129:  [command]"C:\Program Files\Git\usr\bin\tar.exe" --posix -cf cache.tzst --exclude cache.tzst -P -C D:/a/selenium/selenium --files-from manifest.txt --force-local --use-compress-program "zstd -T0"
2130:  Sent 10027008 of 113544996 (8.8%), 9.5 MBs/sec
2131:  Sent 64159744 of 113544996 (56.5%), 30.5 MBs/sec
2132:  Sent 103415808 of 113544996 (91.1%), 32.8 MBs/sec
2133:  Sent 113544996 of 113544996 (100.0%), 28.5 MBs/sec
2134:  Successfully saved cache
2135:  ##[endgroup]
2136:  ##[group]Save cache for external-rules_ruby++ruby+bundle
2137:  [command]"C:\Program Files\Git\usr\bin\tar.exe" --posix -cf cache.tzst --exclude cache.tzst -P -C D:/a/selenium/selenium --files-from manifest.txt --force-local --use-compress-program "zstd -T0"
2138:  ##[warning]Failed to save: Failed to CreateCacheEntry: Received non-retryable error: Failed request: (409) Conflict: cache entry with the same key, version, and scope already exists
2139:  Successfully saved cache

Comment on lines 93 to +94
Cache<String, CompletableFuture<PreparsedDocumentEntry>> cache =
CacheBuilder.newBuilder().maximumSize(1024).build();
Caffeine.newBuilder().maximumSize(cacheSize).build();
Copy link

@ben-manes ben-manes Apr 2, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should this be an AsyncCache or is the intent to retain failed futures?

@diemol
Copy link
Member

diemol commented Apr 2, 2025

Can you share some context for this? Why do we need this?

@VietND96
Copy link
Member Author

VietND96 commented Apr 2, 2025

This relates to #15370 where we try to see how caffeine could resolve something better than guava.

@ben-manes
Copy link

Hard to tell from the thread as an outside observer, but is that thread’s issue that removal notifications occur sometime after expiration? In guava/caffeine the default is to evict as part of maintenance triggered by other activity, so the explicit cleanUp calls are required for promptness. Caffeine offers a scheduler option for a thread that does this based on the next ttl event. Since the removalListener is called asynchronously, caffeine also offers an evictionListener if you need it as part of the eviction’s atomic map operation.

Neither provides linearizable invalidateAll so in-flight loads would be skipped. Guava’s loads are never linearizable whereas Caffeine’s are except for that method because otherwise we’d need to fork ConcurrentHashMap which suppresses initial loads during a traverse.

but I don’t know if that’s helpful or if I grok the issues

@joerg1985
Copy link
Member

@diemol the javadoc of Guava's CacheBuilder does recommend to move to Caffeine. So beside concrete issues it makes sense for me to switch.

https://github.com/google/guava/blob/master/guava/src/com/google/common/cache/package-info.java#L16-L17

More details here: https://github.com/google/guava/blob/master/guava/src/com/google/common/cache/CacheBuilder.java#L49

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
B-grid Everything grid and server related
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants