Skip to content

fix(ci): the full Feature tests on main take more than 6 minutes #48

Done

Description

@dan-petty

Problem

A run of .github/workflows/test-all.yaml takes more than 6 minutes on average. The target of a CI check is 5 minutes, with a tolerance of 1 minute. The job test runs the generated test, all scenarios and the duplicate test of a Feature in one step, one after the other.

#44 and #47 change only .github/workflows/test-pr.yaml.

Evidence

The last 10 completed runs on 2026-11-30 and before, on push and on schedule. The run time is from the first job start to the last job end.

Run Run time Longest job
46484901394 413 s 334 s
46480078627 367 s 351 s
46476650348 356 s 348 s
46468805962 363 s 354 s
46359319627 387 s 373 s
46118091159 402 s 392 s
46092621516 354 s 347 s
46047447168 355 s 347 s
45996057229 365 s 357 s
45940113957 409 s 398 s
  • The mean run time is 377 s.
  • In each run, the longest job is a test job.

Expected

  • The mean run time of test-all.yaml is 6 minutes or less.
  • Each test of the job test still runs.

Existing tool

The matrix of GitHub Actions can divide the scenarios between jobs. #47 does this in test-pr.yaml with a jq filter on scenarios.json.

Source

Source: #47

Proposed design

Problem statement

A run of .github/workflows/test-all.yaml takes 377 s on average. The target is 360 s. The test job runs the generated test, all scenarios and the duplicate test in one step for each Feature. The longest job is a test job. The change divides the scenarios between jobs with the GitHub Actions matrix. .github/workflows/test-pr.yaml already does this with a jq filter on scenarios.json.

Acceptance criteria

Requirement: The test job skips the scenarios

The test job in .github/workflows/test-all.yaml SHALL pass --skip-scenarios to npx devcontainer features test.

Scenario: Actionlint accepts the workflow

  • WHEN uv run devops ci --check --only actionlint,zizmor runs on the change
  • THEN The command exits 0 and actionlint reports no error for .github/workflows/test-all.yaml.

Requirement: The test-scenarios job divides the scenarios

The .github/workflows/test-all.yaml workflow SHALL define a test-scenarios job that keeps one shard of scenarios.json with the jq filter from .github/workflows/test-pr.yaml.

Scenario: Actionlint accepts the workflow

  • WHEN uv run devops ci --check --only actionlint,zizmor runs on the change
  • THEN The command exits 0 and actionlint reports no error for .github/workflows/test-all.yaml.

Requirement: Each test of the test job still runs

The test job and the test-scenarios job SHALL together run the generated test, the scenarios and the duplicate test of each Feature.

Scenario: Actionlint accepts the workflow

  • WHEN uv run devops ci --check --only actionlint,zizmor runs on the change
  • THEN The command exits 0 and actionlint reports no error for .github/workflows/test-all.yaml.

Requirement: Pending a person after the merge

The mean run time of .github/workflows/test-all.yaml SHALL be 360 seconds or less.

Scenario: A person checks the next 10 runs on main

  • WHEN A person checks the run time of the next 10 completed runs of test-all.yaml on main after the merge
  • THEN The mean run time is 360 seconds or less.

Existing Tool Considered

No alternatives check has run. GitHub Actions matrix strategy covers the need. It runs one job for each shard. .github/workflows/test-pr.yaml already divides the scenarios with a jq filter on scenarios.json. The tool lacks a built-in way to split a JSON file. The workflow uses jq to keep one shard.

Key questions

  • How many shards divide the scenarios of each Feature?: Two shards, [0, 1]. (best practice) [sources: .github/workflows/test-pr.yaml]
    • Chosen: Two shards. .github/workflows/test-pr.yaml uses two shards for the same scenarios. Two shards halve the scenario time and should meet the 360 s target.
    • Rejected: Four shards. It reduces the scenario time more. It doubles the number of jobs and the runner cost.
    • Rejected: One shard. It does not reduce the time of the longest job.
  • Which job runs the scenarios after the change?: A new test-scenarios job runs the scenarios. The test job runs the generated test and the duplicate test with --skip-scenarios. (best practice) [sources: .github/workflows/test-pr.yaml, .github/workflows/test-all.yaml]
    • Chosen: Add a test-scenarios job and keep test for the generated and duplicate tests. It mirrors .github/workflows/test-pr.yaml. Each test still runs, and the scenario time divides.
    • Rejected: Split only the generated test from the scenarios inside the test job. A matrix job runs one combination per job. The scenarios need their own matrix over shards.
  • Does the test-scenarios job start the Podman API services for podman-outside-podman?: Yes. The job starts the services before the scenarios, as the test job does. [sources: .github/workflows/test-all.yaml, .github/workflows/test-pr.yaml]

Fit

Fits in one pull request.

Suspected block

None.

Dependencies

None.

Activity

  1. dan-petty commented on Nov 30, 2026

    @dan-petty
    OwnerAuthor
    • Priority: CI run time exceeds the 5-minute target plus 1-minute tolerance, causing performance degradation.
  2. added
    priority/p1-high
    type/bug
    source/agent
    scope/ci
    status/new
    value/medium
    effort/medium
    on Nov 30, 2026
  3. devops-cli-service commented on Nov 30, 2026

    @devops-cli-service
    Contributor

    Next step: the alternatives check records a verdict. See the section Proposed design of the body.

  4. added
    status/in-progress
    status/in-review
    and removed
    status/new
    status/in-progress
    on Nov 30, 2026
  5. removed
    status/in-review
    on Nov 30, 2026
  6. dan-petty commented on Nov 30, 2026

    @dan-petty
    OwnerAuthor

    Run times of test-all.yaml after #52, from the first job start to the last job end. The target is 360 s at most.

    Run Commit Result Run time
    46513384731 9aa0a26 (branch) passed 281 s
    46514483862 9aa0a26 (branch) passed 226 s
    46516904533 c25580f (main) failed 211 s
    46517761681 c25580f (main) passed 246 s

    The mean of the three runs that passed is 251 s. The failed run had one failed job: a download in a third-party Feature gave no checksum (#53).

    The target is for the mean of the runs on main. This table has one run on main that passed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    effort/mediumpriority/p1-highscope/cisource/agenttype/bugvalue/medium

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions