Skip to content

As a developer, I want to run the integration tests locally and have github actions do itΒ #759

@al-niessner

Description

@al-niessner

Checked for duplicates

No - I haven't checked

πŸ§‘β€πŸ”¬ User Persona(s)

As a registry-api developer, I need the integration test suite to run automatically in GitHub Actions on every PR and push, so that I get immediate, reliable pass/fail feedback without needing a local environment.

Integration tests were previously removed from GitHub Actions because the standard ubuntu-latest runner (7GB RAM) runs out of memory when the full stack (OpenSearch + registry-api + reg-loader + reg-sweepers + Newman) runs together. The root cause is that OpenSearch's JVM is configured with -XX:-UseContainerSupport, which disables container-aware memory sizing and causes the JVM to allocate heap as a fraction of the physical host RAM, exhausting the runner.

Self-hosted runners on AWS are a non-starter due to maintenance burden and availability concerns.

πŸ’ͺ Motivation

  • Developers should be able to validate changes via GitHub Actions before merging, without requiring a local docker-compose environment.
  • Branch matching between registry-api and registry repos should be leveraged so integration tests automatically use the correct version of each component.
  • As the test suite grows, the solution must remain viable β€” memory pressure will only increase over time.

πŸ“– Additional Details

Current failure mode: GitHub Actions runner OOM-kills the OpenSearch container during the integration test run, causing the workflow to hang or fail silently.

Options investigated (see detailed analysis in comments):

  1. Fix JVM + memory limits in docker-compose β€” Replace -XX:-UseContainerSupport with explicit heap bounds (OPENSEARCH_JAVA_OPTS=-Xms512m -Xmx512m) and add container mem_limit. Free, lowest risk, should be tried first.
  2. GitHub larger hosted runners β€” Change runs-on to a 4-core/16GB runner (~$0.16/run). One-line YAML change, works within GitHub Actions natively.
  3. Amazon OpenSearch Serverless (AOSS) β€” Provision a per-run AOSS collection (keyed to GitHub SHA), run tests against it, then tear it down. Offloads OpenSearch memory entirely from the runner. Optimal long-term but requires OIDC auth setup and test harness refactoring (~$0.16/run).
  4. Always-on AWS OpenSearch Service β€” Small persistent domain for CI only (~$25-30/month). Simpler to integrate than AOSS but introduces shared state between concurrent runs.

Acceptance Criteria

Given a developer opens or updates a PR against any branch in registry-api
When the PR is created or a new commit is pushed
Then GitHub Actions automatically triggers the integration test suite
And the pass/fail result is visible as a status check directly on the PR


Given a developer wants to run the same integration tests locally
When they follow the documented local testing steps using docker-compose from the registry repo
Then the tests execute successfully using branch-matched images of registry-api and registry


Given the integration test suite grows over time
When new tests are added
Then the CI solution continues to function without requiring runner memory increases or architectural rework (i.e., the solution scales with a growing test suite)

βš™οΈ Engineering Details

Recommended implementation path:

  1. First, attempt Option 1 (JVM/memory limits in docker-compose in the registry repo) β€” zero cost, may fully resolve the issue.
  2. If Option 1 is insufficient, implement Option 2 (GitHub larger runner) as a fast follow β€” single-line change in the workflow.
  3. Track Option 3 (AOSS) as the long-term target if test suite memory footprint continues to grow.

The workflow should live in this repo (.github/workflows/) and invoke the integration test profile from the registry repo docker-compose, using branch-matching logic to select the correct registry-api image.

πŸŽ‰ I&T

No response

Metadata

Metadata

Assignees

No fields configured for Feature.

Projects

Status
ToDo
Status
Todo

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions