Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add msk probes and actions #148

Merged
merged 5 commits into from
Jun 10, 2024

Conversation

jitapichab
Copy link
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
Copy link
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
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 <[email protected]>
Copy link
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
12 checks passed
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