Skip to content

[ST] Enable AuthST, fix several tests, performance improvements - #2776

Open
jankalinic wants to merge 13 commits into
streamshub:mainfrom
jankalinic:enable-fixed-auth-sts
Open

[ST] Enable AuthST, fix several tests, performance improvements#2776
jankalinic wants to merge 13 commits into
streamshub:mainfrom
jankalinic:enable-fixed-auth-sts

Conversation

@jankalinic

Copy link
Copy Markdown
Contributor

No description provided.

@jankalinic jankalinic self-assigned this Jul 16, 2026
@jankalinic
jankalinic requested a review from MikeEdgar July 16, 2026 17:16
@jankalinic
jankalinic marked this pull request as ready for review July 16, 2026 17:16
@jankalinic
jankalinic force-pushed the enable-fixed-auth-sts branch from e535e24 to a81c0fa Compare July 20, 2026 08:22
@jankalinic

Copy link
Copy Markdown
Contributor Author

/systemtests run --help

@streamshub-bot

Copy link
Copy Markdown

ℹ️ Systemtests Help ℹ️

You can run system tests with the following parameters:

  • --testcase=<name> (optional): Run a specific test case. Use Maven style, e.g. [TopicST | KafkaST#testKafkaTwo...]
  • --profile=<profile> (optional): Profile to use, e.g. [regression]
  • --env=<VAR1=val1;VAR2=val2> (optional): Set environment variables for the test
  • --install-type=<olm|yaml> (optional): Choose installation type. Default is [olm]
  • --retry-count=<number> (optional): Number of Maven retries. Default is [0]
  • --help: Show this help message

Note: Use either --testcase or --profile to select tests to run, setting both will result in
github actions prioritizing testcase over profile. If neither is provided, no systemtest will start.

Example usage:

/systemtests run --profile=regression --env=MY_ENV=one;SECOND=two
/systemtests run --testcase=TopicST --install-type=olm --retry-count=3

@jankalinic

Copy link
Copy Markdown
Contributor Author

/systemtests run --testcase=AuthST --install-type=olm --retry-count=2

@jankalinic
jankalinic force-pushed the enable-fixed-auth-sts branch 2 times, most recently from c2a999a to ff51014 Compare July 29, 2026 11:06
@jankalinic

Copy link
Copy Markdown
Contributor Author

/systemtests run --testcase=AuthST --install-type=olm --retry-count=2

1 similar comment
@jankalinic

Copy link
Copy Markdown
Contributor Author

/systemtests run --testcase=AuthST --install-type=olm --retry-count=2

@MikeEdgar

Copy link
Copy Markdown
Member

@jankalinic I'm looking into this. I may expand the scope to make sure all of the tests are running OK.

@jankalinic

Copy link
Copy Markdown
Contributor Author

Thank you @MikeEdgar. Feel free to modify or decide the future of this PR.

jankalinic and others added 9 commits August 20, 2026 14:19
Signed-off-by: jkalinic <jkalinic@redhat.com>
Signed-off-by: jkalinic <jkalinic@redhat.com>
Signed-off-by: Michael Edgar <medgar@redhat.com>
Signed-off-by: Michael Edgar <medgar@redhat.com>
Signed-off-by: Michael Edgar <medgar@redhat.com>
Signed-off-by: Michael Edgar <medgar@redhat.com>
Signed-off-by: Michael Edgar <medgar@redhat.com>
Signed-off-by: Michael Edgar <medgar@redhat.com>
Signed-off-by: Michael Edgar <medgar@redhat.com>
@MikeEdgar
MikeEdgar force-pushed the enable-fixed-auth-sts branch from ff51014 to b378bd5 Compare August 20, 2026 18:19
@MikeEdgar MikeEdgar changed the title [ST] Enable authst checks after fix [ST] Enable AuthST, fix several tests, performance improvements Aug 20, 2026
--driver=${MINIKUBE_DRIVER:-kvm2} \
--cpus=${MINIKUBE_CPU_COUNT:-6} \
--memory=${MINIKUBE_MEMORY:-16384} \
--disk-size=${MINIKUBE_DISK_SIZE:-50g} \

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The default disk allocation in minikube is insufficient for the Kafka Connect image build process.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This change has no effect in GitHub actions, but is useful for local testing.

Comment on lines +94 to +98
if (method.trySetAccessible()) {
method.invoke(testMethodContext.getRequiredTestInstance());
} else {
throw new IllegalStateException("Unable to access @SetupTestBucket method " + method);
}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This allows us to keep the test classes as package-private (JUnit best practice) with minimal fuss.

.setName(STDOUT)
.setLayout(PatternLayout.newBuilder()
.withPattern("%d{yyyy-MM-dd HH:mm:ss}{GMT} [%thread] %highlight{%-5p} [%c{1}:%L] %m%n")
.setPattern("%d{yyyy-MM-dd HH:mm:ss}{GMT} [%thread] %highlight{%-5p} [%c{1}:%L] %m%n")

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

These with methods are deprecated in favor of the set equivalents.

maybeCreateCatalogSource();

String newVersion = Environment.getConsoleOperatorVersion();
String newVersion = Environment.getConsoleOperatorVersion(String::toLowerCase);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The version from the POM needs to be lower-cased for the OLM upgrade where the images and OLM artifacts use lowercase -snapshot as the suffix.

}

private static KafkaClients buildClients(String namespace, String kafkaName, String kafkaUser, String topicName, int messageCount) {
return new KafkaClientsBuilder()

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think we can (over time) migrate the KafkaClients and Strimzi kafka client image Jobs to just use the Kafka Admin, Consumer, and Producer clients instead. It's significantly faster and minimizes the number of moving parts in the tests.

}
}

public static CompletableFuture<Void> runAsyncWithContext(Runnable runnable) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

These methods allow us to run more of the test setup concurrently on worker threads while using the same test context. The Kubetest4j libraries relies on ThreadLocal a lot, so copying the context across threads is necessary.

clusterName,
KafkaNamingUtils.kafkaUserName(clusterName),
Admin::create)) {
Wait.until("Groups deleted", 2_000, 120_000, () -> {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This long timeout is needed because the test clients Job appears to not call close on consumers. Only after a timeout does Kafka transition the groups from Stable to Empty, required for deletion. This won't be needed if/when we migrated to just using Producers/Consumers in-process.

@MikeEdgar

Copy link
Copy Markdown
Member

/systemtests run --install-type=olm

Signed-off-by: Michael Edgar <medgar@redhat.com>
Signed-off-by: Michael Edgar <medgar@redhat.com>
Comment on lines +234 to +235
LOGGER.info("CONNECT_DEPLOY_CONCURRENT is false, deploying {} and {} sequentially", KAFKA_CONNECT_SRC_NAME, KAFKA_CONNECT_SINK_NAME);
connect = srcConn.thenComposeAsync(runComposableAsyncWithContext(deployConnectSink));

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Apparently, GitHub runners do not have enough disk space for the concurrent connect image builds.

consoleOperatorSetup.setInstallConfig(olmConfig);
LOGGER.info("Installing Console Operator via OLM into namespace '{}'", Constants.CO_NAMESPACE);
consoleOperatorSetup.install(false);
consoleOperatorSetup.install(true);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

When this test runs with other test classes, any previously-installed operator needs to be removed first, false -> true

});
}

public static String getClusterDomain() {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This reworks cluster domain lookup now respects CONSOLE_CLUSTER_DOMAIN primarily, then if not set it will derive from the OCP base domain as before (if OpenShift), or try to use the Kubernetes master URL's IP address to construct a .nip.io domain. This should help in local environments where, for example, minikube's IP is changing each time the cluster is created.

@MikeEdgar

Copy link
Copy Markdown
Member

/systemtests run --install-type=olm

Signed-off-by: Michael Edgar <medgar@redhat.com>
Signed-off-by: Michael Edgar <medgar@redhat.com>
@MikeEdgar

Copy link
Copy Markdown
Member

/systemtests run --install-type=olm

@sonarqubecloud

Copy link
Copy Markdown

@streamshub-bot

Copy link
Copy Markdown

✅ Systemtests run finished - success ✅

Test Summary:

  • TOTAL: 43
  • PASS: 38
  • FAIL: 0
  • SKIP: 5

Used parameters:

  • TEST_CASE:
  • PROFILE:
  • INSTALL_TYPE: olm
  • RETRY_COUNT: 0
  • ENVS:

@MikeEdgar

Copy link
Copy Markdown
Member

@jankalinic please take a look next week and let me know if I've done anything objectionable with this. Aside from make some of the tests pass, this PR now has some performance improvements and a start to migrating away from the kafka clients jobs to just using the Kafka clients directly.

@MikeEdgar MikeEdgar added this to the 0.14.0 milestone Aug 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants