Skip to content

Make acceptance CI test matrix parallel#5295

Open
kswap wants to merge 48 commits into
mainfrom
acceptance-test-crd-install-flag
Open

Make acceptance CI test matrix parallel#5295
kswap wants to merge 48 commits into
mainfrom
acceptance-test-crd-install-flag

Conversation

@kswap
Copy link
Copy Markdown
Contributor

@kswap kswap commented May 7, 2026

Changes proposed in this PR

Core feature

  • Added --crd-install-flag support to the acceptance test framework and TerminatingGateway types.

CI: Test matrix parallelization

  • Rewrote matrix generator (Python → Go) with run-filter support, enabling individual Test* functions to run on independent parallel runners.
  • Split 9 monolithic table-driven tests into top-level functions across partitions, connect-lifecycle, config-entries, sameness, consul-dns, connect, peering, terminating-gateway, and wan-federation.
  • Added num-clusters declarations for partitions, peering, wan-federation, and api-gateway to skip unnecessary cluster creation on CNI runners.
  • Moved API gateway external server tests to a new dedicated api-gateway-external package.

CI: Reliability fixes

  • Port-forward reconnect: TCP readiness probe prevents ECONNREFUSED races after tunnel restart.
  • Vault auth: retry loop waiting for K8s 1.24+ async ServiceAccount token population, fixing TestVault_Partitions flake.
  • Config-entries: bumped controller reconciliation retry from 5s to 60s, fixing tproxy flake.

How I've tested this PR

How I expect reviewers to test this PR

Checklist

PCI review checklist

  • I have documented a clear reason for, and description of, the change I am making.

  • If applicable, I've documented a plan to revert these changes if they require more than reverting the pull request.

  • If applicable, I've documented the impact of any changes to security controls.

    Examples of changes to security controls include using new access control methods, adding or removing logging pipelines, etc.

@kswap kswap requested review from a team as code owners May 7, 2026 09:14
@kswap kswap added pr/no-changelog PR does not need a corresponding .changelog entry pr/no-backport signals that a PR will not contain a backport label labels May 7, 2026
Comment thread .github/workflows/pr.yml
workflow: test.yml
repo: hashicorp/consul-k8s-workflows
ref: main
ref: acceptance-test-crd-parallel
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this changed from main branch to acceptance-test-crd-install-flag branch ?

Copy link
Copy Markdown
Contributor Author

@kswap kswap May 18, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is done to test with the consul-k8s-workflows branch temporarily which hass dependent changes

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i hope this will be changed to main after workflows are merged to main in k8s-workflows ?

@kswap
Copy link
Copy Markdown
Contributor Author

kswap commented May 17, 2026

/rerun

@kswap kswap changed the title Acceptance test crd install flag Make acceptance CI test matrix parallel May 18, 2026
kswap added 23 commits May 20, 2026 11:28
Splits 7 monolithic table-driven acceptance tests (38 cases total) into
individual top-level Test* functions so each gets its own dedicated CI
runner via the existing bin-packing sharding system. Drops the test
ceiling from 55 min (TestPartitions_Connect, 6 cases) to ~11 min
(TestWANFederationFailover per case). Updates test-timings.json with
per-case estimates so the matrix generator can bin-pack correctly from
the first run.
kswap added 21 commits May 20, 2026 11:30
…ortServices (4 cases); add num-clusters:2 for partitions
@kswap kswap force-pushed the acceptance-test-crd-install-flag branch from 7b3ed94 to ade0809 Compare May 20, 2026 06:01
Copy link
Copy Markdown
Contributor

@anandmukul93 anandmukul93 May 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why was there a need to modify these files so much ? what benefit have we gotten with exposing test type to each test case now ? can we retry at case level or still package level only ? if not so why to make so many changes to the file.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i believe this is part of ci workflows . then it could be in .github/scripts folder rather than build-support in control-plane.

}
}

discovered := discoverTests(repoRoot, pkg)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rename variables sensibly . suggested discoveredTestsInPackage.

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

Labels

pr/no-backport signals that a PR will not contain a backport label pr/no-changelog PR does not need a corresponding .changelog entry

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants