Repository navigation
Conversation
25c0179 to
8b2cfea
Compare
Newer CAPI releases disable the CC V2 API, so the integration tests are split: - V2 tests (@RequiresV2Api, now tagged "v2") run against the pinned capi chart 1.249.0, the last one serving V2, on kind-deployment v0.26.0. - All other tests run against the latest capi chart, resolved at runtime, on a newer kind-deployment with SKIP_V2_TESTS=true. - @IfCloudFoundryVersion compares 2.x versions with the V2 and 3.x versions with the V3 API version of the server, so V3 gates such as PCF_4_v3 no longer get compared with the V2 version. - SUPPORTED_API_VERSION is 2.299.0 (CAPI 1.249.0), SUPPORTED_API_VERSION_V3 is 3.237.0 (CAPI 1.252.0).
8b2cfea to
a89b9eb
Compare
Lokowandtg
left a comment
There was a problem hiding this comment.
For the moment, much v3 code tranistively has a dependency to v2, so I expect failures in v3.
- Treat a 404 from /v2/info as "V2 API not available", so a CAPI that removes the V2 API instead of disabling it doesn't break the test context - Name the annotated element and the server versions in the skip reason of @IfCloudFoundryVersion, now that class-level conditions are evaluated too - Clean up CF users through the V3 API when the V2 tests are skipped - Give the v2 job 150 minutes and the v3 job 60 minutes
|
@Lokowandtg thanks! You're right that a lot of V3-looking code still uses V2 underneath: most of
I pushed a small follow-up commit (a33c2c1): a 404 from |
Newer CAPI releases disable the CC V2 API: from capi chart 1.249.1-1 on, V2 is behind
cloudController.config.temporaryEnableV2(defaultfalse), and kind-deployment main no longer enables it (cloudfoundry/k8s-deployment#540). This splits the integration tests so V3 runs against the latest CAPI while V2 keeps a dedicated version. The 5.x.x counterpart is #1408.Changes
Workflow (
integration-test.yml): the matrix is now Java ×api:6b6882c(v0.26.0 can't deploy charts ≥ 1.249.1-1, their values schema changed)-Dgroups=v2-DexcludedGroups=v2,SKIP_V2_TESTS=trueresolve-capi-version.shis replaced byresolve-latest-capi-chart.sh(anonymous ghcr.io tag listing).Integration tests
@RequiresV2Apialso tags tests with JUnit tagv2(696 of 921 tests, checked with a JUnit discovery run).@IfCloudFoundryVersioncompares 2.x versions with the server's V2 API version and 3.x versions with its V3 API version. Before, all gates were compared with one V2-first version, so a 3.x gate on a test method was compared with the V2 version. With V2 disabled (or/v2/infoanswering 404), the server counts as newer than every 2.x version, as before.@IfCloudFoundryVersionon a test class is now evaluated as well. Before, the rule only looked at the test method, so the 19 class-level gates (e.g.UsersTest,AuditEventsTest,SpacesTest) were never applied. All of them aregreaterThanOrEqualTogates that current servers meet, so no test is skipped because of this. The skip reason now names the annotated element and the server versions.SKIP_V2_TESTS=truethe cleaner also removes CF users (through V3) and networking policies.Client:
SUPPORTED_API_VERSION=2.299.0(CAPI 1.249.0),SUPPORTED_API_VERSION_V3=3.237.0(CAPI 1.252.0).Notes
resolve-latest-capi-chart.shcurrently resolves 1.252.1-1, the pinned version.cloudfoundry-operations,ApplicationUtils,ServiceBrokerUtils) are@RequiresV2Apiand run in the v2 job.PoliciesTestandTagsTestcreated their apps through V2 and now use V3.SKIP_V2_TESTS=truemost resources (orgs, spaces, quotas, domains, routes, security groups, ...) are still only cleaned up through V2, so a run against a long-lived CF leaves them behind. CI uses a fresh KinD cluster per job, so this doesn't affect it.Testing
./mvnw -Pintegration-test -DskipTests spotless:check installpasses.FeatureFlagsV3Test.updateMessage) also flakes on main and is fixed in fix: Restore the feature flag in FeatureFlagsV3Test without blocking #1418.