diff --git a/.github/workflows/ab_tests.yml b/.github/workflows/ab_tests.yml new file mode 100644 index 0000000000..7b06f55850 --- /dev/null +++ b/.github/workflows/ab_tests.yml @@ -0,0 +1,367 @@ +name: A/B Tests +on: + push: + branches-ignore: + - main + +concurrency: + # Include `github.event_name` to avoid pushes to `main` and + # scheduled jobs canceling one another + group: ab_tests-${{ github.event_name }}-${{ github.ref }} + cancel-in-progress: true + +defaults: + # Required shell entrypoint to have properly activated conda environments + run: + shell: bash -l {0} + +jobs: + discover_ab_envs: + name: Discover A/B environments + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 0 + - uses: actions/setup-python@v4 + with: + python-version: '3.10' + - id: set-matrix + run: echo "::set-output name=matrix::$(python ci/scripts/discover_ab_environments.py)" + outputs: + matrix: ${{ steps.set-matrix.outputs.matrix }} + + # Everything below this point runs iff there are files matching + # AB_environments/AB_*.conda.yaml + # AB_environments/AB_*.dask.yaml + + software: + name: Setup + runs-on: ubuntu-latest + needs: discover_ab_envs + if: ${{ fromJson(needs.discover_ab_envs.outputs.matrix) }} + strategy: + fail-fast: false + matrix: + python-version: ["3.9"] + runtime-version: ${{ fromJson(needs.discover_ab_envs.outputs.matrix) }} + + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 0 + + - name: Set up environment + uses: conda-incubator/setup-miniconda@v2 + with: + miniforge-variant: Mambaforge + use-mamba: true + condarc-file: ci/condarc + python-version: ${{ matrix.python-version }} + environment-file: ci/environment.yml + + - name: Build Coiled Software Environment + env: + DASK_COILED__TOKEN: ${{ secrets.COILED_BENCHMARK_BOT_TOKEN }} + run: | + export PYTHON_VERSION_FORMATTED=$(echo "${{ matrix.python-version }}" | sed 's/\.//g' ) + export REF_NAME_FORMATTED=$(echo "$GITHUB_REF_NAME" | sed 's/\./-/g' ) + export COILED_SOFTWARE_NAME_HEAD=dask-engineering/coiled-runtime-${{ github.event_name }} + export COILED_SOFTWARE_NAME_TAIL=$GITHUB_RUN_ID-$(echo ${{ matrix.runtime-version }} | tr 'A-Z' 'a-z')-py$PYTHON_VERSION_FORMATTED + + if [[ ${{ github.event_name }} = 'pull_request' ]] + then + export COILED_SOFTWARE_NAME=$COILED_SOFTWARE_NAME_HEAD-${{ github.event.number }}-$COILED_SOFTWARE_NAME_TAIL + else + export COILED_SOFTWARE_NAME=$COILED_SOFTWARE_NAME_HEAD-$GITHUB_REF_TYPE-$REF_NAME_FORMATTED-$COILED_SOFTWARE_NAME_TAIL + fi + + cp AB_environments/${{ matrix.runtime-version }}.conda.yaml coiled_software_environment.yaml + export COILED_SOFTWARE_ENV=$(python ci/dask_config_to_env.py AB_environments/${{ matrix.runtime-version }}.dask.yaml) + export ENV_FILE=coiled_software_environment.yaml + cat $ENV_FILE + + mamba install coiled + echo "Creating Coiled software environment for $COILED_SOFTWARE_NAME" + echo "Environment parameters: $COILED_SOFTWARE_ENV" + coiled env create --name $COILED_SOFTWARE_NAME --conda $ENV_FILE $COILED_SOFTWARE_ENV + + # Put COILED_SOFTWARE_NAME into a file so it can be downloaded in subsequent workflow jobs + echo $COILED_SOFTWARE_NAME > software_name.txt + + # Dummy for compatibility with tests.yml + echo false > test_upstream.txt + + - name: Upload environment file + uses: actions/upload-artifact@v3 + with: + name: software-environment-${{ matrix.runtime-version }}-py${{ matrix.python-version }} + path: | + coiled_software_environment.yaml + software_name.txt + test_upstream.txt + + runtime: + name: Runtime - ${{ matrix.os }}, Python ${{ matrix.python-version }}, Runtime ${{ matrix.runtime-version }} + needs: [discover_ab_envs, software] + runs-on: ${{ matrix.os }} + timeout-minutes: 120 + strategy: + fail-fast: false + matrix: + os: [ubuntu-latest] + python-version: ["3.9"] + runtime-version: ${{ fromJson(needs.discover_ab_envs.outputs.matrix) }} + + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 0 + + - name: Set up environment + uses: conda-incubator/setup-miniconda@v2 + with: + miniforge-variant: Mambaforge + use-mamba: true + condarc-file: ci/condarc + python-version: ${{ matrix.python-version }} + environment-file: ci/environment.yml + + - name: Download software environment assets + if: matrix.runtime-version == 'latest' || startsWith(matrix.runtime-version, 'AB_') + uses: actions/download-artifact@v3 + with: + name: software-environment-${{ matrix.runtime-version }}-py${{ matrix.python-version }} + + - name: Install coiled-runtime + env: + COILED_RUNTIME_VERSION: ${{ matrix.runtime-version }} + run: source ci/scripts/install_coiled_runtime.sh + + - name: Run Coiled Runtime Tests + id: test + env: + DASK_COILED__TOKEN: ${{ secrets.COILED_BENCHMARK_BOT_TOKEN }} + AWS_ACCESS_KEY_ID: ${{ secrets.RUNTIME_CI_BOT_AWS_ACCESS_KEY_ID }} + AWS_SECRET_ACCESS_KEY: ${{ secrets.RUNTIME_CI_BOT_AWS_SECRET_ACCESS_KEY }} + COILED_RUNTIME_VERSION: ${{ matrix.runtime-version }} + DB_NAME: runtime-${{ matrix.os }}-${{ matrix.runtime-version }}-py${{ matrix.python-version }}.db + BENCHMARK: true + run: bash ci/scripts/run_tests.sh tests/runtime + + - name: Upload benchmark results + uses: actions/upload-artifact@v3 + if: always() + with: + name: runtime-${{ matrix.os }}-${{ matrix.runtime-version }}-py${{ matrix.python-version }} + path: runtime-${{ matrix.os }}-${{ matrix.runtime-version }}-py${{ matrix.python-version }}.db + + benchmarks: + name: Benchmarks - ${{ matrix.os }}, Python ${{ matrix.python-version }}, Runtime ${{ matrix.runtime-version }} + needs: [discover_ab_envs, software] + runs-on: ${{ matrix.os }} + timeout-minutes: 120 + strategy: + fail-fast: false + matrix: + os: [ubuntu-latest] + python-version: ["3.9"] + runtime-version: ${{ fromJson(needs.discover_ab_envs.outputs.matrix) }} + + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 0 + + - name: Set up environment + uses: conda-incubator/setup-miniconda@v2 + with: + miniforge-variant: Mambaforge + use-mamba: true + condarc-file: ci/condarc + python-version: ${{ matrix.python-version }} + environment-file: ci/environment.yml + + - name: Download software environment assets + uses: actions/download-artifact@v3 + with: + name: software-environment-${{ matrix.runtime-version }}-py${{ matrix.python-version }} + + - name: Install coiled-runtime + env: + COILED_RUNTIME_VERSION: ${{ matrix.runtime-version }} + run: source ci/scripts/install_coiled_runtime.sh + + - name: Run benchmarking tests + id: benchmarking_tests + env: + DASK_COILED__TOKEN: ${{ secrets.COILED_BENCHMARK_BOT_TOKEN }} + AWS_ACCESS_KEY_ID: ${{ secrets.RUNTIME_CI_BOT_AWS_ACCESS_KEY_ID }} + AWS_SECRET_ACCESS_KEY: ${{ secrets.RUNTIME_CI_BOT_AWS_SECRET_ACCESS_KEY }} + COILED_RUNTIME_VERSION: ${{ matrix.runtime-version }} + DB_NAME: benchmark-${{ matrix.os }}-${{ matrix.runtime-version }}-py${{ matrix.python-version }}.db + BENCHMARK: true + run: bash ci/scripts/run_tests.sh tests/benchmarks + + - name: Upload benchmark results + uses: actions/upload-artifact@v3 + if: always() + with: + name: benchmark-${{ matrix.os }}-${{ matrix.runtime-version }}-py${{ matrix.python-version }} + path: benchmark-${{ matrix.os }}-${{ matrix.runtime-version }}-py${{ matrix.python-version }}.db + + stability: + name: Stability - ${{ matrix.os }}, Python ${{ matrix.python-version }}, Runtime ${{ matrix.runtime-version }} + needs: [discover_ab_envs, software] + runs-on: ${{ matrix.os }} + timeout-minutes: 120 + strategy: + fail-fast: false + matrix: + os: [ubuntu-latest] + python-version: ["3.9"] + runtime-version: ${{ fromJson(needs.discover_ab_envs.outputs.matrix) }} + + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 0 + + - name: Set up environment + uses: conda-incubator/setup-miniconda@v2 + with: + miniforge-variant: Mambaforge + use-mamba: true + condarc-file: ci/condarc + python-version: ${{ matrix.python-version }} + environment-file: ci/environment.yml + + - name: Download software environment assets + if: matrix.runtime-version == 'latest' || startsWith(matrix.runtime-version, 'AB_') + uses: actions/download-artifact@v3 + with: + name: software-environment-${{ matrix.runtime-version }}-py${{ matrix.python-version }} + + - name: Install coiled-runtime + env: + COILED_RUNTIME_VERSION: ${{ matrix.runtime-version }} + run: source ci/scripts/install_coiled_runtime.sh + + - name: Run stability tests + id: stability_tests + env: + DASK_COILED__TOKEN: ${{ secrets.COILED_BENCHMARK_BOT_TOKEN }} + AWS_ACCESS_KEY_ID: ${{ secrets.RUNTIME_CI_BOT_AWS_ACCESS_KEY_ID }} + AWS_SECRET_ACCESS_KEY: ${{ secrets.RUNTIME_CI_BOT_AWS_SECRET_ACCESS_KEY }} + COILED_RUNTIME_VERSION: ${{ matrix.runtime-version }} + DB_NAME: stability-${{ matrix.os }}-${{ matrix.runtime-version }}-py${{ matrix.python-version }}.db + BENCHMARK: true + CLUSTER_DUMP: true + run: bash ci/scripts/run_tests.sh tests/stability + + - name: Upload benchmark results + uses: actions/upload-artifact@v3 + if: always() + with: + name: stability-${{ matrix.os }}-${{ matrix.runtime-version }}-py${{ matrix.python-version }} + path: stability-${{ matrix.os }}-${{ matrix.runtime-version }}-py${{ matrix.python-version }}.db + + cleanup: + needs: [discover_ab_envs, software, runtime, benchmarks, stability] + if: always() && ${{ fromJson(needs.discover_ab_envs.outputs.matrix) }} + name: Cleanup + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + python-version: ["3.9"] + runtime-version: ${{ fromJson(needs.discover_ab_envs.outputs.matrix) }} + + steps: + - uses: actions/checkout@v2 + + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + + - name: Install coiled + run: python -m pip install coiled + + - name: Download software environment assets + uses: actions/download-artifact@v3 + with: + name: software-environment-${{ matrix.runtime-version }}-py${{ matrix.python-version }} + + - name: Remove Coiled software environment + env: + DASK_COILED__TOKEN: ${{ secrets.COILED_BENCHMARK_BOT_TOKEN }} + run: | + export SOFTWARE_NAME=$(cat software_name.txt) + echo "Deleting $SOFTWARE_NAME" + coiled env delete $SOFTWARE_NAME + + process-results: + needs: [discover_ab_envs, runtime, benchmarks, stability] + name: Combine separate benchmark results + if: always() && ${{ fromJson(needs.discover_ab_envs.outputs.matrix) }} + runs-on: ubuntu-latest + concurrency: + # Fairly strict concurrency rule to avoid stepping on benchmark db. + # Could eventually replace with a real db in coiled, RDS, or litestream + group: process-benchmarks + cancel-in-progress: false + steps: + - uses: actions/checkout@v2 + + - uses: actions/setup-python@v4 + + - name: Install dependencies + run: pip install alembic + + - uses: actions/download-artifact@v3 + with: + path: benchmarks + + - name: Combine benchmarks + run: | + ls -lhR benchmarks + bash ci/scripts/combine-dbs.sh + + - name: Upload benchmark results as artifact + uses: actions/upload-artifact@v3 + with: + name: benchmark.db + path: benchmark.db + + static-site: + needs: [discover_ab_envs, process-results] + # Always generate the site, as this can be skipped even if an indirect dependency fails (like a test run) + if: always() && ${{ fromJson(needs.discover_ab_envs.outputs.matrix) }} + name: Build static dashboards + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 0 + + - uses: actions/download-artifact@v3 + with: + name: benchmark.db + + - name: Set up environment + uses: conda-incubator/setup-miniconda@v2 + with: + miniforge-variant: Mambaforge + use-mamba: true + python-version: "3.9" + environment-file: ci/environment-dashboard.yml + + - name: Generate dashboards + run: python dashboard.py -d benchmark.db -o static -b AB_baseline + + - name: Upload artifact + uses: actions/upload-artifact@v3 + with: + name: static-dashboard + path: static diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 5195d69cd2..bfb5df772d 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -89,7 +89,7 @@ jobs: # Create conda environment.yaml file for the latest software environment python ci/create_latest_runtime_meta.py - export ENV_FILE=latest.yaml + export ENV_FILE=coiled_software_environment.yaml cat $ENV_FILE mamba install coiled @@ -104,7 +104,7 @@ jobs: with: name: software-environment-py${{ matrix.python-version }} path: | - latest.yaml + coiled_software_environment.yaml software_name.txt test_upstream.txt ab_baseline.txt @@ -295,7 +295,7 @@ jobs: - uses: actions/checkout@v2 - name: Set up Python - uses: actions/setup-python@v3 + uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} @@ -467,8 +467,7 @@ jobs: name: software-environment-py3.9 - name: Generate dashboards - run: | - python dashboard.py -d benchmark.db -o static -b $(cat ab_baseline.txt) + run: python dashboard.py -d benchmark.db -o static -b $(cat ab_baseline.txt) - name: Upload artifact uses: actions/upload-artifact@v3 diff --git a/AB_environments/AB_baseline.conda.yaml.rename_me b/AB_environments/AB_baseline.conda.yaml.rename_me new file mode 100644 index 0000000000..8485352382 --- /dev/null +++ b/AB_environments/AB_baseline.conda.yaml.rename_me @@ -0,0 +1,19 @@ +# Special environment file for A/B testing, used as the baseline environment. +# Change contents as needed and remove the .rename_me suffix. +channels: + - conda-forge +dependencies: + - python=3.9 + # Here we're using coiled-runtime for the sake of convenience, but we didn't have + # to. We could have also pointed to a nightly build. + - coiled-runtime=0.1.0 + - pip: + # Notes: + # - You can't install anything with conda which conflicts the versions + # pinned in coiled-runtime. Pip packages ignore these restrictions. + # - You can point to your own git fork instead + # For example, if you want to test a PR before it's merged into main, you should + # change this to the dask/dask and/or dask/distributed git tip + - dask==2022.8.1 + - distributed=2022.8.1 + # - git+https://github.com/dask/distributed@dd81b424971e81616e1a52fa09ce4698a5002d41 diff --git a/AB_environments/AB_baseline.dask.yaml.rename_me b/AB_environments/AB_baseline.dask.yaml.rename_me new file mode 100644 index 0000000000..8c296301be --- /dev/null +++ b/AB_environments/AB_baseline.dask.yaml.rename_me @@ -0,0 +1,3 @@ +# Special environment file for A/B testing, used as the baseline environment. +# Change contents as needed and remove the .rename_me suffix. +# Leave empty if you don't want to override anything. diff --git a/AB_environments/AB_sample.conda.yaml.rename_me b/AB_environments/AB_sample.conda.yaml.rename_me new file mode 100644 index 0000000000..87b6409f3f --- /dev/null +++ b/AB_environments/AB_sample.conda.yaml.rename_me @@ -0,0 +1,14 @@ +# Sample conda environment file for A/B testing. +# Delete/rename as needed. +# All files *must* be called AB_.conda.yaml +# and *must* be accompanied by AB_.dask.yaml + +# See notes in AB_baseline.conda.yaml +channels: + - conda-forge +dependencies: + - python=3.9 + - coiled-runtime=0.1.0 + - pip: + - dask==2022.8.1 + - git+https://github.com/dask/distributed@dd81b424971e81616e1a52fa09ce4698a5002d41 diff --git a/AB_environments/AB_sample.dask.yaml.rename_me b/AB_environments/AB_sample.dask.yaml.rename_me new file mode 100644 index 0000000000..1442587efe --- /dev/null +++ b/AB_environments/AB_sample.dask.yaml.rename_me @@ -0,0 +1,8 @@ +# Sample dask config file for A/B testing +# Change contents/Delete/rename as needed. +# All files *must* be called AB_.conda.yaml +# and *must* be accompanied by AB_.dask.yaml. +# Leave empty if you don't want to override anything. +distributed: + scheduler: + worker-saturation: 1.2 diff --git a/AB_environments/README.md b/AB_environments/README.md new file mode 100644 index 0000000000..e0bc229163 --- /dev/null +++ b/AB_environments/README.md @@ -0,0 +1,102 @@ +# A/B testing + +It's possible to run the Coiled Runtime benchmarks on A/B comparisons, +highlighting performance differences between different released versions +of dask, distributed, or any of the dependencies and/or between different +dask configs. + +To run an A/B test: + +### 1. Create a new branch + +Branch from main, on the coiled repo itself. Preferably, call the branch +something meaningful, e.g. `AB/jobstealing`. +You *must* create the branch on the Coiled repo (`coiled/coiled-runtime`); CI +workflows will not work on a fork (`yourname/coiled-runtime`). + +### 2. Create files in AB_environments/ + +Open the `AB_environments/` directory and rename/create files as needed. +Each A/B runtime is made of exactly two files: +- `AB_.conda.yaml` (a conda environment file) +- `AB_.dask.yaml` (a dask configuration file) + +You may create as many A/B runtime configs as you want in a single `coiled-runtime` +branch. + +The conda environment file can contain whatever you want, as long as it can run the +tests; e.g. + +```yaml +channels: + - conda-forge +dependencies: + - python=3.9 + - coiled-runtime=0.1.0 + - pip: + - dask==2022.8.1 + - distributed=2022.8.1 +``` +In this example it's using `coiled-runtime` as a base, but it doesn't have to. If you do +use `coiled-runtime` though, you must install any conflicting packages with pip; in the +example above, `coiled-runtime-0.1.0` pins `dask=2022.6.0` and `distributed=2022.6.0`, +so if you want to install a different version you need to use pip to circumvent the pin. + +Instead of published packages, you could also used arbitrary git hashes of +arbitrary forks, e.g. + +```yaml + - pip: + - dask==2022.8.1 + - git+https://github.com/yourname/distributed@dd81b424971e81616e1a52fa09ce4698a5002d41 +``` +The second file in each pair is a dask config file. If you don't want to change the +config, you must create an empty file. + +e.g. +```yaml +distributed: + scheduler: + work-stealing: False +``` + +### 3. Create baseline files +If you create *any* files in `AB_environments/`, you *must* create the baseline environment: + +- `AB_baseline.conda.yaml` +- `AB_baseline.dask.yaml` + +#### Complete example +We want to test the impact of disabling work stealing. We create 4 files: + +- `AB_environments/AB_baseline.conda.yaml`: +```yaml +channels: + - conda-forge +dependencies: + - python=3.9 + - coiled-runtime=0.1.0 + - pip: + - dask==2022.8.1 + - distributed=2022.8.1 +``` +- `AB_environments/AB_baseline.dask.yaml`: (empty file) +- `AB_environments/AB_no_steal.conda.yaml`: (same as baseline) +- `AB_environments/AB_no_steal.dask.yaml`: +```yaml +distributed: + scheduler: + work-stealing: False +``` + +### 4. Run CI +- `git push`. Note: we are *not* creating a PR. +- Open https://github.com/coiled/coiled-runtime/actions/workflows/ab_tests.yml and wait + for the run to complete. +- Open the run from the link above. In the Summary tab, scroll down and download the + `static-dashboard` artifact. + Note: artifacts will appear only after the run is complete. +- Decompress `static-dashboard.zip` and open `index.html` in your browser. + +### 5. Clean up +Remember to delete the branch once you're done. diff --git a/README.md b/README.md index 5b7acb173b..5005aa50d6 100644 --- a/README.md +++ b/README.md @@ -151,6 +151,13 @@ Writing a new benchmark fixture would generally look like: The `benchmark_time` fixture provides a fairly simple example. + +## A/B testing + +It's possible to run the Coiled Runtime benchmarks for A/B comparisons. +[Read full documentation](AB_environments/README.md). + + ## Contribute This repository uses GitHub Actions secrets for managing authentication tokens used diff --git a/ci/create_latest_runtime_meta.py b/ci/create_latest_runtime_meta.py index 16d1a8d3aa..4a7fa2680e 100644 --- a/ci/create_latest_runtime_meta.py +++ b/ci/create_latest_runtime_meta.py @@ -53,7 +53,7 @@ def main(): "channels": ["conda-forge"], "dependencies": requirements, } - with open("latest.yaml", "w") as f: + with open("coiled_software_environment.yaml", "w") as f: yaml.dump(env, f) diff --git a/ci/scripts/dask_config_to_env.py b/ci/scripts/dask_config_to_env.py new file mode 100755 index 0000000000..6e18b59b9b --- /dev/null +++ b/ci/scripts/dask_config_to_env.py @@ -0,0 +1,38 @@ +#!/usr/bin/env python +"""Read a dask config file and print it out in the format `-e ENV=VALUE ENV=VALUE ...` +This script is a work-around to not being able to upload dask config files to +`conda env create`. +""" +from __future__ import annotations + +import sys +from typing import Iterator + +import yaml + + +def main(fname: str) -> None: + with open(fname) as fh: + cfg = yaml.safe_load(fh) + # Print nothing in case of empty file, comments only, or empty dict + if cfg: + print("-e " + " ".join(traverse(cfg, []))) + + +def traverse(node: dict | list | str | float | None, path: list[str]) -> Iterator[str]: + if isinstance(node, dict): + for k, v in node.items(): + k = k.upper().replace("-", "_") + yield from traverse(v, path + [k]) + return + + if not path: + raise ValueError("The top-level element must be a dict") + if isinstance(node, str) and "'" in node: + raise ValueError("Unsupported character: ' (single quote)") + + yield "'DASK_" + "__".join(path) + f"={node}'" + + +if __name__ == "__main__": + main(sys.argv[1]) diff --git a/ci/scripts/discover_ab_environments.py b/ci/scripts/discover_ab_environments.py new file mode 100644 index 0000000000..60db39bf9a --- /dev/null +++ b/ci/scripts/discover_ab_environments.py @@ -0,0 +1,23 @@ +import glob +import json +import os.path + + +def main(): + envs = [] + for conda_fname in sorted(glob.glob("AB_environments/AB_*.conda.yaml")): + env_name = os.path.basename(conda_fname)[: -len(".conda.yaml")] + dask_fname = f"AB_environments/{env_name}.dask.yaml" + # Raise FileNotFoundError if missing + open(dask_fname).close() + envs.append(env_name) + + if envs and "AB_baseline" not in envs: + # If any A/B environments are defined, AB_baseline is required + raise FileNotFoundError("AB_environments/AB_baseline.conda.yaml") + + print(json.dumps(envs)) + + +if __name__ == "__main__": + main() diff --git a/ci/scripts/install_coiled_runtime.sh b/ci/scripts/install_coiled_runtime.sh index aa52a4b748..a98a155bb4 100644 --- a/ci/scripts/install_coiled_runtime.sh +++ b/ci/scripts/install_coiled_runtime.sh @@ -5,10 +5,10 @@ set -o errexit set -o nounset set -o xtrace -if [[ "$COILED_RUNTIME_VERSION" = 'latest' ]] +if [[ "$COILED_RUNTIME_VERSION" =~ latest|AB_ ]] then - cat latest.yaml - mamba env update --file latest.yaml + cat coiled_software_environment.yaml + mamba env update --file coiled_software_environment.yaml else mamba install -c conda-forge coiled-runtime=$COILED_RUNTIME_VERSION fi diff --git a/ci/scripts/run_tests.sh b/ci/scripts/run_tests.sh index 85a2dca5b1..b6676e1887 100644 --- a/ci/scripts/run_tests.sh +++ b/ci/scripts/run_tests.sh @@ -5,11 +5,16 @@ set -o xtrace BENCHMARK="${BENCHMARK:-false}" # Ensure we run additional tests when testing the latest coiled-runtime -if [[ $COILED_RUNTIME_VERSION = 'latest' ]] +if [[ "$COILED_RUNTIME_VERSION" = 'latest' ]] then EXTRA_OPTIONS="--run-latest" export COILED_SOFTWARE_NAME=$(cat software_name.txt) export TEST_UPSTREAM=$(cat test_upstream.txt) +elif [[ "$COILED_RUNTIME_VERSION" =~ AB_ ]] +then + EXTRA_OPTIONS="" + export COILED_SOFTWARE_NAME=$(cat software_name.txt) + export TEST_UPSTREAM=$(cat test_upstream.txt) else EXTRA_OPTIONS="" unset COILED_SOFTWARE_NAME