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

kafkaUserConfig.kafka.logCleanerMinCleanableRatio being cast to 0 #127

Open
alexhwoods opened this issue Apr 16, 2021 · 0 comments
Open
Labels
kind/bug Some behavior is incorrect or out of spec

Comments

@alexhwoods
Copy link

First of all, thank you guys for your awesome work on this project! We're super grateful for the Pulumi team 😃


When upgrading from @pulumi/aiven 3.5.1 to 3.6.1, the value kafkaUserConfig.kafka.logCleanerMinCleanableRatio has a new default value — 0. Which is an invalid value.

The field means "if 50% of the log has already been compacted, don't allow the log cleaner to compact any more". So, "if none of the log has already been compacted, don't allow the log cleaner to compact any more" -> "so never compact" (when compaction is selected as the cleanup policy).

Furthermore, the Aiven API rejects the value of 0. You get this error message

{
  "errors": [
    {
      "message": "Invalid user_config: Invalid input for kafka: 0 is less than the minimum of 0.2",
      "status": 400
    }
  ],
  "message": "Invalid user_config: Invalid input for kafka: 0 is less than the minimum of 0.2"
}

Expected behavior

The default value should be 0.5, like in Kafka itself. I'd argue 0 is an invalid value, but I could be wrong there.

Current behavior

Match Kafka's default value of 0.5.

Steps to reproduce

  1. Create an aiven.Service of serviceType: 'kafka', with @pulumi/aiven: 3.5.1. Don't specify kafkaUserConfig.kafka.logCleanerMinCleanableRatio.
  2. Upgrade to @pulumi/aiven: 3.6.1

Note that you can then see the code work if you do specify the value, at 0.5.

Context (Environment)

I want to upgrade to the newest version :)

Affected feature

aiven.Service of serviceType: 'kafka'. This is also not a huge deal, because there's a workaround. (specify the value of 0.5 for kafkaUserConfig.kafka.logCleanerMinCleanableRatio).

@alexhwoods alexhwoods added the kind/bug Some behavior is incorrect or out of spec label Apr 16, 2021
@leezen leezen added kind/bug Some behavior is incorrect or out of spec and removed kind/bug Some behavior is incorrect or out of spec labels Apr 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Some behavior is incorrect or out of spec
Projects
None yet
Development

No branches or pull requests

3 participants