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 retries to permission grant updates on Pulsar topics #91

Merged
merged 2 commits into from
Jul 19, 2023

Conversation

ckreiling
Copy link
Contributor

@ckreiling ckreiling commented Jun 30, 2023

Motivation

Currently I create a handful of permission grants per-topic using this Terraform provider.

Pulsar raises a BadVersionException when Terraform tries to create permission grants for multiple topics in the same namespace concurrently (see apache/pulsar#2952) - which results in the topic being created but not added to the TF state.

Thus on subsequent applies, I have to manually import topics due to code: 409 reason: This topic already exists, and re-apply my TF module a few times before all my desired changes are applied.

Modifications

Added a retry to the updatePermissionGrants operation in the Pulsar Topic resource as a workaround for Pulsar's undesirable behavior

Verifying this change

  • Make sure that the change passes the CI checks.

This change is a trivial rework / code cleanup without any test coverage.

Documentation

Check the box below.

Need to update docs?

  • doc-required

    (If you need help on updating docs, create a doc issue)

  • no-need-doc

    no existing docs around when this TF provider retries operations

  • doc

    (If this PR contains doc changes)

@ckreiling ckreiling requested a review from a team as a code owner June 30, 2023 23:51
@github-actions github-actions bot added no-need-doc This pr does not need any document doc This pr contains a document and removed doc This pr contains a document labels Jun 30, 2023
Copy link
Member

@maxsxu maxsxu left a comment

Choose a reason for hiding this comment

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

Thanks for contributing!

@maxsxu maxsxu merged commit 19da28f into streamnative:master Jul 19, 2023
@ckreiling
Copy link
Contributor Author

@maxsxu Thanks for the merge! Do you have an estimate on when you'll cut a release published to the Terraform registry?

@maxsxu
Copy link
Member

maxsxu commented Jul 21, 2023

@maxsxu Thanks for the merge! Do you have an estimate on when you'll cut a release published to the Terraform registry?

@ckreiling We'll cut a new release next week, I'll keep you informed. Thanks for your attention!

@maxsxu
Copy link
Member

maxsxu commented Jul 28, 2023

Hi @ckreiling terraform-provider-pulsar v0.2.0 is released. See https://registry.terraform.io/providers/streamnative/pulsar/0.2.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
no-need-doc This pr does not need any document
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants