lewagon / wait-on-check-action

This action can be used to halt any workflow until required checks for a given ref (e.g., in a sibling workflow) pass successfully.
MIT License
338 stars 62 forks source link

Slow set up: action takes 15-30 seconds per invokation, cache not working? #102

Open corneliusroemer opened 6 months ago

corneliusroemer commented 6 months ago

The action is useful, but when invoking this action multiple times to check for multiple workflows to complete, the slow set up of this action can be detrimental.

The action seems to take up to 30 seconds to set itself up. Is this really necessary? Could the time be reduced somehow by using a cache of the dependencies or some lighter way of setting itself up? Maybe putting it in a docker container so the dependencies don't need to be reinstalled every time?

When looking at the action output I noticed that it seems to use a cache. But that cache doesn't appear to contain much of value:

Run lewagon/wait-on-check-action@v1.3.3
  with:
    ref: e0a[2](https://github.com/loculus-project/loculus/actions/runs/8215174961/job/22468368370?pr=1289#step:15:2)172846e23449b9b3be777d9216529653d35e
    check-name: Preprocessing dummy docker image build
    repo-token: ***
    wait-interval: 2
    allowed-conclusions: success,skipped
    verbose: true
  env:
    ALL_BROWSERS: false
    PLAYWRIGHT_VERSION: 1.42.1
Run ruby/setup-ruby@v1
Modifying PATH
Downloading Ruby
Extracting  Ruby
Print Ruby version
Installing Bundler
Run actions/cache@v3
  with:
    path: /home/runner/work/_actions/lewagon/wait-on-check-action/v1.[3](https://github.com/loculus-project/loculus/actions/runs/8215174961/job/22468368370?pr=1289#step:15:3).3
    key: Linux-gems-
    restore-keys: Linux-gems-
    enableCrossOsArchive: false
    fail-on-cache-miss: false
    lookup-only: false
  env:
    ALL_BROWSERS: false
    PLAYWRIGHT_VERSION: 1.[4](https://github.com/loculus-project/loculus/actions/runs/8215174961/job/22468368370?pr=1289#step:15:4)2.1
Cache Size: ~0 MB (13024 B)
/usr/bin/tar -xf /home/runner/work/_temp/9[5](https://github.com/loculus-project/loculus/actions/runs/8215174961/job/22468368370?pr=1289#step:15:5)8ccca0-1383-41c9-8184-9b171ecce93b/cache.tzst -P -C /home/runner/work/loculus/loculus --use-compress-program unzstd
Cache restored successfully
Cache restored from key: Linux-gems-
Run bundle install --jobs 4 --retry 3
Bundler 2.4.19 is running, but your lockfile was generated with 2.2.3. Installing Bundler 2.2.3 and restarting using that version.
Fetching gem metadata from https://rubygems.org/.
Fetching bundler 2.2.3
Installing bundler 2.2.3
Calling `DidYouMean::SPELL_CHECKERS.merge!(error_name => spell_checker)' has been deprecated. Please call `DidYouMean.correct_error(error_name, spell_checker)' instead.
Fetching gem metadata from https://rubygems.org/.........
Fetching concurrent-ruby 1.2.2
Fetching minitest 5.18.0
Fetching zeitwerk 2.[6](https://github.com/loculus-project/loculus/actions/runs/8215174961/job/22468368370?pr=1289#step:15:6).[7](https://github.com/loculus-project/loculus/actions/runs/8215174961/job/22468368370?pr=1289#step:15:7)
Fetching public_suffix 4.0.7
Installing zeitwerk 2.6.7
Installing minitest 5.1[8](https://github.com/loculus-project/loculus/actions/runs/8215174961/job/22468368370?pr=1289#step:15:8).0
Installing public_suffix 4.0.7
Installing concurrent-ruby 1.2.2
Using bundler 2.2.3
Fetching diff-lcs 1.4.4
Fetching ast 2.4.2
Fetching byebug 11.1.3
Installing ast 2.4.2
Installing byebug 11.1.3 with native extensions
Installing diff-lcs 1.4.4
Fetching faraday-net_http 2.0.3
Using ruby2_keywords 0.0.5
Fetching json 2.7.1
Fetching language_server-protocol 3.17.0.3
Installing faraday-net_http 2.0.3
Fetching lint_roller 1.1.0
Installing json 2.7.1 with native extensions
Installing lint_roller 1.1.0
Fetching parallel 1.24.0
Installing language_server-protocol 3.17.0.3
Installing parallel 1.24.0
Fetching racc 1.7.3
Installing racc 1.7.3 with native extensions
Fetching rainbow 3.1.1
Installing rainbow 3.1.1
Fetching regexp_parser 2.8.3
Installing regexp_parser 2.8.3
Fetching rexml 3.2.6
Installing rexml 3.2.6
Fetching rspec-support 3.10.1
Installing rspec-support 3.10.1
Fetching ruby-progressbar 1.13.0
Installing ruby-progressbar 1.13.0
Fetching unicode-display_width 2.5.0
Installing unicode-display_width 2.5.0
Fetching addressable 2.8.0
Installing addressable 2.8.0
Fetching i18n 1.12.0
Installing i18n 1.12.0
Fetching tzinfo 2.0.6
Installing tzinfo 2.0.6
Fetching faraday 2.3.0
Installing faraday 2.3.0
Fetching rspec-core 3.10.1
Installing rspec-core 3.10.1
Fetching rspec-expectations 3.10.1
Installing rspec-expectations 3.10.1
Fetching rspec-mocks 3.10.1
Installing rspec-mocks 3.10.1
Fetching activesupport 6.1.7.3
Installing activesupport 6.1.7.3
Fetching faraday-retry 2.0.0
Installing faraday-retry 2.0.0
Fetching sawyer 0.[9](https://github.com/loculus-project/loculus/actions/runs/8215174961/job/22468368370?pr=1289#step:15:9).2
Fetching rspec 3.[10](https://github.com/loculus-project/loculus/actions/runs/8215174961/job/22468368370?pr=1289#step:15:10).0
Installing sawyer 0.9.2
Installing rspec 3.10.0
Fetching parser 3.2.2.4
Fetching octokit 4.25.0
Installing octokit 4.25.0
Installing parser 3.2.2.4
Fetching rubocop-ast 1.30.0
Installing rubocop-ast 1.30.0
Fetching rubocop 1.57.2
Installing rubocop 1.57.2
Fetching rubocop-performance 1.[19](https://github.com/loculus-project/loculus/actions/runs/8215174961/job/22468368370?pr=1289#step:15:21).1
Fetching standard-custom 1.0.2
Installing standard-custom 1.0.2
Installing rubocop-performance 1.19.1
Fetching standard-performance 1.2.1
Installing standard-performance 1.2.1
Fetching standard 1.[32](https://github.com/loculus-project/loculus/actions/runs/8215174961/job/22468368370?pr=1289#step:15:38).1
Installing standard 1.32.1
Bundle complete! 6 Gemfile dependencies, [40](https://github.com/loculus-project/loculus/actions/runs/8215174961/job/22468368370?pr=1289#step:15:47) gems now installed.
Use `bundle info [gemname]` to see where a bundled gem is installed.
Run ruby entrypoint.rb
Checks running on ref:
Checks completed: Unit Tests, test (windows-latest), Check format and types, test (ubuntu-latest), Build config-processor Docker Image, Build keycloakify Docker Image, Preprocessing dummy docker image build, Build preprocessing-nextclade Docker Image, Build Backend Docker Image
Checks in_progress: k3d-e2e, Tests, Build Website Docker Image
Checks after ignore checks filter:
Checks completed: Unit Tests, test (windows-latest), Check format and types, test (ubuntu-latest), Build config-processor Docker Image, Build keycloakify Docker Image, Preprocessing dummy docker image build, Build preprocessing-nextclade Docker Image, Build Backend Docker Image
Checks in_progress: k3d-e2e, Tests, Build Website Docker Image
Checks after check_name filter:
Checks completed: Preprocessing dummy docker image build
Checks after Regexp filter:
Checks completed: Preprocessing dummy docker image build
Checks completed:
Preprocessing dummy docker image build: completed (success)
melyux commented 1 month ago

Noticed the same thing, I see it call actions/cache but it doesn't seem to work