Shopify / lighthouse-ci-action

MIT License
100 stars 50 forks source link

Shopify-CLI - Nokogiri dependency upgrade #76

Closed octipus closed 8 months ago

octipus commented 8 months ago

A lot to unpack here after a few hours of debugging but i'll try to make it as clear as possible. To start with, my Lighthouse action is pretty standard so nothing fancy going on there:

name: Shopify Lighthouse CI
on:
  pull_request:
    branches:
      - develop

jobs:
  lhci:
    name: Lighthouse
    runs-on: ubuntu-22.04
    steps:
    - uses: actions/checkout@v2
    - name: Lighthouse
      uses: shopify/lighthouse-ci-action@v1.1.3
      with:
        access_token: ${{ secrets.SHOP_ACCESS_TOKEN }}
        store: ${{ secrets.SHOP_STORE }}
        lhci_github_app_token: ${{ secrets.LHCI_GITHUB_APP_TOKEN }}
        lhci_min_score_performance: ${{ vars.LHCI_PERFORMANCE }}
        lhci_min_score_accessibility: ${{ vars.LHCI_ACCESSIBILITY }}
        product_handle: ${{ vars.LHCI_PRODUCT_HANDLE }}
        collection_handle: ${{ vars.LHCI_COLLECTION_HANDLE }}
        pull_theme: ${{ vars.LHCI_THEME }}

1. I am running into an issue with lighthouse where a shopify-cli dependency (nokogiri) needs to be upgraded from 1.13 to 1.15 or above. The lighthouse error i am getting is this:

#8 [3/4] RUN gem install shopify-cli -N -n /usr/local/bin
#8 25.53 ERROR:  Error installing shopify-cli:
#8 25.53    The last version of nokogiri (>= 1.12) to support your Ruby & RubyGems was 1.15.5. Try installing it with `gem install nokogiri -v 1.15.5` and then running the current command again
#8 25.53    nokogiri requires Ruby version >= 3.0, < 3.4.dev. The current ruby version is 2.7.1.83.
#8 25.57 Successfully installed ast-2.4.2
#8 25.57 Successfully installed parser-3.2.2.4
#8 ERROR: process "/bin/sh -c gem install shopify-cli -N -n /usr/local/bin" did not complete successfully: exit code: 1
------
 > [3/4] RUN gem install shopify-cli -N -n /usr/local/bin:
25.53 ERROR:  Error installing shopify-cli:
25.53   The last version of nokogiri (>= 1.12) to support your Ruby & RubyGems was 1.15.5. Try installing it with `gem install nokogiri -v 1.15.5` and then running the current command again
25.53   nokogiri requires Ruby version >= 3.0, < 3.4.dev. The current ruby version is 2.7.1.83.
25.57 Successfully installed ast-2.4.2
25.57 Successfully installed parser-3.2.2.4
------
Dockerfile:3
--------------------
   1 |     FROM cpclermont/lighthouse-ci-action:1.0.0
   2 |     RUN gem uninstall shopify-cli
   3 | >>> RUN gem install shopify-cli -N -n /usr/local/bin
   4 |     COPY entrypoint.sh /entrypoint.sh
   5 |     ENTRYPOINT ["/entrypoint.sh"]
--------------------
ERROR: failed to solve: process "/bin/sh -c gem install shopify-cli -N -n /usr/local/bin" did not complete successfully: exit code: 1
Warning: Docker build failed with exit code 1, back off 5.467 seconds before retry.
/usr/bin/docker build -t 299e16:ccc617f4c1644a4898b5e8b3fe7c3bfc -f "/home/runner/work/_actions/octipus/lighthouse-ci-action/main/Dockerfile" "/home/runner/work/_actions/octipus/lighthouse-ci-action/main"

2. Now this seems to be a dependency of the ruby's Shopify-cli repository which seems to archived now so the chances of if being updated are practically none. I wonder what could be a reasonable solution for this and also how come we use deprecated/archived dependencies for Lighthouse?

Lastly want to add that the action was working fine until about 2 weeks ago when it decided to stop. Am i missing something obvious here? Does anyone else have a similar issue?

burakduganci commented 8 months ago

Hi @octipus,

I have same issue. I research a solution. If you found a solution, can you write a comment this issue? Thank you.

beelarr commented 8 months ago

I have the same issue. Started on Dec. 26 for us.

JohnnyMcGee commented 8 months ago

Same issue here. It ran successfully on Dec. 22, 2023. Tried to run it again on Jan.2, 2024 and seeing the exact problem you describe.

slavamak commented 8 months ago

Same here

charlespwd commented 8 months ago

Acknowledged, no further need to comment.