-
-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
verify test topics naming convention in the CI (#566)
* add missing checks * fix
- Loading branch information
Showing
5 changed files
with
39 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
#!/usr/bin/env ruby | ||
|
||
# This script verifies that we do not create (except few needed exceptions) test topics that do | ||
# not start with the "it-" prefix which is our standard. | ||
# | ||
# This ensures that we can clearly identify all test topics for removal in case of doing dev work | ||
# on a long-lived Kafka cluster without option to fully reset it. | ||
# | ||
# It also ensures we have one convention that we can follow. | ||
|
||
require 'bundler' | ||
Bundler.setup(:default, :test, :integrations) | ||
require 'rdkafka' | ||
|
||
admin = Rdkafka::Config.new('bootstrap.servers': 'localhost:9092').admin | ||
|
||
invalid = admin | ||
.metadata | ||
.topics | ||
.map { |topic| topic[:topic_name] } | ||
.select { |topic| !topic.start_with?('it-') } | ||
.select { |topic| topic.length <= 6 } | ||
|
||
admin.close | ||
|
||
invalid.each do |invalid_name| | ||
puts "#{invalid_name} does not start with the \"it-\" prefix" | ||
end | ||
|
||
exit invalid.empty? ? 0 : 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,5 +3,5 @@ | |
# WaterDrop library | ||
module WaterDrop | ||
# Current WaterDrop version | ||
VERSION = '2.8.2' | ||
VERSION = '2.8.3' | ||
end |