From 5ba479376b6a5282a5b58b5c7412aacad3dd6446 Mon Sep 17 00:00:00 2001 From: John Skiles Skinner Date: Wed, 12 Oct 2022 16:21:21 -0500 Subject: [PATCH 01/11] Restore README change from abandoned prior branch --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index cd8bb6ce0b1..867862d553a 100644 --- a/README.md +++ b/README.md @@ -201,7 +201,9 @@ $ yarn install #### I am receiving errors related to Capybara in feature tests You may need to install _chromedriver_ or your chromedriver may be the wrong version (`$ which chromedriver && chromedriver --version`). -chromedriver can be installed using [Homebrew](https://formulae.brew.sh/cask/chromedriver) or [direct download](https://chromedriver.chromium.org/downloads). The version of chromedriver should correspond to the version of Chrome you have installed `(Chrome > About Google Chrome)`; if installing via Homebrew, make sure the versions match up. +chromedriver can be installed using [Homebrew](https://formulae.brew.sh/cask/chromedriver) or [direct download](https://chromedriver.chromium.org/downloads). The version of chromedriver should correspond to the version of Chrome you have installed `(Chrome > About Google Chrome)`; if installing via Homebrew, make sure the versions match up. After your system recieves an automatic Chrome browser update you may have to upgrade (or reinstall) chromedriver. + +If `chromedriver -v` does not work you may have to [allow it](https://stackoverflow.com/questions/60362018/macos-catalinav-10-15-3-error-chromedriver-cannot-be-opened-because-the-de) with `xattr`. #### I am receiving errors when creating the development and test databases From 981f77c81a167f49285867f79a631aaa93e927bd Mon Sep 17 00:00:00 2001 From: John Skiles Skinner Date: Fri, 14 Oct 2022 13:23:28 -0500 Subject: [PATCH 02/11] Add increased file descriptor .plist to README --- README.md | 33 ++++++++++++++++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 867862d553a..3a313ffc104 100644 --- a/README.md +++ b/README.md @@ -229,7 +229,11 @@ You may receive connection errors similar to the following: `Failed to open TCP connection to 127.0.0.1:9515 (Too many open files - socket(2) for "127.0.0.1" port 9515)` -Running the following, _prior_ to running tests, may solve the problem: +You are encountering you OS's [limits on allowed file descriptors](https://wilsonmar.github.io/maximum-limits/). Check the limits with both: +* `ulimit -n` +* `launchctl limit maxfiles` + +Try this to increase the user limit: ``` $ ulimit -Sn 65536 && make test ``` @@ -237,3 +241,30 @@ To set this _permanently_, add the following to your `~/.zshrc` or `~/.bash_prof ``` ulimit -Sn 65536 ``` + +If you are running MacOS, you may find it is not taking your revised ulimit seriously. [Insist by](https://medium.com/mindful-technology/too-many-open-files-limit-ulimit-on-mac-os-x-add0f1bfddde) adding the following file at `/Library/LaunchDaemons/limit.maxfiles.plist` and set it to be owned by root: + +``` + + + + + Label + limit.maxfiles + ProgramArguments + + launchctl + limit + maxfiles + 524288 + 524288 + + RunAtLoad + + ServiceIPC + + + +``` +Restart your Mac to cause the .plist to take effect. Check the limits again and you should see both `ulimit -n` and `launchctl limit maxfiles` return a limit of 524288. From 090aa850aeacc232bec8c048789ada8018749af9 Mon Sep 17 00:00:00 2001 From: John Skiles Skinner Date: Fri, 14 Oct 2022 13:35:00 -0500 Subject: [PATCH 03/11] Move error item into error section of README --- README.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 3a313ffc104..a937727e475 100644 --- a/README.md +++ b/README.md @@ -198,13 +198,6 @@ $ bundle install $ yarn install ``` -#### I am receiving errors related to Capybara in feature tests -You may need to install _chromedriver_ or your chromedriver may be the wrong version (`$ which chromedriver && chromedriver --version`). - -chromedriver can be installed using [Homebrew](https://formulae.brew.sh/cask/chromedriver) or [direct download](https://chromedriver.chromium.org/downloads). The version of chromedriver should correspond to the version of Chrome you have installed `(Chrome > About Google Chrome)`; if installing via Homebrew, make sure the versions match up. After your system recieves an automatic Chrome browser update you may have to upgrade (or reinstall) chromedriver. - -If `chromedriver -v` does not work you may have to [allow it](https://stackoverflow.com/questions/60362018/macos-catalinav-10-15-3-error-chromedriver-cannot-be-opened-because-the-de) with `xattr`. - #### I am receiving errors when creating the development and test databases If you receive the following error (where _whoami_ == _your username_): @@ -224,7 +217,14 @@ $ createdb `whoami` $ make test_serial ``` -##### Errors related to too many _open files_ +##### Errors related to Capybara in feature tests +You may need to install _chromedriver_ or your chromedriver may be the wrong version (`$ which chromedriver && chromedriver --version`). + +chromedriver can be installed using [Homebrew](https://formulae.brew.sh/cask/chromedriver) or [direct download](https://chromedriver.chromium.org/downloads). The version of chromedriver should correspond to the version of Chrome you have installed `(Chrome > About Google Chrome)`; if installing via Homebrew, make sure the versions match up. After your system recieves an automatic Chrome browser update you may have to upgrade (or reinstall) chromedriver. + +If `chromedriver -v` does not work you may have to [allow it](https://stackoverflow.com/questions/60362018/macos-catalinav-10-15-3-error-chromedriver-cannot-be-opened-because-the-de) with `xattr`. + +##### Errors related to _too many open files_ You may receive connection errors similar to the following: `Failed to open TCP connection to 127.0.0.1:9515 (Too many open files - socket(2) for "127.0.0.1" port 9515)` From f819c5aca179679c31153b679c88a835e2970a1e Mon Sep 17 00:00:00 2001 From: John Skiles Skinner Date: Mon, 17 Oct 2022 13:53:28 -0500 Subject: [PATCH 04/11] Include sassc-rails gem to resolve intermitten test errors --- Gemfile | 1 + Gemfile.lock | 10 ++++++++++ 2 files changed, 11 insertions(+) diff --git a/Gemfile b/Gemfile index e8c19b918b9..4a040da0716 100644 --- a/Gemfile +++ b/Gemfile @@ -124,6 +124,7 @@ group :test do gem 'rack-test', '>= 1.1.0' gem 'rails-controller-testing', '>= 1.0.4' gem 'rspec-retry' + gem 'sassc-rails' gem 'shoulda-matchers', '~> 4.0', require: false gem 'webdrivers', '~> 5.2.0' gem 'webmock' diff --git a/Gemfile.lock b/Gemfile.lock index 489960208c7..5bacdb5f71e 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -611,6 +611,14 @@ GEM errbase (>= 0.1.1) safety_net_attestation (0.4.0) jwt (~> 2.0) + sassc (2.4.0) + ffi (~> 1.9) + sassc-rails (2.1.2) + railties (>= 4.0.0) + sassc (>= 2.0) + sprockets (> 3.0) + sprockets-rails + tilt sawyer (0.9.2) addressable (>= 2.3.5) faraday (>= 0.17.3, < 3) @@ -655,6 +663,7 @@ GEM unicode-display_width (>= 1.1.1, < 3) thor (1.2.1) thread_safe (0.3.6) + tilt (2.0.11) timeout (0.3.0) tpm-key_attestation (0.10.0) bindata (~> 2.4) @@ -816,6 +825,7 @@ DEPENDENCIES ruby-saml safe_target_blank (>= 1.0.2) saml_idp! + sassc-rails scrypt shoulda-matchers (~> 4.0) simple_form (>= 5.0.2) From fa8410835bcf6bbb7475958013213f0b16882426 Mon Sep 17 00:00:00 2001 From: John Skiles Skinner Date: Mon, 17 Oct 2022 17:12:38 -0500 Subject: [PATCH 05/11] Remove sassc-rails per Michelle Henke's advice it's no longer used --- Gemfile | 1 - 1 file changed, 1 deletion(-) diff --git a/Gemfile b/Gemfile index 4a040da0716..e8c19b918b9 100644 --- a/Gemfile +++ b/Gemfile @@ -124,7 +124,6 @@ group :test do gem 'rack-test', '>= 1.1.0' gem 'rails-controller-testing', '>= 1.0.4' gem 'rspec-retry' - gem 'sassc-rails' gem 'shoulda-matchers', '~> 4.0', require: false gem 'webdrivers', '~> 5.2.0' gem 'webmock' From 7e06b4b44fcc86984be8a2e7808bc9fe5a8c205e Mon Sep 17 00:00:00 2001 From: John Skiles Skinner Date: Mon, 17 Oct 2022 17:15:59 -0500 Subject: [PATCH 06/11] Remove sassc-rails from Gemfile.lock --- Gemfile.lock | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 5bacdb5f71e..489960208c7 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -611,14 +611,6 @@ GEM errbase (>= 0.1.1) safety_net_attestation (0.4.0) jwt (~> 2.0) - sassc (2.4.0) - ffi (~> 1.9) - sassc-rails (2.1.2) - railties (>= 4.0.0) - sassc (>= 2.0) - sprockets (> 3.0) - sprockets-rails - tilt sawyer (0.9.2) addressable (>= 2.3.5) faraday (>= 0.17.3, < 3) @@ -663,7 +655,6 @@ GEM unicode-display_width (>= 1.1.1, < 3) thor (1.2.1) thread_safe (0.3.6) - tilt (2.0.11) timeout (0.3.0) tpm-key_attestation (0.10.0) bindata (~> 2.4) @@ -825,7 +816,6 @@ DEPENDENCIES ruby-saml safe_target_blank (>= 1.0.2) saml_idp! - sassc-rails scrypt shoulda-matchers (~> 4.0) simple_form (>= 5.0.2) From c6826eeb8637889a18b544893db31602cdc09017 Mon Sep 17 00:00:00 2001 From: John Skiles Skinner Date: Mon, 17 Oct 2022 22:18:25 -0500 Subject: [PATCH 07/11] changelog: Added, README, increase file descriptor limit From c12130470aad5abdec33474f839d3f777a6a6d46 Mon Sep 17 00:00:00 2001 From: John Skiles Skinner Date: Mon, 17 Oct 2022 22:42:11 -0500 Subject: [PATCH 08/11] changelog: Added, README, increase file descriptor limit From 77474cef6d71a16c786b69eb43add660c688164c Mon Sep 17 00:00:00 2001 From: John Skiles Skinner Date: Mon, 17 Oct 2022 23:28:01 -0500 Subject: [PATCH 09/11] [skip changelog] From a7ee9ce26c915cf2130dd4fc8c540c2746b14014 Mon Sep 17 00:00:00 2001 From: John Skiles Skinner Date: Tue, 18 Oct 2022 10:03:39 -0500 Subject: [PATCH 10/11] Include nano command to edit .plist file in README --- README.md | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index a937727e475..0ef762048cb 100644 --- a/README.md +++ b/README.md @@ -242,8 +242,11 @@ To set this _permanently_, add the following to your `~/.zshrc` or `~/.bash_prof ulimit -Sn 65536 ``` -If you are running MacOS, you may find it is not taking your revised ulimit seriously. [Insist by](https://medium.com/mindful-technology/too-many-open-files-limit-ulimit-on-mac-os-x-add0f1bfddde) adding the following file at `/Library/LaunchDaemons/limit.maxfiles.plist` and set it to be owned by root: - +If you are running MacOS, you may find it is not taking your revised ulimit seriously. [You must insist.](https://medium.com/mindful-technology/too-many-open-files-limit-ulimit-on-mac-os-x-add0f1bfddde) Run this command to edit a property list file: +``` +sudo nano /Library/LaunchDaemons/limit.maxfiles.plist +``` +Paste the following contents into the text editor: ``` + ``` +Use Control+X to save the file. + Restart your Mac to cause the .plist to take effect. Check the limits again and you should see both `ulimit -n` and `launchctl limit maxfiles` return a limit of 524288. From 44fb4cf5e9e49c17482713539b70c296f46cc7f0 Mon Sep 17 00:00:00 2001 From: Alex Bradley Date: Tue, 18 Oct 2022 14:34:07 -0400 Subject: [PATCH 11/11] remove capybara-selenium Why? The capybara-selenium gem was last updated on 12/20/2014. The functionality of that gem has been replaced by the webdrivers gem. --- Gemfile | 1 - Gemfile.lock | 4 ---- 2 files changed, 5 deletions(-) diff --git a/Gemfile b/Gemfile index e8c19b918b9..72d024641cb 100644 --- a/Gemfile +++ b/Gemfile @@ -113,7 +113,6 @@ end group :test do gem 'axe-core-rspec', '~> 4.2' gem 'bundler-audit', require: false - gem 'capybara-selenium', '>= 0.0.6' gem 'simplecov', '~> 0.21.0', require: false gem 'simplecov-cobertura' gem 'simplecov_json_formatter' diff --git a/Gemfile.lock b/Gemfile.lock index 489960208c7..ddf2cca0e08 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -210,9 +210,6 @@ GEM rack-test (>= 0.6.3) regexp_parser (>= 1.5, < 3.0) xpath (~> 3.2) - capybara-selenium (0.0.6) - capybara - selenium-webdriver cbor (0.5.9.6) childprocess (4.1.0) choice (0.2.0) @@ -742,7 +739,6 @@ DEPENDENCIES browser bullet (~> 7.0) bundler-audit - capybara-selenium (>= 0.0.6) capybara-webmock! connection_pool cssbundling-rails