Skip to content
This repository has been archived by the owner on Sep 2, 2024. It is now read-only.

Run KafkaSource smokes in upgrade test #524

Conversation

cardil
Copy link
Contributor

@cardil cardil commented Apr 8, 2021

Partially resolves #67

Proposed Changes

  • Run pre, post smoke tests for KafkaSource on upgrade tests

Continual tests will follow to fully resolve #67

@cardil cardil requested review from a team as code owners April 8, 2021 14:56
@cardil cardil requested a review from a user April 8, 2021 14:56
@knative-prow-robot knative-prow-robot added the size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. label Apr 8, 2021
@google-cla google-cla bot added the cla: yes Indicates the PR's author has signed the CLA. label Apr 8, 2021
@cardil cardil force-pushed the feature/kafka-source-upgrade-tests-p1 branch from 85af36a to 2fae962 Compare April 8, 2021 15:00
@codecov
Copy link

codecov bot commented Apr 8, 2021

Codecov Report

Merging #524 (5302956) into main (bc84841) will decrease coverage by 0.01%.
The diff coverage is 40.90%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #524      +/-   ##
==========================================
- Coverage   72.87%   72.86%   -0.02%     
==========================================
  Files         147      147              
  Lines        5825     5856      +31     
==========================================
+ Hits         4245     4267      +22     
- Misses       1335     1344       +9     
  Partials      245      245              
Impacted Files Coverage Δ
test/upgrade/smoke.go 0.00% <0.00%> (ø)
test/upgrade/continual.go 16.27% <33.33%> (+2.76%) ⬆️
test/upgrade/postdowngrade.go 33.33% <33.33%> (ø)
test/upgrade/postupgrade.go 33.33% <33.33%> (ø)
test/upgrade/preupgrade.go 33.33% <33.33%> (ø)
test/upgrade/suite.go 100.00% <100.00%> (ø)
.../channel/distributed/receiver/producer/producer.go 69.23% <0.00%> (-0.34%) ⬇️
pkg/source/mtadapter/adapter.go 70.45% <0.00%> (+0.33%) ⬆️
...el/distributed/dispatcher/dispatcher/dispatcher.go 74.64% <0.00%> (+0.36%) ⬆️
pkg/source/adapter/adapter.go 60.49% <0.00%> (+1.51%) ⬆️
... and 1 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update bc84841...5302956. Read the comment docs.

Comment on lines -1 to +2
//+build e2e mtsource
//+build source
// +build e2e
// +build source mtsource
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think this is more correct.

It means: e2e AND (source OR mtsource).

Previous have meant: (e2e or mtsource) AND source, which is weird.

@@ -315,12 +315,40 @@ function install_consolidated_channel_crds {
wait_until_pods_running "${SYSTEM_NAMESPACE}"
}

function install_released_consolidated_source {
Copy link
Contributor

Choose a reason for hiding this comment

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

I would remove consolidated. Just install_released_source.

I suppose the upgrade tests are black-box tests, in which case they can also run against the multi-tenant source variant.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The function name contained consolidated word before, that's why I didn't remove it.

That's right those tests should be a black box, but I believe future conditional logic should be in golang in installation package rather than bash scripts.

Copy link
Contributor

Choose a reason for hiding this comment

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

My two cents: After reading install_released_consolidated_source my first question is - what "source" ? It could be "source code". Maybe we could say install_released_event_source instead.

Copy link
Contributor

@mgencur mgencur left a comment

Choose a reason for hiding this comment

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

Looks very good! Just a few comments here and there

@@ -315,12 +315,40 @@ function install_consolidated_channel_crds {
wait_until_pods_running "${SYSTEM_NAMESPACE}"
}

function install_released_consolidated_source {
Copy link
Contributor

Choose a reason for hiding this comment

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

My two cents: After reading install_released_consolidated_source my first question is - what "source" ? It could be "source code". Maybe we could say install_released_event_source instead.

test/e2e/kafka_source.go Outdated Show resolved Hide resolved
// well.
func SourceContinualTest() pkgupgrade.BackgroundOperation {
setup := func(c pkgupgrade.Context) {
// TODO: not yet implemented
Copy link
Contributor

Choose a reason for hiding this comment

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

I suppose this comment is redundant? Same for the comment a few lines below

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'd leave it be. The // TODO: is reported by IDE and other dev tools. Warn log is useful on logs. That's why it's repeated.

@@ -28,3 +28,11 @@ func ChannelPostDowngradeTest() pkgupgrade.Operation {
runChannelSmokeTest(c.T)
})
}

// SourcePostDowngradeTest tests source operations after downgrade.
func SourcePostDowngradeTest() pkgupgrade.Operation {
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't know but does it make sense to rename all these functions to have the Event prefix?
E.g. EventSourceDowngradeTest

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This repo contains Kafka things. KafkaSource and KafkaChannel. I'm shorting Kafka, but not only I. That naming was already in this repo before. Let's not create new names like enentsource.

Copy link
Contributor

Choose a reason for hiding this comment

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

It looks like these two (Source and KafkaSource) are totally mixed in function names in this repo. E.g. runSourceSmokeTest vs. AssureKafkaSourceIsOperational vs. testKafkaSource vs. SourcePostDowngradeTest
That's a cosmetic thing, having just "Source" is a bit more misleading to me. Nevermind

@aliok
Copy link
Member

aliok commented Apr 9, 2021

Looks very good to me :)
Thanks!

Leaving the merge to @mgencur

Co-authored-by: Martin Gencur <[email protected]>
@aliok
Copy link
Member

aliok commented Apr 9, 2021

/approve

@knative-prow-robot knative-prow-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Apr 9, 2021
@mgencur
Copy link
Contributor

mgencur commented Apr 9, 2021

/retest

@mgencur
Copy link
Contributor

mgencur commented Apr 9, 2021

/lgtm

@knative-prow-robot knative-prow-robot added the lgtm Indicates that a PR is ready to be merged. label Apr 9, 2021
@cardil
Copy link
Contributor Author

cardil commented Apr 9, 2021

/retest

@cardil
Copy link
Contributor Author

cardil commented Apr 9, 2021

/woof

@knative-prow-robot
Copy link
Contributor

@cardil: dog image

In response to this:

/woof

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@cardil
Copy link
Contributor Author

cardil commented Apr 9, 2021

/joke

@knative-prow-robot
Copy link
Contributor

@cardil: What concert costs only 45 cents? 50 cent featuring Nickelback.

In response to this:

/joke

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@cardil
Copy link
Contributor Author

cardil commented Apr 9, 2021

/retest

@mgencur
Copy link
Contributor

mgencur commented Apr 9, 2021

/test all

Copy link
Member

@aliok aliok left a comment

Choose a reason for hiding this comment

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

/lgtm
/approve

@knative-prow-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: aliok

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@knative-prow-robot knative-prow-robot merged commit 148b944 into knative-extensions:main Apr 9, 2021
@cardil cardil deleted the feature/kafka-source-upgrade-tests-p1 branch April 9, 2021 12:10
cardil added a commit to cardil/knative-eventing-kafka that referenced this pull request Apr 9, 2021
* Run KafkaSource smokes in upgrade test
* Fixing unit tests
* Restore upgrade tests tags
* Fix codegen
* Reformat README.md
* Golangci Link fix
* Simplify godoc SourceTestScope

Conflicts fixed:

 * test/e2e-common.sh
 * test/e2e/kafka_source_test.go
openshift-merge-robot pushed a commit to openshift-knative/eventing-kafka that referenced this pull request Apr 9, 2021
* Run KafkaSource smokes in upgrade test
* Fixing unit tests
* Restore upgrade tests tags
* Fix codegen
* Reformat README.md
* Golangci Link fix
* Simplify godoc SourceTestScope

Conflicts fixed:

 * test/e2e-common.sh
 * test/e2e/kafka_source_test.go
cardil added a commit to cardil/knative-eventing-kafka that referenced this pull request Apr 12, 2021
…tensions#524)

Run KafkaSource smokes in upgrade test (knative-extensions#524)

* Run KafkaSource smokes in upgrade test
* Fixing unit tests
* Restore upgrade tests tags
* Fix codegen
* Reformat README.md
* Golangci Link fix
* Simplify godoc SourceTestScope

Conflicts fixed:

 * test/e2e-common.sh
cardil added a commit to cardil/knative-eventing-kafka that referenced this pull request Apr 12, 2021
* Run KafkaSource smokes in upgrade test

* Fixing unit tests

* Restore upgrade tests tags

* Fix codegen

* Reformat README.md

* Golangci Link fix

* Simplify godoc SourceTestScope

Co-authored-by: Martin Gencur <[email protected]>

Co-authored-by: Martin Gencur <[email protected]>
openshift-merge-robot referenced this pull request in openshift-knative/eventing-kafka Apr 13, 2021
* Run KafkaSource smokes in upgrade test

* Fixing unit tests

* Restore upgrade tests tags

* Fix codegen

* Reformat README.md

* Golangci Link fix

* Simplify godoc SourceTestScope

Co-authored-by: Martin Gencur <[email protected]>

Co-authored-by: Martin Gencur <[email protected]>

Co-authored-by: Martin Gencur <[email protected]>
openshift-merge-robot pushed a commit to openshift-knative/eventing-kafka that referenced this pull request Apr 13, 2021
…tensions#524) (#150)

Run KafkaSource smokes in upgrade test (knative-extensions#524)

* Run KafkaSource smokes in upgrade test
* Fixing unit tests
* Restore upgrade tests tags
* Fix codegen
* Reformat README.md
* Golangci Link fix
* Simplify godoc SourceTestScope

Conflicts fixed:

 * test/e2e-common.sh
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cla: yes Indicates the PR's author has signed the CLA. lgtm Indicates that a PR is ready to be merged. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Upgrade tests for KafkaSource
5 participants