Skip to content

Fix fetch-testdata and enable external CI triggers

Description

fetch-testdata.py was failing when told to fetch a specific ref of the testdata repo. This functionality is required to allow the alleles/ella-testdata CI to trigger this repo's tests on changes that have not yet been merged into main. Enabling this allows us to verify the new testdata is valid before making changes and breaking everything.

Ideally there will someday be a complete integration test combining backend, frontend, testdata and anno.

Changes

Testdata handling

  • if local repo isn't present, only check refs based on git ls-remote output
  • expanded testdata cases
  • include REF env var from Makefile/CI in the test containers
    • this allows alleles/ella-testdata to trigger CI for data changes

CI tests

  • Added UPSTREAM_TRIGGER variable for pipelines triggered from other repos
    • CI_PIPELINE_SOURCE=trigger is only true for pipelines triggered by API key
    • CI_PIPELINE_SOURCE=pipeline whether created as part of this repo's CI or an upstream one
  • When set, build steps are skipped since there are no code changes
  • If present, its value is the repo that triggered the pipeline (i.e., ella-testdata). The external repo is responsible for setting/forwarding the variable when triggering the pipeline

Scope creep changes

  • Testing
    • increase hypothesis deadline in test_regionfilter to reduce flakiness
    • fix incorrect artifact path for non-e2e tests
      • bad path was preventing logs being included with failed tests
    • sort .prettierignore and add ella-testdata/
      • non-prettier formatted data in ella-testdata was causing formatting tests to fail
    • mark all jobs interruptible so superseded pipelines are actually canceled
    • Moved building the review image to the review stage instead of build so it's only run if tests pass
  • Makefile
    • merge _e2e_prep into _test_prep
  • Dockerfile
    • add jq to base image, vim to dev target
      • dev/debugging convenience
  • Devcontainer
    • mount extensions from host OS for faster rebuilds
      • dev convenience
  • Misc
    • Add dev pipeline status and latest release badges to README.md

Related issues

Closes #2163 (closed)

Notes to review (code/docs/QA)

Tests

General

  • Tests have been added that prove my fix is effective or that my feature works
  • Related tests have been modified/removed

Hypothesis testing:

  • Soak testing has been done
  • Distribution between positive / negative cases has been checked

Database

  • Includes changes to database schema
  • Includes necessary database migrations

Configuration

  • Includes changes to configuration
  • Includes configuration migration instructions in documentation
Edited by Tor Solli-Nowlan

Merge request reports

Loading