Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[system test] [doc] Metrics package #11036

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

see-quick
Copy link
Member

@see-quick see-quick commented Jan 14, 2025

Type of change

  • Enhancement / new feature
  • Refactoring
  • Documentation

Description

This PR adds a system test doc in our metrics package.

Checklist

Please go through this checklist and make sure all applicable tasks have been done

  • Write tests
  • Make sure all tests pass
  • Update documentation

@see-quick see-quick requested a review from a team January 14, 2025 15:24
@see-quick see-quick self-assigned this Jan 14, 2025
Signed-off-by: see-quick <[email protected]>

# Conflicts:
#	systemtest/src/main/java/io/strimzi/systemtest/docs/TestDocsLabels.java
Signed-off-by: see-quick <[email protected]>
Signed-off-by: see-quick <[email protected]>
@see-quick see-quick force-pushed the metrics-system-test-doc branch from 418b3b6 to a0356f4 Compare January 14, 2025 15:27
@see-quick see-quick requested a review from a team January 14, 2025 15:48
@see-quick see-quick added this to the 0.46.0 milestone Jan 14, 2025
Copy link
Contributor

@henryZrncik henryZrncik left a comment

Choose a reason for hiding this comment

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

LGTM just nits thanks!

@ParallelTest
@Tag(ACCEPTANCE)
@TestDoc(
description = @Desc("This test case checks several random metrics exposed by Kafka."),
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
description = @Desc("This test case checks several random metrics exposed by Kafka."),
description = @Desc("This test case checks several metrics exposed by Kafka."),

I think that in this and other description word "random" does not add much value, rather makes me think that metric can actually change its label. Same in all other tests in this suite.

@Step(value = "Check if specific metric is available in collected metrics from KafkaConnect Pods.", expected = "Metric is available with expected value."),
@Step(value = "Collect current metrics from Cluster Operator Pod.", expected = "Cluster Operator metrics are collected."),
@Step(value = "Check that CO metrics contain data about KafkaConnect and KafkaConnector in namespace {@namespaceFirst}.", expected = "CO metrics contain expected data."),
@Step(value = "Check that CO metrics don't contain data about KafkaConnect and KafkaConnector in namespace {@namespaceFirst}.", expected = "CO metrics don't contain expected data."),
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
@Step(value = "Check that CO metrics don't contain data about KafkaConnect and KafkaConnector in namespace {@namespaceFirst}.", expected = "CO metrics don't contain expected data."),
@Step(value = "Check that CO metrics don't contain data about KafkaConnect and KafkaConnector in namespace {@namespaceSecond}.", expected = "CO metrics should not contain any data for given namespace."),

different namespace I think. Also the expected message should indicate that we expect to see nothing.

@TestDoc(
description = @Desc("This test case checks several random metrics exposed by Kafka Connect."),
steps = {
@Step(value = "Deploy KafkaConnect into {@namespaceFirst} with {@Annotations.STRIMZI_IO_USE_CONNECTOR_RESOURCES} set to true.", expected = "KafkaConnect is up and running."),
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
@Step(value = "Deploy KafkaConnect into {@namespaceFirst} with {@Annotations.STRIMZI_IO_USE_CONNECTOR_RESOURCES} set to true.", expected = "KafkaConnect is up and running."),
@Step(value = "Deploy KafkaConnect into {@namespaceFirst}.", expected = "KafkaConnect is up and running."),

IMO STRIMZI_IO_USE_CONNECTOR_RESOURCES set to true doe not add much needed information about test as we set it everywhere where connectors are set.

description = @Desc("This test case checks several metrics exposed by KafkaExporter."),
steps = {
@Step(value = "Create Kafka producer and consumer and exchange some messages.", expected = "Clients successfully exchange the messages."),
@Step(value = "Check if metric kafka_topic_partitions is available in collected metrics from KafkaExporter Pods.", expected = "Metric is available with expected value."),
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
@Step(value = "Check if metric kafka_topic_partitions is available in collected metrics from KafkaExporter Pods.", expected = "Metric is available with expected value."),
@Step(value = "Check if metric kafka_consumergroup_current_offset is available in collected metrics from KafkaExporter Pods.", expected = "Metric is available with expected value."),

different metric is checked here. kafka_topic_partitions is checked in next test.

@TestDoc(
description = @Desc("This test case checks several metrics exposed by KafkaExporter with different from default configuration. Rolling update is performed during the test case to change KafkaExporter configuration."),
steps = {
@Step(value = "Get KafkaExporter run.sh script and check it has configured proper values.", expected = "Script has proper values set."),
Copy link
Contributor

Choose a reason for hiding this comment

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

maybe we should mention that --group.filter and --topic.filter are matching every topic .* As we are mentioning exact changes in 3rd step e.g. expected: Script has proper value set, currently matching all groups and topics.

@TestDoc(
description = @Desc("This test case checks several metrics exposed by KafkaBridge."),
steps = {
@Step(value = "Deploy KafkaBridge into namespaceFirst and ensure KafkaMirrorMaker2 is in Ready state", expected = "KafkaBridge is deployed and KafkaMirrorMaker2 is Ready"),
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
@Step(value = "Deploy KafkaBridge into namespaceFirst and ensure KafkaMirrorMaker2 is in Ready state", expected = "KafkaBridge is deployed and KafkaMirrorMaker2 is Ready"),
@Step(value = "Deploy KafkaBridge into {@namespaceFirst} and ensure KafkaMirrorMaker2 is in Ready state", expected = "KafkaBridge is deployed and KafkaMirrorMaker2 is Ready"),

as in others ?

description = @Desc("This test case checks several metrics exposed by KafkaBridge."),
steps = {
@Step(value = "Deploy KafkaBridge into namespaceFirst and ensure KafkaMirrorMaker2 is in Ready state", expected = "KafkaBridge is deployed and KafkaMirrorMaker2 is Ready"),
@Step(value = "Attach producer and consumer clients to KafkaBridge", expected = "Clients are up and running"),
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
@Step(value = "Attach producer and consumer clients to KafkaBridge", expected = "Clients are up and running"),
@Step(value = "Attach producer and consumer clients to KafkaBridge", expected = "Clients are up and running, continuously producing and pooling messages"),

as it is needed for proper metrics ?

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

Successfully merging this pull request may close these issues.

2 participants