[ST] Replace builders for internal clients with the ones from test-clients repository#12640
[ST] Replace builders for internal clients with the ones from test-clients repository#12640im-konge wants to merge 4 commits intostrimzi:mainfrom
test-clients repository#12640Conversation
… ones from test-clients repository Signed-off-by: Lukas Kral <[email protected]>
9eb907d to
634fa42
Compare
Signed-off-by: Lukas Kral <[email protected]>
634fa42 to
f143023
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #12640 +/- ##
============================================
- Coverage 75.09% 75.07% -0.02%
- Complexity 6511 6512 +1
============================================
Files 376 376
Lines 25083 25083
Branches 3270 3271 +1
============================================
- Hits 18835 18831 -4
- Misses 4905 4908 +3
- Partials 1343 1344 +1 🚀 New features to boost your workflow:
|
|
/gha run pipeline=regression,upgrade |
|
⏳ System test verification started: link The following 10 job(s) will be executed:
Tests will start after successful build completion. |
|
❌ System test verification failed: link |
…unused stuff Signed-off-by: Lukas Kral <[email protected]>
|
/gha run pipeline=regression,upgrade |
|
⏳ System test verification started: link The following 10 job(s) will be executed:
Tests will start after successful build completion. |
|
🎉 System test verification passed: link |
Signed-off-by: Lukas Kral <[email protected]>
Frawless
left a comment
There was a problem hiding this comment.
Overall I am fine with that. I am just thinking about the naming. I know it will require also change on test-clients side, but maybe that's something we could discuss.
KafkaConsumerClient
KafkaProducerClient
KafkaProducerConsumer
KafkaAdminClient
Shouldn't it be KafkaProducerConsumerClient ? Or Just KafkaClients ? But it would mean we will need to add admin client into as well? Same for Http client. Or should we pick something like StrimziTestClient and have method to return producer, consumer, etc. ? Wdyt @see-quick @kornys
TBH, I had PR in test-clients repo that added these builders, they looked fine. I don't think that you need to have Admin and Streams clients in all the tests, that's why I created I picked But that's my opinion. And because it's public package, I would pick something that would make sense for long time and we will not change it again in few months, because it's named differently, so it confuses the user of the builders what it actually contains. |
You mean in consistency between those names that KafkaProducerConsumer doesn't have suffix
This would also imply that inside we have also streams, admin client ... not I think that is misleading as already pointed out by Lukas.
I think that's unnecessary. In the past, we had also clients defined this way as well (i.e., KafkaProducerJob, KafkaConsumerJob, KafkaAdminJob, KafkaProducerConsumerJob) as that ultimately tell you it produces Kubernetes Job and it tells you directly it is not like Apache Kafka clients. I don't know why we went different way (maybe I forgot something so sorry :D). But then we decide to go into KafkaClients and now we are going KafkaConsumerProducer ... Anyway I am fine with current naming as it clearly states WHAT it is used in the tests and doesn't hide any important stuff. In terms of readability its clearly way forward. |
|
@Frawless @see-quick so what are we going to do with this? I'm for keeping it as it is, @see-quick looks like it as well. I'm not sure if there is someone else being +1 for renaming the builders. |
Feel free to keep it as it is. I can live with it. |
Type of change
Description
This PR changes the builders we used in STs until now with builders directly from the
test-clientsrepository.It should help with more things:
test-clientsdon't have to write their own Jobs or copy the builders from our repositoryBridgeClientsare missing - that was happening quite often some time agoOther than that, it removes the
instantClientsandcontinuousClientsmethods from the tests - again, it was something that was hiding all the configuration and people going through the tests were confused with the configuration of the clients - what is configured, how, what exactly is needed. Having the builders well defined in the tests will make the checks less confusing and more readable - and TBH, it's not that much stuff to maintain, given that we aren't touching the clients stuff that often.Most of the refactoring is just changing from the old builders to new ones (or replacing the
instantandcontinuousmethods with the whole builders), the only main changes are in configuration of authentication, tracing, and Pod Security Profiles - for authentication we have a new classClientsAuthentication, for tracing we have one method inOpenTelemetrySTdirectly, same applies for adding Pod SecurityProfiles to clients' Jobs - that is also directly insidePodSecurityProfilesST.NOTE: Currently I'm using 0.14.0-SNAPSHOT of Test-clients, as I was adding a lot of fixes to the main branch, which are not in the 0.13.0 release. I want to see if there are other changes required before releasing a new version and changing it here.
Checklist