Skip to content

Commit

Permalink
fix: align with pm suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
achoimet committed Nov 14, 2024
1 parent b1af633 commit 5ad4600
Show file tree
Hide file tree
Showing 14 changed files with 31 additions and 31 deletions.
6 changes: 3 additions & 3 deletions extkafka/alter_limit_connection_create_rate.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ func (k *AlterLimitConnectionCreateRateAttack) NewEmptyState() AlterLimitConnect
func (k *AlterLimitConnectionCreateRateAttack) Describe() action_kit_api.ActionDescription {
return action_kit_api.ActionDescription{
Id: fmt.Sprintf("%s.limit-connection-create", kafkaBrokerTargetId),
Label: "Alter Connection Create Rate",
Description: "Change the Connection Create Rate",
Label: "Limit Connection Create Rate",
Description: "Limit the Connection Create Rate",
Version: extbuild.GetSemverVersionStringOrUnknown(),
Icon: extutil.Ptr(kafkaIcon),
TargetSelection: extutil.Ptr(action_kit_api.TargetSelection{
Expand All @@ -51,7 +51,7 @@ func (k *AlterLimitConnectionCreateRateAttack) Describe() action_kit_api.ActionD
},
}),
}),
Technology: extutil.Ptr("Message Queue"),
Technology: extutil.Ptr("Kafka"),
Category: extutil.Ptr("Kafka"),
TimeControl: action_kit_api.TimeControlExternal,
Kind: action_kit_api.Attack,
Expand Down
8 changes: 4 additions & 4 deletions extkafka/alter_max_message_bytes.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ func (k *AlterMessageMaxBytesAttack) NewEmptyState() AlterMessageMaxBytesState {

func (k *AlterMessageMaxBytesAttack) Describe() action_kit_api.ActionDescription {
return action_kit_api.ActionDescription{
Id: fmt.Sprintf("%s.message-max-bytes", kafkaBrokerTargetId),
Label: "Alter Max Bytes Per Message",
Description: "Alter the max bytes allowed per message",
Id: fmt.Sprintf("%s.reduce-message-max-bytes", kafkaBrokerTargetId),
Label: "Reduce Message Batch Size",
Description: "Reduce the max bytes allowed per message",
Version: extbuild.GetSemverVersionStringOrUnknown(),
Icon: extutil.Ptr(kafkaIcon),
TargetSelection: extutil.Ptr(action_kit_api.TargetSelection{
Expand All @@ -51,7 +51,7 @@ func (k *AlterMessageMaxBytesAttack) Describe() action_kit_api.ActionDescription
},
}),
}),
Technology: extutil.Ptr("Message Queue"),
Technology: extutil.Ptr("Kafka"),
Category: extutil.Ptr("Kafka"),
TimeControl: action_kit_api.TimeControlExternal,
Kind: action_kit_api.Attack,
Expand Down
8 changes: 4 additions & 4 deletions extkafka/alter_num_io_threads.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ func (k *AlterNumberIOThreadsAttack) NewEmptyState() AlterNumberIOThreadsState {

func (k *AlterNumberIOThreadsAttack) Describe() action_kit_api.ActionDescription {
return action_kit_api.ActionDescription{
Id: fmt.Sprintf("%s.io-threads", kafkaBrokerTargetId),
Label: "Alter IO Threads Number",
Description: "Alter the number of IO threads",
Id: fmt.Sprintf("%s.limit-io-threads", kafkaBrokerTargetId),
Label: "Limit IO Threads",
Description: "Limit the number of IO threads",
Version: extbuild.GetSemverVersionStringOrUnknown(),
Icon: extutil.Ptr(kafkaIcon),
TargetSelection: extutil.Ptr(action_kit_api.TargetSelection{
Expand All @@ -51,7 +51,7 @@ func (k *AlterNumberIOThreadsAttack) Describe() action_kit_api.ActionDescription
},
}),
}),
Technology: extutil.Ptr("Message Queue"),
Technology: extutil.Ptr("Kafka"),
Category: extutil.Ptr("Kafka"),
TimeControl: action_kit_api.TimeControlExternal,
Kind: action_kit_api.Attack,
Expand Down
8 changes: 4 additions & 4 deletions extkafka/alter_num_network_threads.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ func (k *AlterNumberNetworkThreadsAttack) NewEmptyState() AlterNumberNetworkThre

func (k *AlterNumberNetworkThreadsAttack) Describe() action_kit_api.ActionDescription {
return action_kit_api.ActionDescription{
Id: fmt.Sprintf("%s.network-threads", kafkaBrokerTargetId),
Label: "Alter Network Threads Number",
Description: "Alter the number of network threads",
Id: fmt.Sprintf("%s.limit-network-threads", kafkaBrokerTargetId),
Label: "Limit Network Threads",
Description: "Limit the number of network threads",
Version: extbuild.GetSemverVersionStringOrUnknown(),
Icon: extutil.Ptr(kafkaIcon),
TargetSelection: extutil.Ptr(action_kit_api.TargetSelection{
Expand All @@ -51,7 +51,7 @@ func (k *AlterNumberNetworkThreadsAttack) Describe() action_kit_api.ActionDescri
},
}),
}),
Technology: extutil.Ptr("Message Queue"),
Technology: extutil.Ptr("Kafka"),
Category: extutil.Ptr("Kafka"),
TimeControl: action_kit_api.TimeControlExternal,
Kind: action_kit_api.Attack,
Expand Down
4 changes: 2 additions & 2 deletions extkafka/broker_deny_user.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ func (k *KafkaConsumerDenyAccessAttack) Describe() action_kit_api.ActionDescript
return action_kit_api.ActionDescription{
Id: fmt.Sprintf("%s.deny-access", kafkaConsumerTargetId),
Label: "Deny Access",
Description: "Deny access for one or many consumer groups to all hosts",
Description: "Deny access to a topic for one or many consumer groups on all kafka hosts",
Version: extbuild.GetSemverVersionStringOrUnknown(),
Icon: extutil.Ptr(kafkaIcon),
TargetSelection: extutil.Ptr(action_kit_api.TargetSelection{
Expand All @@ -49,7 +49,7 @@ func (k *KafkaConsumerDenyAccessAttack) Describe() action_kit_api.ActionDescript
},
}),
}),
Technology: extutil.Ptr("Message Queue"),
Technology: extutil.Ptr("Kafka"),
Category: extutil.Ptr("Kafka"),
TimeControl: action_kit_api.TimeControlExternal,
Kind: action_kit_api.Attack,
Expand Down
2 changes: 1 addition & 1 deletion extkafka/check_consumer_group.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ func (m *ConsumerGroupCheckAction) Describe() action_kit_api.ActionDescription {
},
}),
}),
Technology: extutil.Ptr("Message Queue"),
Technology: extutil.Ptr("Kafka"),
Category: extutil.Ptr("Kafka"),
Kind: action_kit_api.Check,
TimeControl: action_kit_api.TimeControlInternal,
Expand Down
2 changes: 1 addition & 1 deletion extkafka/check_consumer_group_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ func TestCheckConsumerGroup_Describe(t *testing.T) {
assert.Equal(t, "Check Consumer State", response.Label)
assert.Equal(t, kafkaConsumerTargetId, response.TargetSelection.TargetType)
assert.Equal(t, fmt.Sprintf("%s.check", kafkaConsumerTargetId), response.Id)
assert.Equal(t, extutil.Ptr("Message Queue"), response.Technology)
assert.Equal(t, extutil.Ptr("Kafka"), response.Technology)
})
}
}
Expand Down
2 changes: 1 addition & 1 deletion extkafka/check_topic_lag_for_consumer.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ func (m *ConsumerGroupLagCheckAction) Describe() action_kit_api.ActionDescriptio
},
}),
}),
Technology: extutil.Ptr("Message Queue"),
Technology: extutil.Ptr("Kafka"),
Category: extutil.Ptr("Kafka"),
Kind: action_kit_api.Check,
TimeControl: action_kit_api.TimeControlInternal,
Expand Down
2 changes: 1 addition & 1 deletion extkafka/check_topic_lag_for_consumer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ func TestCheckTopicLag_Describe(t *testing.T) {
assert.Equal(t, "Check Topic Lag", response.Label)
assert.Equal(t, kafkaConsumerTargetId, response.TargetSelection.TargetType)
assert.Equal(t, fmt.Sprintf("%s.check-lag", kafkaConsumerTargetId), response.Id)
assert.Equal(t, extutil.Ptr("Message Queue"), response.Technology)
assert.Equal(t, extutil.Ptr("Kafka"), response.Technology)
})
}
}
Expand Down
2 changes: 1 addition & 1 deletion extkafka/delete_last_records.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ func (k *DeleteRecordsAttack) Describe() action_kit_api.ActionDescription {
},
}),
}),
Technology: extutil.Ptr("Message Queue"),
Technology: extutil.Ptr("Kafka"),
Category: extutil.Ptr("Kafka"),
TimeControl: action_kit_api.TimeControlInstantaneous,
Kind: action_kit_api.Attack,
Expand Down
2 changes: 1 addition & 1 deletion extkafka/partition_attack_elect_new_leader.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ func (f kafkaBrokerElectNewLeaderAttack) Describe() action_kit_api.ActionDescrip
},
}),
}),
Technology: extutil.Ptr("Message Queue"),
Technology: extutil.Ptr("Kafka"),
Category: extutil.Ptr("Kafka"),
TimeControl: action_kit_api.TimeControlInstantaneous,
Kind: action_kit_api.Attack,
Expand Down
6 changes: 3 additions & 3 deletions extkafka/produceFixAmount.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ func (l *produceMessageActionFixedAmount) NewEmptyState() KafkaBrokerAttackState
func (l *produceMessageActionFixedAmount) Describe() action_kit_api.ActionDescription {
return action_kit_api.ActionDescription{
Id: TargetIDProduceFixedAmount,
Label: "Produce X records",
Description: "Produce a certain amount of kafka messages for a given duration",
Label: "Produce (# of Records)",
Description: "Produce a certain amount of kafka records for a given duration",
Version: extbuild.GetSemverVersionStringOrUnknown(),
Icon: extutil.Ptr(kafkaIcon),
TargetSelection: extutil.Ptr(action_kit_api.TargetSelection{
Expand All @@ -59,7 +59,7 @@ func (l *produceMessageActionFixedAmount) Describe() action_kit_api.ActionDescri
//}),

// Technology for the targets to appear in
Technology: extutil.Ptr("Message Queue"),
Technology: extutil.Ptr("Kafka"),
Category: extutil.Ptr("Kafka"),

// To clarify the purpose of the action:
Expand Down
6 changes: 3 additions & 3 deletions extkafka/producePeriodically.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ func (l *produceMessageActionPeriodically) NewEmptyState() KafkaBrokerAttackStat
func (l *produceMessageActionPeriodically) Describe() action_kit_api.ActionDescription {
return action_kit_api.ActionDescription{
Id: TargetIDProducePeriodically,
Label: "Produce X records per second",
Description: "Produce kafka messages periodically (messages / s)",
Label: "Produce (Records / s)",
Description: "Produce records periodically (records per second)",
Version: extbuild.GetSemverVersionStringOrUnknown(),
Icon: extutil.Ptr(kafkaIcon),
TargetSelection: extutil.Ptr(action_kit_api.TargetSelection{
Expand All @@ -56,7 +56,7 @@ func (l *produceMessageActionPeriodically) Describe() action_kit_api.ActionDescr
// PredefinedWidgetId: "com.steadybit.widget.predefined.HttpCheck",
// },
//}),
Technology: extutil.Ptr("Message Queue"),
Technology: extutil.Ptr("Kafka"),
Category: extutil.Ptr("Kafka"),
// To clarify the purpose of the action:
// Check: Will perform checks on the targets
Expand Down
4 changes: 2 additions & 2 deletions extkafka/producePeriodically_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ func TestNewProduceMessageActionPeriodically_Describe(t *testing.T) {

description := action.Describe()

assert.Equal(t, "Produce X records per second", description.Label)
assert.Equal(t, "Produce kafka messages periodically (messages / s)", description.Description)
assert.Equal(t, "Produce (Records / s)", description.Label)
assert.Equal(t, "Produce records periodically (records per second)", description.Description)
assert.Equal(t, kafkaTopicTargetId, description.TargetSelection.TargetType)
}

Expand Down

0 comments on commit 5ad4600

Please sign in to comment.