Skip to content

add msk probes and actions#148

Merged
Lawouach merged 5 commits intochaostoolkit-incubator:masterfrom
jitapichab:feature/msk
Jun 10, 2024
Merged

add msk probes and actions#148
Lawouach merged 5 commits intochaostoolkit-incubator:masterfrom
jitapichab:feature/msk

Conversation

@jitapichab
Copy link
Copy Markdown
Contributor

@jitapichab jitapichab commented May 30, 2024

This pull request introduces new functionalities for the Chaos Toolkit AWS extension to support Amazon MSK (Managed Streaming for Apache Kafka). The added functionalities include:

  • describe_msk_cluster: A function to describe MSK clusters.
  • get_bootstrap_servers: A function to retrieve the bootstrap servers of an MSK cluster.
  • reboot_msk_broker: A function to reboot a MSK broker.
  • `delete_cluster: A function to delete a MSK cluster.

Additionally, unit tests for these functions are included to ensure reliability and correctness.

Example

method:
  - type: probe
    name: Describe MSK cluster
    provider:
      type: python
      module: chaosaws.msk.probes
      func: describe_msk_cluster
      arguments:
        cluster_arn: ${cluster_arn}
  - type: action
    name: Reboot MSK broker
    provider:
      type: python
      module: chaosaws.msk.actions
      func: reboot_msk_broker
      arguments:
        cluster_arn: ${cluster_arn}
        broker_ids: ${broker_ids}

Checklist

  • Added probes.
  • Added actions.
  • Added unit tests.
  • All tests are passing.
  • Updated the changelog.

@jitapichab jitapichab force-pushed the feature/msk branch 3 times, most recently from 860c180 to 0af1f6e Compare May 30, 2024 05:43
Signed-off-by: Jorge Tapicha <jitapichab@gmail.com>
Signed-off-by: Jorge Tapicha <jitapichab@gmail.com>

Signed-off-by: Jorge Tapicha <jitapichab@gmail.com>
Signed-off-by: Jorge Tapicha <jitapichab@gmail.com>
Copy link
Copy Markdown
Contributor

@Lawouach Lawouach left a comment

Choose a reason for hiding this comment

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

LGTM

just a couple of minor changes

try:
return client.describe_cluster(ClusterArn=cluster_arn)
except client.exceptions.NotFoundException as e:
raise FailedActivity("The specified cluster was not found") from e
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

can you explain the need for the from e here?

Signed-off-by: Jorge Tapicha <jitapichab@gmail.com>
Signed-off-by: Jorge Tapicha <jitapichab@gmail.com>
Copy link
Copy Markdown
Contributor

@Lawouach Lawouach left a comment

Choose a reason for hiding this comment

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

LGTM

@Lawouach Lawouach merged commit 51c066f into chaostoolkit-incubator:master Jun 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants