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

Lack of clarity regarding installation caching #50

Open
matthewcsnyder opened this issue May 13, 2022 · 5 comments
Open

Lack of clarity regarding installation caching #50

matthewcsnyder opened this issue May 13, 2022 · 5 comments
Assignees
Labels
backlog Identified as a backlog item, often combined with low-priority and help-wanted labels enhancement New feature or request

Comments

@matthewcsnyder
Copy link

Orb version

1.3.0

What happened

It's not clear to me if browser/tool installations provided by this orb are cached, or whether it is possible to cache them.

All examples of using this orb in a config.yml never wrap it in restore/save_cache stanzas:

    steps:
      - browser-tools/install-chrome
      - checkout
      ...

Usually placed at the top of a set of steps, rather than interleaved with cache stanzas.

Is it possible to cache installs of browsers (specifically Chrome for my requirements)? Would it be as simple as (e.g. for apt-based Linuxes) to have something like:

    steps:
      - restore_cache:
          name: Restore cache
          keys:
            - v1-my-cache-{{ checksum "yarn.lock" }}
      - browser-tools/install-chrome
      - save_cache
        name: Save cache
        key: v1-my-cache-{{ checksum "yarn.lock" }}
        paths:
            - /usr/bin/google-chrome
       ...

Thanks!

@ArturT
Copy link

ArturT commented Jun 3, 2022

+1 It would be great to have a way to use cached Chrome instead of waiting 15-19 seconds to install it every time we run Ci build.

Probably we would have to cache based on the Chrome version somehow instead of using {{ checksum "yarn.lock" }}.

@timtyrrell
Copy link

At a quick glance, seems like moving part of the installation_check() before the install could remedy some of this.

@mfittko
Copy link

mfittko commented Sep 29, 2022

Awesome idea! Meanwhile you can just put this into a docker image like so:

FROM scratch
# build args
ARG ORB_VERSION=v1.4.0
ARG ORB_PARAM_CHANNEL=stable
ARG ORB_PARAM_CHROME_VERSION=latest
ARG ORB_PARAM_DRIVER_INSTALL_DIR=~/chromedriver
# install chrome and chromedriver
RUN bash <(curl -sL https://raw.githubusercontent.com/CircleCI-Public/browser-tools-orb/$ORB_VERSION/src/scripts/install-chrome.sh)
RUN bash <(curl -sL https://raw.githubusercontent.com/CircleCI-Public/browser-tools-orb/$ORB_VERSION/src/scripts/install-chromedriver.sh)

@felicianotech
Copy link
Contributor

reviewing

@felicianotech felicianotech self-assigned this Jan 27, 2023
@michael-markl
Copy link

We are currently facing install times of 6-10 minutes in every run (for install-chrome), as there is no cache (and it seems the current download rate from http://archive.ubuntu.com/ubuntu is capped at <100kB/s). A cache would really help avoid flaky download rates.

@BytesGuy BytesGuy added enhancement New feature or request backlog Identified as a backlog item, often combined with low-priority and help-wanted labels labels May 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backlog Identified as a backlog item, often combined with low-priority and help-wanted labels enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

7 participants