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

[flaky] test/e2e_new.TestKafkaSource* #3438

Closed
creydr opened this issue Oct 26, 2023 · 3 comments
Closed

[flaky] test/e2e_new.TestKafkaSource* #3438

creydr opened this issue Oct 26, 2023 · 3 comments
Labels
auto:flaky kind/bug Categorizes issue or PR as related to a bug. lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale.

Comments

@creydr
Copy link
Contributor

creydr commented Oct 26, 2023

The TestKafkaSource* e2e tests are very flaky and makes CI very unstable, as their kafkasource does not get cleaned up in time.

For example a run of TestKafkaSourceDeletedFromContractConfigMaps

    ...
    feature.go:240: Deleting test-dnqafecr/x-kafka-source-30 of GVR: sources.knative.dev/v1beta1, Resource=kafkasources
    feature.go:254: Resource sources.knative.dev/v1beta1, Resource=kafkasources test-dnqafecr/x-kafka-source-30 still present
    logging.go:85: Resource sources.knative.dev/v1beta1, Resource=kafkasources test-dnqafecr/x-kafka-source-30
        {
          "apiVersion": "sources.knative.dev/v1beta1",
          "kind": "KafkaSource",
          "metadata": {
            "creationTimestamp": "2023-10-26T06:16:36Z",
            "deletionGracePeriodSeconds": 0,
            "deletionTimestamp": "2023-10-26T06:21:24Z",
            "finalizers": [
              "foregroundDeletion"
            ],
            "generation": 2,
            "managedFields": [
              {
                "apiVersion": "sources.knative.dev/v1beta1",
                "fieldsType": "FieldsV1",
                "fieldsV1": {
                  "f:spec": {
                    ".": {},
                    "f:bootstrapServers": {},
                    "f:sink": {
                      ".": {},
                      "f:ref": {
                        ".": {},
                        "f:apiVersion": {},
                        "f:kind": {},
                        "f:name": {},
                        "f:namespace": {}
                      }
                    },
                    "f:topics": {}
                  }
                },
                "manager": "e2e_new.test",
                "operation": "Update",
                "time": "2023-10-26T06:16:36Z"
              },
              {
                "apiVersion": "sources.knative.dev/v1beta1",
                "fieldsType": "FieldsV1",
                "fieldsV1": {
                  "f:metadata": {
                    "f:finalizers": {}
                  }
                },
                "manager": "kafka-controller",
                "operation": "Update",
                "time": "2023-10-26T06:16:36Z"
              },
              {
                "apiVersion": "sources.knative.dev/v1beta1",
                "fieldsType": "FieldsV1",
                "fieldsV1": {
                  "f:status": {
                    ".": {},
                    "f:conditions": {},
                    "f:observedGeneration": {},
                    "f:placements": {},
                    "f:selector": {},
                    "f:sinkUri": {}
                  }
                },
                "manager": "kafka-controller",
                "operation": "Update",
                "subresource": "status",
                "time": "2023-10-26T06:20:03Z"
              }
            ],
            "name": "x-kafka-source-30",
            "namespace": "test-dnqafecr",
            "resourceVersion": "68386",
            "uid": "6084ded1-63b2-4c7e-b0e4-057610737370"
          },
          "spec": {
            "bootstrapServers": [
              "my-cluster-kafka-bootstrap.kafka:9092"
            ],
            "consumerGroup": "knative-kafka-source-adc5600d-2b6d-4fef-8d9a-93f00bbf47ca",
            "consumers": 1,
            "initialOffset": "latest",
            "net": {
              "sasl": {
                "password": {},
                "type": {},
                "user": {}
              },
              "tls": {
                "caCert": {},
                "cert": {},
                "key": {}
              }
            },
            "ordering": "ordered",
            "sink": {
              "ref": {
                "apiVersion": "v1",
                "kind": "Service",
                "name": "sink",
                "namespace": "test-dnqafecr"
              }
            },
            "topics": [
              "topic-paoaveis"
            ]
          },
          "status": {
            "conditions": [
              {
                "lastTransitionTime": "2023-10-26T06:20:03Z",
                "message": "failed to reconcile contract: failed to reconcile egress: failed to resolve subscriber: failed to get object test-dnqafecr/sink: services \"sink\" not found",
                "reason": "ReconcileContract",
                "status": "False",
                "type": "ConsumerGroup"
              },
              {
                "lastTransitionTime": "2023-10-26T06:20:03Z",
                "message": "failed to reconcile contract: failed to reconcile egress: failed to resolve subscriber: failed to get object test-dnqafecr/sink: services \"sink\" not found",
                "reason": "ReconcileContract",
                "status": "False",
                "type": "Ready"
              },
              {
                "lastTransitionTime": "2023-10-26T06:16:38Z",
                "status": "True",
                "type": "SinkProvided"
              }
            ],
            "observedGeneration": 1,
            "placements": [
              {
                "podName": "kafka-source-dispatcher-4",
                "vreplicas": 1
              }
            ],
            "selector": "eventing.knative.dev/source=kafka-source-controller,eventing.knative.dev/sourceName=x-kafka-source-30",
            "sinkUri": "http://sink.test-dnqafecr.svc.cluster.local/"
          }
        }
        Events:
        {
          "metadata": {},
          "items": null
        }
    feature.go:201: failed to wait for resources to be deleted: timed out waiting for the condition
--- FAIL: TestKafkaSourceDeletedFromContractConfigMaps/KafkaSources#01/Teardown/cleanup_resources (465.25s)
FAIL test/e2e_new.TestKafkaSourceDeletedFromContractConfigMaps/KafkaSources#01/Teardown/cleanup_resources (465.25s)
=== RUN   TestKafkaSourceDeletedFromContractConfigMaps/KafkaSources#01/Teardown
--- FAIL: TestKafkaSourceDeletedFromContractConfigMaps/KafkaSources#01/Teardown (0.00s)
FAIL test/e2e_new.TestKafkaSourceDeletedFromContractConfigMaps/KafkaSources#01/Teardown (0.00s)
=== RUN   TestKafkaSourceDeletedFromContractConfigMaps/KafkaSources#01
--- FAIL: TestKafkaSourceDeletedFromContractConfigMaps/KafkaSources#01 (704.20s)
FAIL test/e2e_new.TestKafkaSourceDeletedFromContractConfigMaps/KafkaSources#01 (704.20s)

E.g. in https://prow.knative.dev/view/gs/knative-prow/pr-logs/pull/knative-extensions_eventing-kafka-broker/3398/reconciler-tests_eventing-kafka-broker_main/1717413347420278784

@creydr creydr added kind/bug Categorizes issue or PR as related to a bug. auto:flaky labels Oct 26, 2023
@creydr
Copy link
Contributor Author

creydr commented Oct 26, 2023

/cc @pierDipi @Cali0707

@creydr creydr changed the title [flaky] test/e2e_new.TestKafkaSourceDeletedFromContractConfigMaps [flaky] test/e2e_new.TestKafkaSource* Oct 26, 2023
@creydr
Copy link
Contributor Author

creydr commented Oct 26, 2023

From CI history, it seems this could have come in around #3321.

Copy link
Contributor

This issue is stale because it has been open for 90 days with no
activity. It will automatically close after 30 more days of
inactivity. Reopen the issue with /reopen. Mark the issue as
fresh by adding the comment /remove-lifecycle stale.

@github-actions github-actions bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jan 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto:flaky kind/bug Categorizes issue or PR as related to a bug. lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale.
Projects
None yet
Development

No branches or pull requests

1 participant