Skip to content

Replace conda update / conda cache in cirrus with conda-lock #4105

@jamesp

Description

@jamesp

📰 Custom Issue

Current cirrus ci resolves a new environment every run. Due to computational constraints, sometimes this can take more than an hour and force the job to timeout when running the command conda env update --prefix=/tmp/cirrus-ci-build/.nox/tests --file=requirements/ci/py36.yml --prune. Proposed alternative:

  1. Create environment:
    a. if environment-py36.lock doesn't exist, resolve an environment with conda env create. use conda-lock to create an explicit lock file environment-py36.yml.
    b. if environment-py36.lock does exist, use conda create -f environment-py36.yml to avoid resolving a new env.
  2. Run tests.
  3. Only cache environment-py36.yml with our current cache invalidation logic (weekly I think?) rather than the whole conda directory.

This would mean reproducible environments, but not committing an explicit environment to our repo and avoid long resolve and update calls in the CI.

Alternatively, we could resolve and check-in lock files to our repository. This is standard practice in the javascript world, see https://stackoverflow.com/questions/44206782/do-i-commit-the-package-lock-json-file-created-by-npm-5 for some discussions of the pros and cons of doing so.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions