Skip to content
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

install-chromedriver is broken for Chrome >= 115 which is stable and latest release today #75

Closed
bericp1 opened this issue Jul 18, 2023 · 60 comments
Assignees

Comments

@bericp1
Copy link

bericp1 commented Jul 18, 2023

Orb version

circleci/browser-tools@1.4.1 (latest as of writing)

What happened

chromedriver install fails:

This is because the chromedriver team migrated to a new set of JSON APIs for >=115

https://sites.google.com/chromium.org/driver/?pli=1#:~:text=Starting%20with%20M115%20the%20latest%20Chrome%20%2B%20ChromeDriver%20releases%20per%20release%20channel%20(Stable%2C%20Beta%2C%20Dev%2C%20Canary)%20are%20available%20at%20the%20Chrome%20for%20Testing%20availability%20dashboard.%20For%20automated%20version%20downloading%20one%20can%20use%20the%20convenient%20JSON%20endpoints.

Expected behavior

ChromeDriver installs

@josephfrazier
Copy link

I'm experiencing this as well, also on browser-tools version 1.4.1

@Jaym3s
Copy link

Jaym3s commented Jul 18, 2023

Here's a workaround for others that are hitting this:

    steps:
      - browser-tools/install-browser-tools:
          chrome-version: 114.0.5735.90 # TODO: remove -> https://github.com/CircleCI-Public/browser-tools-orb/issues/75

@jonathandean
Copy link
Contributor

jonathandean commented Jul 18, 2023

I had already tried what @Jaym3s mentioned but got this:

Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 google-chrome-stable : Depends: fonts-liberation but it is not installable
                        Depends: libatk-bridge2.0-0 (>= 2.5.3) but it is not installable
                        Depends: libatk1.0-0 (>= 2.2.0) but it is not installable
                        Depends: libatspi2.0-0 (>= 2.9.90) but it is not installable
                        Depends: libcups2 (>= 1.6.0) but it is not installable
                        Depends: libgtk-3-0 (>= 3.9.10) but it is not installable or
                                 libgtk-4-1 but it is not installable
                        Depends: libnspr4 (>= 2:4.9-2~) but it is not installable
                        Depends: libnss3 (>= 2:3.31) but it is not installable
                        Depends: libu2f-udev but it is not installable
                        Depends: libvulkan1 but it is not installable
                        Depends: libxcomposite1 (>= 1:0.4.4-1) but it is not installable
                        Depends: libxdamage1 (>= 1:1.1) but it is not installable
                        Depends: xdg-utils (>= 1.0.2) but it is not installable

I also tried adding replace-existing: true and also tried deleting cache contents from the Docker Layer Caching page in project settings and still got this error.

@josephfrazier
Copy link

josephfrazier commented Jul 18, 2023

I created a CircleCI support request pointing them to this github issue and telling them that all our PRs have broken builds because of it, to try to get it escalated.

@jonathandean
Copy link
Contributor

If anyone is curious this is the announcement of the breaking change in May: https://groups.google.com/g/chromedriver-users/c/clpipqvOGjE/m/5NxzS_SRAgAJ

@jonathandean
Copy link
Contributor

Looks like this PR is related as it mentions this general problem: #72

@josephfrazier
Copy link

If anyone is curious this is the announcement of the breaking change in May: https://groups.google.com/g/chromedriver-users/c/clpipqvOGjE/m/5NxzS_SRAgAJ

Thanks, it looks like that should help CircleCI fix this faster

@goodish452
Copy link

Workaround works well enough for our purposes. But it will definitely impact a lot of our overnight runs until teams can go through and add the workaround.

@olihensel
Copy link

I had the same problem as @jonathandean with the workaround. Running sudo apt-get update in a step before installing the browser fixed it for me.

@gaijin1973
Copy link

@olihensel, thanks for the suggestion. I was just looking at the PR that @jonathandean posted, and it looks like this line may be the one that was intended to address the issues without your workaround:
https://github.com/CircleCI-Public/browser-tools-orb/pull/72/files#diff-5432426082806dd0f398e088bb8e20badcd780a34783e189aad77f9241ace0edR127

@ryanbourdais ryanbourdais self-assigned this Jul 18, 2023
@ryanbourdais
Copy link
Contributor

Hi all, I'm currently working on a fix and should have one out today. This issue was caused by the endpoint we use for downloading chrome driver changing for all versions >= 115.

@gaijin1973
Copy link

I had the same problem as @jonathandean with the workaround. Running sudo apt-get update in a step before installing the browser fixed it for me.

Just to reiterate / summarize the update from @olihensel to the original workaround posted by @Jaym3s, this seems to have gotten me past the browser-tools step in our workflow:

steps:
  - run: sudo apt-get update
  - browser-tools/install-chrome:
      chrome-version: "114.0.5735.90"

@ryanbourdais
Copy link
Contributor

Just merged in the PR and cut a new patch release. Chrome driver should work for versions newer than 114 on this new version of the orb.

@eveshum
Copy link

eveshum commented Jul 19, 2023

I'm getting this error when bumping to 1.4.2

google-chrome --version
chromedriver --version

Google Chrome 115.0.5790.98 
/bin/bash: line 1: chromedriver: command not found

Exited with code exit status 127
CircleCI received exit code 127

Did anyone else get this?

@josephfrazier

This comment was marked as resolved.

@kelvintaywl
Copy link

I'm getting this error when bumping to 1.4.2

google-chrome --version
chromedriver --version

Google Chrome 115.0.5790.98 
/bin/bash: line 1: chromedriver: command not found

Exited with code exit status 127
CircleCI received exit code 127

Did anyone else get this?

Hi @eveshum

This is Kelvin from CircleCI support.

Thank you for raising this.
I understand you have filed a support ticket with us at CircleCI as well.

For a workaround and an explanation of the issue seen, can you try updating your job as seen with this PR's diff:
https://github.com/kelvintaywl-cci/browser-tools-142/pull/1/files

I am sharing this with our engineers in the meantime;
Thank you for your patience! 🙇

@MikeMcElroy
Copy link

Hi @eveshum

This is Kelvin from CircleCI support.

Thank you for raising this. I understand you have filed a support ticket with us at CircleCI as well.

For a workaround and an explanation of the issue seen, can you try updating your job as seen with this PR's diff: https://github.com/kelvintaywl-cci/browser-tools-142/pull/1/files

I am sharing this with our engineers in the meantime; Thank you for your patience! 🙇

@kelvintaywl That seems to work for me 👍

@snyaggarwal
Copy link

I had the same problem as @jonathandean with the workaround. Running sudo apt-get update in a step before installing the browser fixed it for me.

Just to reiterate / summarize the update from @olihensel to the original workaround posted by @Jaym3s, this seems to have gotten me past the browser-tools step in our workflow:

steps:
  - run: sudo apt-get update
  - browser-tools/install-chrome:
      chrome-version: "114.0.5735.90"

This worked for ubuntu builds but not for macos. From the documentation, "chrome-version" doesnt work in MacOS. Any workaround for macOS builds?

@snyaggarwal
Copy link

I'm getting this error when bumping to 1.4.2

google-chrome --version
chromedriver --version

Google Chrome 115.0.5790.98 
/bin/bash: line 1: chromedriver: command not found

Exited with code exit status 127
CircleCI received exit code 127

Did anyone else get this?

Hi @eveshum

This is Kelvin from CircleCI support.

Thank you for raising this. I understand you have filed a support ticket with us at CircleCI as well.

For a workaround and an explanation of the issue seen, can you try updating your job as seen with this PR's diff: https://github.com/kelvintaywl-cci/browser-tools-142/pull/1/files

I am sharing this with our engineers in the meantime; Thank you for your patience! 🙇

@kelvintaywl On MacOS this installs the chrome and driver but in verify step fails with:
/bin/bash: google-chrome: command not found

@snyaggarwal
Copy link

for others using MacOS and facing the same issue, this is the way we fixed it using circleci/browser-tools@1.4.2

      - browser-tools/install-chrome
      - browser-tools/install-chromedriver
      - run:
          name: Fix PATH
          command: |
            ln -s /usr/local/bin/google-chrome-stable /usr/local/bin/google-chrome
            mv /usr/local/bin/chromedriver /usr/local/bin/chromedriver2
            ln -s /usr/local/bin/chromedriver2/chromedriver /usr/local/bin/chromedriver
            echo 'export PATH=/usr/local/bin/google-chrome:$PATH' >> $BASH_ENV
            echo 'export PATH=/usr/local/bin/chromedriver:$PATH' >> $BASH_ENV

Due to following differences on MacOS:

  • chromedriver is installed in /usr/local/bin/chromedriver/chromedriver
  • google chrome is installed as /usr/local/bin/google-chrome-stable

@jonathandean
Copy link
Contributor

I had the same problem as @jonathandean with the workaround. Running sudo apt-get update in a step before installing the browser fixed it for me.

Just to reiterate / summarize the update from @olihensel to the original workaround posted by @Jaym3s, this seems to have gotten me past the browser-tools step in our workflow:

steps:
  - run: sudo apt-get update
  - browser-tools/install-chrome:
      chrome-version: "114.0.5735.90"

Thanks to all of you! The above workaround worked and I'll obviously try 1.4.2 next. It's nice to have green builds again :)

ryanwoldatwork added a commit to GSA/touchpoints that referenced this issue Sep 19, 2023
vladbailescu added a commit to adobe/aem-core-cif-components that referenced this issue Oct 16, 2023
vladbailescu added a commit to adobe/aem-core-cif-components that referenced this issue Oct 16, 2023
tvdeyen added a commit to tvdeyen/solidus that referenced this issue Oct 25, 2023
Now that CircleCI-Public/browser-tools-orb#75
have been merged we can remove this in order to be able to run tests
again.
@sedghi
Copy link

sedghi commented Dec 13, 2023

I have this issue in my circleCI

@albertski
Copy link

@sedghi What version of browser-tools-orb are you using? Perhaps you need to update to the latest (v1.4.6).

@sedghi
Copy link

sedghi commented Dec 13, 2023

I think i'm on latest? https://github.com/OHIF/Viewers/blob/master/.circleci/config.yml
I don't specify it really

@hoylemd
Copy link

hoylemd commented Dec 13, 2023

laritakr added a commit to samvera/hyku that referenced this issue Dec 20, 2023
There is an apparent issue with chromedriver installation when
there is a new release of chrome that doesn't have a corresponding
version of chromedriver.

Orb 1.4.6 release was supposed to fix this but we are once again
seeing the error, so we are attempting to lock the crome version to
see if we can bypass this error.

Refs
CircleCI-Public/browser-tools-orb#96
CircleCI-Public/browser-tools-orb#75 (comment)
ShanaLMoore added a commit to samvera/hyku that referenced this issue Jan 5, 2024
* remove dogbiscuit crossover, fix routes

* add spec for search history

* add missing methods to avoid content block errors

* Update Hyku Gemfile.lock

* add option to support good job for background jobs instead of sidekiq

* update gemfile lock

* Update good_job.rb

* merge

* fix routes file, add missing js file

* 💄 styling fix

* 💄 rubocop fixes

* remove iiif_print/iiif_print require

cause of Sprockets::FileNotFound in Splash#index error. Doesn't seem necessary.

* 🎁 🧹 add missing file and format with semicolons

The previous build revealed that admin_color_select.js was missing. It also complained about missing semicolons.

* 💄 correct missing semicolons

appease the hound by formatting js file with semicolons.

* 🧹 remove call to iiif_print/iiif_print

Cause of build error. It's already being included in sass.

* 💄 Rubocop fixes

* ✅ Fix test setup for catalog_controller_spec

This commit will add additional setup to the catalog_controller_spec.

* Add knapsack helper

* remove Adventist from application.rb

* 🎁 Add conditional to run correct command for worker

This commit adds a conditional to run the correct command for sidekiq or good_job, when running docker compose up.

* Make appearance constants overrideable

This allows for the knapsack to override the constants by defining and
using a method rather than a constant in the look-ups.

* add reporting fix to hyku ci

* spec loading fixes

* rubocop

* 🧹Make appearance defaults overrideable

* bump bulkrax to 5.4.0

This commit pulls in a small collection of bug fixes.

* 🧹 Include knapsack css

* fix job loading when selecting good job

* adjust docker compose to use the startup script

* 🎁 install tesseract eng_best

* ♻️ revert tesseract best changes to dockerfile

this change belongs in the knapsack directory instead

* ♻️ revert tesseract best changes to dockerfile

this change belongs in the knapsack directory instead

* 🐛 Bring fix for entry show page not showing link

This commit will bring in a fix from Bulkrax that correctly shows the
object from the entry show page.

ref:
  - samvera/bulkrax@0e68a5e

* 🧹 Revert previous commit and update Bulkrax

This commit will update Bulkrax to 5.4.1 instead of using the override
from the last commit.  We also revert the changes from the last commit.

* 🐛 subject can't be blank for the contact form

Previously there was a bug because even if you typed in a subject, the contact form would error saying that it was blank.

Part of issue:
- https://github.com/scientist-softserv/adventist-dl/issues/608

* mend

* ♻️ Add handling for Knapsack theme overrides

Prior to this commit, we were looking for themes yaml files relative to
the directory of the spawning script.  For Hyku that was always the
`Rails.root` directory.  However, when running specs in Knapsack, that
directory was `Knapsack::Engine.root`.

This unearthed a potential configuration issue; namely that we want
Knapsack's to control what themes are available, meaning we don't want
to require amending Hyku's themes.

So, we introduce a mechanism for looking up files first in the Knapsack
then in Hyku.

I discovered this bug in the specs for knapsack (below is the *Error stack trace*)

<details>
<summary>Error stack trace</summary>

```
2) Hyrax::Admin::AppearancesController with an administrator GET #show assigns the requested site as @site
     Failure/Error: get :show, params: {}

     Errno::ENOENT:
       No such file or directory @ rb_sysopen - config/home_themes.yml
     # /usr/local/bundle/gems/psych-3.3.4/lib/psych.rb:582:in `initialize'
     # /usr/local/bundle/gems/psych-3.3.4/lib/psych.rb:582:in `open'
     # /usr/local/bundle/gems/psych-3.3.4/lib/psych.rb:582:in `unsafe_load_file'
     # ./hyrax-webapp/app/controllers/hyrax/admin/appearances_controller.rb:19:in `show'
     # /usr/local/bundle/gems/rails-controller-testing-1.0.5/lib/rails/controller/testing/template_assertions.rb:62:in `process'
     # /usr/local/bundle/gems/devise-4.9.2/lib/devise/test/controller_helpers.rb:35:in `block in process'
     # /usr/local/bundle/gems/devise-4.9.2/lib/devise/test/controller_helpers.rb:104:in `catch'
     # /usr/local/bundle/gems/devise-4.9.2/lib/devise/test/controller_helpers.rb:104:in `_catch_warden'
     # /usr/local/bundle/gems/devise-4.9.2/lib/devise/test/controller_helpers.rb:35:in `process'
     # /usr/local/bundle/gems/rails-controller-testing-1.0.5/lib/rails/controller/testing/integration.rb:16:in `block (2 levels) in <module:Integration>'
     # ./spec/controllers/hyrax/hyrax/admin/appearances_controller_spec.rb:31:in `block (4 levels) in <top (required)>'
     # /usr/local/bundle/gems/webmock-3.19.1/lib/webmock/rspec.rb:39:in `block (2 levels) in <top (required)>'
     # ./hyrax-webapp/spec/support/multitenancy_metadata.rb:50:in `block (2 levels) in <top (required)>'
     # /usr/local/bundle/gems/rspec-retry-0.6.2/lib/rspec/retry.rb:124:in `block in run'
     # /usr/local/bundle/gems/rspec-retry-0.6.2/lib/rspec/retry.rb:110:in `loop'
     # /usr/local/bundle/gems/rspec-retry-0.6.2/lib/rspec/retry.rb:110:in `run'
     # /usr/local/bundle/gems/rspec-retry-0.6.2/lib/rspec_ext/rspec_ext.rb:12:in `run_with_retry'
     # /usr/local/bundle/gems/rspec-retry-0.6.2/lib/rspec/retry.rb:37:in `block (2 levels) in setup'
     # ./spec/spec_helper.rb:10:in `block (2 levels) in <top (required)>'
```

</details>

Related to:

- #2007
- #2008

The above two commits will require some reconciliation once this is incorporated.

* ♻️ Favor Hyku::Application.path_for over Rails.root

Given the existence of Knapsack we need to consider how overrides in
Knapsack will take precedence over Hyku files.  This change handles
cases where we want to use the Knapsack's uploaded thumbnails.

Related to:

- #2010

* 🎁 Add highlight key to UV

This commit allows for the `parent_query` to be highlighted in the UV so
users won't have to do a catalog search and also a UV search.

* 🐛 Mixin `HykuKnapsack::ApplicationHelper`

This commit will mixin the `HykuKnapsack::ApplicationHelper` into the
ApplicationHelper which will allow us to use #render_ocr_snippets for
snippet highlighting.

* Revert "🐛 Mixin `HykuKnapsack::ApplicationHelper`"

This reverts commit ae093f1.

* ♻️ Favor class_attribute over constant

In Adventist, we're needing to override the constant's values.  By
making this a class_attribute we can more readily do the override via
configuration instead of obliteration of a constant.

* ♻️ Favor configurable html head title value

Prior to this commit, we hard-coded the page title; this is something
that should be far more configurable.  And this refactor is a step
towards that.

This also allows for downstream implementors to not have to override the
view simply to change the title element.

* 🐛 Add custom rendering for license

Prior to this commit, the License would render as a plain URL.  With
this change, we are now coercing the license into a URL that is labeled
and titled with the name of the license.

This is copied and modified based on [Rights show partial][1]

Related to:

- https://github.com/scientist-softserv/adventist-dl/issues/620

[1]: https://github.com/samvera/hyrax/blob/b334e186e77691d7da8ed59ff27f091be1c2a700/app/views/records/show_fields/_rights.html.erb

* ♻️ Add option to override devise configuration

For Adventist, we wanted to disable registration of accounts as this was
creating a case where folks were creating their own accounts and
tenants.

Related to:

- https://github.com/scientist-softserv/adventist-dl/issues/492
- https://github.com/scientist-softserv/adventist-dl/issues/618
- #1964
- scientist-softserv/adventist-dl#493

* run asset build later in process to allow knapsack to run it only one time

* 🐛 Fix Add to Collection for page 2+ of works

Prior to this commit, when you were on page 2 of your works and selected
a work to add to a collection, the query for available collections would
use the page 2 as part of the collection query.  This would mean the
first 100 collections (default page size) that you had access to add
works to were skipped.

With this commit, we omit the query parameters from the works page and
then query collections.

Related to:

- samvera/hyrax#5972
- samvera/hyrax#5969
- https://github.com/scientist-softserv/adventist-dl/issues/625

Co-authored-by: LaRita Robinson <larita@scientist.com>

* test that invited users are added to the registered group

* Add invited users to the registered group

Fixes a bug where users who were invited with no roles would not
show up in the users list at all

* 🐛 Change Hyky to Hyku (#2029)

Typo caused inability to upload collection thumbnail.

* 🎁 Modify labels in UV for V3 manifests

This commit will add the same treatment as we have for V2 manifests to
V3 manifests. This will allow the UV to add a more human readable label
to the pages.

Ref:
  - https://github.com/scientist-softserv/adventist-dl/issues/628

* 🐛 Fix bad method name

Related to:

- https://github.com/samvera/hyku/pull/2023/files
- scientist-softserv/atla-hyku#198

* 🐛 Move some methods to be public

This commit will move #solr_document, #current_ability, and #request to
be public methods.  Since these methods in Hyrax were not private, in
the decorator it should not be private either.

Ref:
  - https://github.com/samvera/hyrax/blob/b334e186e77691d7da8ed59ff27f091be1c2a700/app/presenters/hyrax/file_set_presenter.rb#L10

* First attempt for upgrade to Hyrax 5.0.0.rc2

So far the changes throw an error `The adapter `nulldb_adapter` is not
yet supported` when doing a `docker compose build`.  Commenting out `RUN
RAILS_ENV=production SECRET_KEY_BASE=`bin/rake secret` DB_ADAPTER=nulldb
DB_URL='postgresql://fake' bundle exec rake assets:precompile && yarn
install` in the Dockerfile allows the build to complete but still can't
boot yet.

* 🧹 Get assets to precompile

This commit has a lot in it, but of note:

- We forked apartment gem to expand activerecord version support
- Used the Hyrax upgrade guide to update assets
- Replaced bootstrap 3 variables with hard coded values
- Commented out blacklight_helper_behavior.rb because Blacklight 7
  removed it, we'll have to figure out how to get the same functionality
  in the new version

* 🧹 Switch to Hyrax `double_combo` branch

We are using this branch on Hyrax because it has quite a few Valkyrie
related fixes in it.

* 🧹 use class attribute instead of constant to correct failing specs

* Fix specs

* 🧹 Get the page to load

This commit will get the proprietor page to load.  You can create a
tenant and vist it as well.

* ♻️ Introduce Hyku::Application.theme_view_path_roots

With the introduction of [HykuKnapsack][1], we are adjusting how we
create instances of Hyku.  Namely we don't clone Hyku but instead we
incorporate Hyku as a submodule into a Knapsack.

The Knapsack is a Rails engine that is mounted in the Hyku application.
What this means is that when we want to

Prior to this commit, the only way to adjust themed views would have
been to add them to the Rails application (e.g. Hyku) directly.  Which
would work in a non-Knapsack ecosystem.

However, with Knapsack we need a means of saying "Hey, for themes we
want to be able to add/adjust views within the knapsack."  Hence this
change.

[1]: https://github.com/samvera-labs/hyku_knapsack

* 🧹 Prepping for rubocop

This commit will change the Docker image to rc1 because rc2 stopped
working (at least locally).  Also getting things ready to run rubocop.

* 🧹 Ran `bundle exec rubocop -a`

* 🧹 Autocorrect frozen string literals

```sh
rubocop --only Style/FrozenStringLiteralComment -A
```

* 🧹 Rubocop'd lengths and other low hanging fruit

Various length metrics were disabled in this commit.  Also other various
cops that were easy to fix.

* 🧹 Remove deprecated Blacklight code

removing the deprecated blacklight code allows the specs to run. We should consider if finding a replacement is necessary in the following ticket:

- scientist-softserv/hykuup_knapsack#54

Issue:
- scientist-softserv/hykuup_knapsack#35

* 🧹 Avoid `#present?` in non-Rails situations

Rails provides [`Object#present?`][1], which is a method that is not
generally available in Ruby.  However in the changed context, the
scripts do not have access to Rails methods.

By using this adjusted approach we favor baseline Ruby methods.

[1]: https://api.rubyonrails.org/classes/Object.html#method-i-present-3F

* 🧹 Get Homepage Controller specs passing (#2058)

Refactor homepage controller to more closely align with Hyrax's
homepage controller.
Adjust theme views to render `modal` instead of `ajax_modal`.

refs: scientist-softserv/hykuup_knapsack#56

* ♻️ Replace Homepage Presenter with decorator (#2059)

* 🧹Get CatalogController specs working (#2060)

* 🧹 Hyrax 5 get additional specs passing (#2062)

* 🧹 Get chrome.hyku.test working

* 🧹 Get SitesControllerSpecs working

 File fixtures were broken.
 Ref scientist-softserv/hykuup_knapsack#56

* 🧹 Remove google analytics from config reload

This is a piece of a fix for analytics that came in via
scientist-softserv/palni-palci#946

Additional backporting of analytics work is still needed, but this
fixes numerous specs so it is being pulled in earlier.

* 🧹 Update ruby version for circleci

* 🧹 Update rails version for circleci

* 🧹Database migration & schema update (#2063)

For table hyrax_counter_metrics

* 🧹 Fix Hyrax 5 remaining controller spec failures (#2064)

* 🧹Remove ActiveFedora monkeypatch

* 🧹Fix file fixture

* 🧹 Upgrade views from Bootstrap 3 to 4

This commit is a first swing of upgrading all the views from Bootstrap 3
to 4.  There's still a lot of work to be done to make the views look
good but this is a good first step.

* Hyrax 5 upgrade rubocop fixes & get specs running in CI (#2065)

* 🧹Rubocop Fixes

* Attempt to fix circleci

* 🧹 Fix CollapsableSectionPresenter override

The override was causing issues not passing the nav-link class into the
anchor tags.  This fix specifically passes the title attribute in vs the
previous implementation of trying to pass all html options in.

* 🧹 Remove required translations from locales

This commit will remove the override for the `required` translations
since it changed to a badge badge-style in Bootstrap 4.  This is
accounted for in Hyrax so we can fall back to that.

* 🐛 Fix some javascript errors

This commit will fix a few javascript errors, at least enough to get the
the bootstrap javascript to work correctly.  We're still getting a the
almond-rails js error but that seems to exist in previous Hyku as well.

* Hyrax 5 upgrade rubocop fixes & get specs running in CI (#2065)

* 🧹Rubocop Fixes

* Attempt to fix circleci

* 🧹 Post review adjustments

These are adjustments made after the PR has been reviewed.

* 🧹 Clean up a couple blacklight views

This commit will account for the new versions of Blacklight and
Blacklight Gallery.  The masonry view no longer exists so we can't tell
how it's broken as of right now.  I'm sure we'll run into it during our
testing.

NOTE:  These changes refer to the shared search tenant.

* 🧹 Bring back `BlacklightHelperBehavior`

This commit will bring back the `BlacklightHelperBehavior` module but it
will be namespaced under `Hyku` to avoid conflicts.  We will then
include it in the `HyraxHelper` module so those methods should override
the ones in `Blacklight::BlacklightHelperBehavior`.

* 🧹 Hyrax 5 upgrade additional specs (#2067)

* 🧹 More spec & controller fixes

 Ref scientist-softserv/hykuup_knapsack#55

 - Contact form controller and pages controller duplicate some of the
 homepage controller behavior, so corresponding fixes are needed.
 - Update collections factory and collection_ability_spec to match hyrax
 and stop calling `.gid` on a collection_type.
 - Adjust permission_template_form_spec to adjust for removal of method
 `reset_access_controls!` and add a few new expectations instead.

* 🧹 Begin work on Roles Service

Working with Permission Templates has changed, requiring an adjustment
to both logic and specs.

* 🧹 Solr Document Ability Spec

* Rubocop fixes

* Fix typo of collection variable

* Reinstate some collections factory overrides

* Revert Rubocop changes

Caused spec failure in roles_service_spec.

* Fix create_default_admin_set_job_spec

* Restore mistakenly removed capta use

* 🧹 Stanford import specs

We have plans to remove the Stanford import logic, but for now, this
handles the specs that were failing, in an attempt to get CI to pass.

* Make Rubocop happy

* Fix typo

* Update Hyrax to pull in most recent changes

* More spec fixes

Menu presenter: removed html_options
Application Helper: override for missing_translations now receives
`false` when translation wasn't found rather than a string.

* Fix missing translation logic

* Fix  missing_translation override

Simplify and fix override. A missing translation now returns `false`
instead of the text `translation missing`.

The super method requires the `option` parameter, so we opted to keep
the override.

* 🧹 Remove copied code

The overrides are no longer necessary.  In reviewing the diff between
what I'm removing and what is in the `double_combo` branch; the major
change was adding an operator for the `reduce` function.  The breaking
problem was that the method signature of one of the copied methods has
changed in Hyrax 5.0.

The removal considers that Hyrax::Group is of two different classes:

- In Hyrax, it is a plain old Ruby object
- In Hyku, it is descended from ActiveRecord::Base

The two classes have different instantiation parameters.  Hence the
introduction of `Hyrax::Group.new` in this code.

* 🧹 Fix missing method name

* 🐛 Ensure :maxFileSize is integer

Prior to this commit, we were casting the value to string.  However
Hyrax attempts to do division on that string.

See https://github.com/samvera/hyrax/blob/b7891b758411c59f71ff54212e0d250fcc47e35f/app/views/hyrax/base/_form_files.html.erb#L6-L15

* Skip taking a picture on failure

* 🧹 Fix issue regarding Valkyrie::Identifier

The encountered error was:

```
NoMethodError:
  undefined method `split' for #<Valkyrie::ID:0x0000ffffa5f04bc8
  @id="admin_set/default">
```

* 🧹 Favor Sipity::Entity function over to_sipity_entity

The Sipity conversion methods are now explicit functions (much like the
`Array()` function).

- https://github.com/samvera/hyrax/blob/5aaa568d348a180add2a1337d9d794b740703df8/app/models/sipity.rb#L20

* Update Hyrax IIIF AV gem

* 🧹 Review controller overrides

Many of the controllers just needed to be updated with the decorator
pattern.  We're creating a new concern for all the Hyku specific
overrides in Hyku::WorksControllerBehavior.  This has to be included in
the Controller classes after Hyrax::WorksControllerBehavior to override
the relevant methods.

* clean up from pr review

* Appease rubocop

* Update IIIF Print gem

* 🤖 Specify Cache Root

Prior to this commit, we were seeing the following failure:

> Failure/Error: Site.application\_name || super
>
> ActionView::Template::Error:
>  Permission denied @ dir\_s\_mkdir - /app

The `Account#setup_tenant_cache` sets the cache\_store to be
`ENV.fetch('HYKU_CACHE_ROOT', '/app/samvera/file_cache')`.  When I
locally chanced it to `/blorg/samvera/file_cache` I could repeat the
error.

With this commit, we're setting the cache value for the CircleCI run.

Why was it previously working?  Perhaps because
`Account#setup_tenant_cache` never got called due to other
configurations?  There is a guard clause around the method call.

* 🧹 Update spec to reflect AdminSet default behavior

In the following commit, we removed the deprecated
`AdminSet.find_or_create_default_admin_set_id`:

- samvera/hyrax@863c4bc

This commit follows the advice of the deprecation warning and now favors
the `Hyrax::AdminSetCreateService.find_or_create_default_admin_set.id`
method call.

Related to:

- samvera/hyrax#6203

* Remove obsolete site roles and routes (#2080)

The site/roles route is obsolete. This is an attempt to remove as much
of the obsolete logic as possible, as it has been replaced by the groups
with roles feature.

* Remove stanford importer

Importer was deprecated in prior release version.

* 🤖 Fix spec/features/collection_type_spec.rb

There are three major changes:

1. Favor setting `collection_type` attribute instead of
   `collection_type_gid`
2. Change `#collections?` to `#collections#any?`
3. Change CSS selector based on Bootstrap upgrade

The above changes are related to work done in:

- samvera/hyrax#5730
- samvera/hyrax#5742
- samvera/hyrax#4701

See:
- samvera/hyrax@eb6e04e
- samvera/hyrax@237c0c6
- samvera/hyrax@280664b

* 🤖 Fix stub methods to pass tests

These tests weren't verifying that we could reach Redis; they were
testing the interface of the `RedisEndpoint#ping` by mocking the
instance.

This commit changes the mocking by avoiding a call to
`Hyrax::RedisEventStore.instance` which was raising a Redis connection
error.

Again, this test is not is redis connecting but "assume we are trying to
connect to redis now demonstrate ping."

* Lock chromedriver version (#2086)

Refs
CircleCI-Public/browser-tools-orb#96
CircleCI-Public/browser-tools-orb#75 (comment)

* 🧹 Clean up model overrides

Most of what's in this commit is just updating the Hyrax version in the
override comments.  There was also an opportunity to switch the
`ContactForm` model to a decorator.

* 🤖 Favor general spec over specific

With the CircleCI alternate place for the file_store cache, we need to
fallback to a more general test assertion.

* 🤖 Bring over Hyrax spec changes

* 🤖 Extract constant to ease testing

We're not concerned with where the cached file is for testing purposes;
so instead of hard-coding a value that can change in the ENV, let's
compare the constant that we use in the code.

tl;dr - Don't rely on magic strings

* 🤖 Re-arrange CleanupAccountJob specs

The `CleanupAccountJob` was stubbing very nosily; needing to know too
much about implementation details of the end-points.  Instead this
preserves the over-view spec (e.g. what all the cleanup spec actually
cleans up) while moving that nosy logic to the constituent endpoint.

Most of these specs are testing that the method chains work; which is
perhaps adequate as the other option is far more expensive tests (e.g.
make a new Fedora node only to then immediately destroy it)

I'm also leveraging the new `Redis::Namespace#clear` method.

Related to:

- resque/redis-namespace#202

* 🧹 Restore btn-sign-up on splash page

This change was part of the bulk upgrade of Bootstrap 3 to 4.

* 🧹 Fix `./spec/requests/admin_dashboard_spec.rb` spec

Prior to this commit, the specs failed because of the introduction of
the WorkflowResponsibilityFormDecorator.  The decorator extracted prior
logic from Hyrax::Admin::WorkflowRolesController.

In copying that logic we introduced a subtle bug.  Namely, we favored
the original `.new` behavior if and only if you provided a `:user_id`.
This broke places where we instantiated the form in a
view (e.g. `./app/views/hyrax/admin/workflow_roles/index.html.erb`).

With this change, we make the behavior of `.new` fail towards its
"normal" implementation and instead rely on the presence of an attribute
to switch to a different form instantatior.

See Commit:

- 095edca

Related to:

- #2079

Co-authored-by: LaRita Robinson <larita@scientist.com>
Co-authored-by: Kirk Wang <kirk.wang@scientist.com>

* 🎁 Upgrade Redis initializer to Hyrax 5's gen version

Prior to this commit, when looking at the
`Hyrax::RedisEventStore.instance` we saw it's connection information as:

`#<Redis client v4.8.1 for redis://localhost:6379/0>`

We were expecting the connection to be the following:

`#<Redis client v4.8.1 for redis://redis:6379/0>`

What we were seeing in tests is when we hit the redis connection we were
getting an error about not being able to connect to 127.0.0.1:6379 (e.g.
localhost).

With this commit, we have a clear connection to Redis.

See Redis Config initializer:

- https://github.com/samvera/hyrax/blob/966951ffaa72524e4a775f8a198bd51a47ece7d9/lib/generators/hyrax/templates/config/initializers/redis_config.rb#L1-L10

Co-authored-by: Kirk Wang <kirk.wang@scientist.com>

* 🧹 Clean up actors

Just found one actor that was overriding Hyrax.  This commit will switch
it to a decorator.

* 🐛 Handle missing labels

Adjust paths and keys to look for labels.

* Appease the cops

* 🧹 Assigning collection_type

The partials rendered in the tested view assume that we've set a
collection type.

* Appease rubocop

* Fixing nav link selectors to new structure

* Fixing nav link selectors to new structure

* 🧹 Clean up forms

The only big thing in this commit is the appearance_decorator.  I've
added to the spec to show that the decorator should be working as
intended.

* 🧹 Fix spec based on HTML class changes

* 🧹 Narrow specificity of CSS selector

The selector was *very* specific, and with the HTML class changes for
Bootstrap 3 to 4, this almost certainly broke.

Note, there are still underlying issues with two other specs; there
errors are listed below:

```
1) Admin can select home page theme when a search results theme is
selected updates the search results page with the selected layout view

Failure/Error: super

     ActionView::Template::Error:
       undefined method `with_collection' for nil:NilClass
```

* 🧹 Remove specificity of CSS selectors in test

The hyper specific selectors are not durable for CSS framework upgrades.

* 🐛 Adding document_component to blacklight's config

Blacklight 7.35.0 's default document_component is `nil`, see:

- https://github.com/projectblacklight/blacklight/blob/ac5fa8b300c5ad5c35b1663ef0f15372ffa2be0f/lib/blacklight/configuration.rb#L213
- https://github.com/projectblacklight/blacklight/blob/ac5fa8b300c5ad5c35b1663ef0f15372ffa2be0f/lib/blacklight/configuration.rb#L186

 Digging around in the wiki, you might find (only found because I cloned the repo):

- https://github.com/projectblacklight/blacklight/wiki/Configuration---Results-View

Related to:

- projectblacklight/blacklight#2317

* 🧹 Allow :clean or :clean_repo to work for the cleaners

Hyrax has :clean_repo and Hyku has :clean

Sometimes folks copy over specs from Hyrax, and bring along the
:clean_repo; which looks like it should work.

With this commit, we bring that logic along!

* 🧹 Remove skip CI

Perhaps it's flappy; but let's see.

* 🧹 Fix button class for Bootstrap 3 to 4

* 🧹 Favor Layout/LineLength over Metrics/LineLength

Rubocop seams to prefer the Layout namespace for LineLength.

* 🧹 The selector is not working

Checking the HTML (on the CircleCI SSH environment), it appears that the
selector should work in test.  But it is not.  So I'm removing the specificity.

* Cleaning a spec that should start clean

* 🧹 Ensure feature specs run clean

Prior to this commit, we did not automatically clean the features.  The
below ripgrep (and output) shows that there were some features which did
not start from a clean state.

```
rg "(clean|clean_repo):" spec/features --files-without-match
``

```
spec/features/accounts_spec.rb
spec/features/proprietor_spec.rb
spec/features/featured_collections_spec.rb
spec/features/user_roles_spec.rb
spec/features/oai_pmh_spec.rb
```

* Stab at trying to find a problem

* 🧹 Clean up services

This commit will reconcile the services that are overrides for Hyrax
with the Hyrax 5.0.0rc2 version.  There were a number of overrides that
were changed to the decorator pattern.

* Moving rescue and documenting the why

* 🧹 Rearrange order of filter chain

This is not tested in the UI, but the
`show_works_or_works_that_contain_files` remains after the troublesome
advanced query filters.

* 🧹 Address PR comments

This commit addresses comments from the review but one thing that is of
note is loading the I18n translations in the application.rb file.  We
needed this because our decorators load prior to I18n loads the locales
in our config/locales directory for them to use so we were getting
missing translations.

* 🧹 Attempting to find and squash bug

* ♻️ Account for observed customizations

Dear reviewer, put on your reading glasses.

This commit looks at the newly refactored
`Hyrax::IiifAv::DisplaysContentDecorator` as well as the current state
of [PALS's Hyrax::IiifAv::DisplaysContentDecorator][1] and attempts to
account for the variances between the two by introducing configurations.

Yes, we could port this to the hyrax-iiif_av gem, but for now that would
not solve the underlying issue of how we've been handling things.

Why the Hyku::Application class attribute?  Because the decorator is
being mixed into a module, which does not response to `.class_attribute`
methods.

[1]: https://github.com/scientist-softserv/palni-palci/blob/8754556c0225ce9f04674c1ffac6403586fd65f4/app/presenters/concerns/hyrax/iiif_av/displays_content_decorator.rb

* 🧹 Clean up other overrides

This commit is aiming to clean up the rest of the found overrides.

* 🧹 Change locale file load order so that our local files are prioritized

We add our local config locale directory to the I18n.load_path so that our local files take precendence over the ones found in our gems.

Related issue:
- scientist-softserv/hykuup_knapsack#55

* 🧹 Update IIIF Print and AV gems

We were not seeing images loading correctly in the UV because we
introduced the `Hyku::WorksControllerBehavior` and IIIF Print did not
know about it.
  - scientist-softserv/iiif_print@cad2cf3

We were seeing a respon to mismatch error in the Hyrax IIIF AV.
  - samvera-labs/hyrax-iiif_av@4723b8f

Also, the image that I tested was a phone image that apparently had
different ExifImageHeight/ExifImageWidth values than the
ImageHeight/ImageWidth values.  This was probably because modern phones
typically generate multiple images so the user can choose the best shot.
The exiftool_image_to_fits.xslt was proritizing the Exif values over the
regular values and would cause our image characterization to have weird
height and width values.  The change in this PR prioritizes the regular
over the Exif values.

Ref:
  - scientist-softserv/hykuup_knapsack#68

* 🐛 Fix video thumbnail generation

In a previous commit we created the
`Hyrax::FileSetDerivativesServiceDecorator` to override the default
thumbnails that Hyrax uses but I forgot to add the video thumbnail,
which is fixed here.

Ref
  - scientist-softserv/hykuup_knapsack#69

* 🧹 Add space between thumbnail and title

* 🧹 Update Hyku version

This commit bumps the hyku version from 5.1.0 to 6.0.0.

* 💄 ruboco fix

* 🧹 Fixing a few styles

This commit will change the maximized size to match Bootstrap 4 break
points.  Also, added btn-secondary to hyku.css so it doesn't get
overriden by appearance styles.  Finally, restructured the homepage to
make it look more like Hyrax 5.

* sort properties

* adjust screen size

* 🧹 Update `rails` to `6-1-stable` for GoodJob

There is a compatibility issue with Rails 6.1.7.6 and Ruby 3.2 that was
affecting GoodJob.  There was a backport to the 6-1-stable branch that
fixes this issue.

See:
  - rails/rails#46895

Ref:
  - scientist-softserv/hykuup_knapsack#67

* 🎁 only add Good Job classes if it's enabled

ref:
- #2047 (comment)

* ♻️ Removing file in favor of comments found in docker-compose.yml

Remove file in favor of comments found on lines #138 - 139, which uses the sleep infinity command to accomplish the same thing.

ref:
- https://devopscube.com/keep-docker-container-running/

* 🧹 Remove disabling of Rubocop Naming/PredicateName (#2126)

This cop was originally disabled in order to get specs to run during CI
without code changes. Now that specs are running, the changes can be
safely made to appease rubocop rather than disabling it.

* 🎁 Add Hyrax version in the footer

Often we forget what version of Hyrax we're running so this should help.

---------

Co-authored-by: Rob Kaufman <rob@notch8.com>
Co-authored-by: Shana Moore <shana@scientist.com>
Co-authored-by: LaRita Robinson <larita@scientist.com>
Co-authored-by: Jeremy Friesen <jeremy.n.friesen@gmail.com>
Co-authored-by: Benjamin Kiah Stroud <32469930+bkiahstroud@users.noreply.github.com>
Co-authored-by: LaRita Robinson <laritakr@users.noreply.github.com>
@artemgurzhii
Copy link

Google Chrome is not currently installed; installing it
Preparing Chrome installation for Debian-based systems
https://dl.google.com/linux/chrome/deb/pool/main/g/google-chrome-stable/google-chrome-stable_114.0.5735.90-1_amd64.deb:
2024-05-16 08:04:25 ERROR 404: Not Found.
/bin/bash: line 130: google-chrome-stable: command not found
Google Chrome v114.0.5735.90 (stable) failed to install.

Exited with code exit status 1

@craigd-lumin
Copy link

Same for me.
Google Chrome is not currently installed; installing it Preparing Chrome installation for Debian-based systems https://dl.google.com/linux/chrome/deb/pool/main/g/google-chrome-stable/google-chrome-stable_114.0.5735.90-1_amd64.deb: 2024-05-16 09:02:39 ERROR 404: Not Found. /bin/bash: line 130: google-chrome-stable: command not found Google Chrome v114.0.5735.90 (stable) failed to install.

@jmetric
Copy link

jmetric commented May 16, 2024

Google Chrome is not currently installed; installing it
Preparing Chrome installation for Debian-based systems
https://dl.google.com/linux/chrome/deb/pool/main/g/google-chrome-stable/google-chrome-stable_114.0.5735.90-1_amd64.deb:
2024-05-16 08:04:25 ERROR 404: Not Found.
/bin/bash: line 130: google-chrome-stable: command not found
Google Chrome v114.0.5735.90 (stable) failed to install.

Exited with code exit status 1

This solution may not work if you are using MacOS, but we upgraded our browser tools to 1.4.2 (browser-tools: circleci/browser-tools@1.4.2) and removed the explicit browser-tools/install-browser-tools: #chrome-version: 114.0.5735.90 lines and this resolved the issue for us.

Google appears to have made several changes to Chrome versions yesterday (https://chromereleases.googleblog.com/2024/) though I was unable to find a reference to version 114.

@adamdupuis
Copy link

adamdupuis commented May 16, 2024

@artemgurzhii @craigd-lumin

Make sure you are using a more recent version of browser-tools. I'm using circleci/browser-tools@1.4.8. I had to begin using Chrome v116.0.5845.96 or greater:

- browser-tools/install-chrome:
    chrome-version: "116.0.5845.96"

The problem is these old versions are removed from Google's mirrors. This version will likely be removed in the next month or so. I had assumed the new versions of browser-tools would resolve this issue, but I guess not.

@mightystrong
Copy link

mightystrong commented May 16, 2024

Same for me. Google Chrome is not currently installed; installing it Preparing Chrome installation for Debian-based systems https://dl.google.com/linux/chrome/deb/pool/main/g/google-chrome-stable/google-chrome-stable_114.0.5735.90-1_amd64.deb: 2024-05-16 09:02:39 ERROR 404: Not Found. /bin/bash: line 130: google-chrome-stable: command not found Google Chrome v114.0.5735.90 (stable) failed to install.

We experienced this issue frequently. The following implementation has been stable. Specific chrome versions are hit or miss as Google doesn't consistently maintain availability.

orbs:
  browser-tools: circleci/browser-tools@1.4.6
.
.
.
    steps:
      - attach_workspace:
          at: /your/workspace
      - browser-tools/install-chrome
      - run:
          command: |
            google-chrome --version
          name: Check install
      - checkout
.
.
.

@artemgurzhii
Copy link

@adamdupuis thank you for help! we were having browser-tools: circleci/browser-tools@1.4.2 and chrome-version: 114.0.5735.90, replaced with browser-tools: circleci/browser-tools@1.4.8 and chrome-version: 116.0.5845.96, works fine now!

@craigd-lumin
Copy link

Thanks for the help @adamdupuis , much appreciated!

@levischuckeats
Copy link

Our team ran into this and no matter what version we tried, no chrome version listed on chrome driver downloads would resolve.
The solution I came up with was to swap out the install section with the following script for debian environments:

      - run: |
          echo 'deb http://dl.google.com/linux/chrome/deb/ stable main' | sudo tee -a /etc/apt/sources.list.d/chrome.list
          wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
          sudo apt-get update
          sudo apt-get install -y google-chrome-stable

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests