Skip to content

Commit

Permalink
fix(kafkatopic): temporarily disable local_retention_* fields
Browse files Browse the repository at this point in the history
  • Loading branch information
Serpentiel committed Jan 5, 2024
1 parent 8047a3d commit ea6a115
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 8 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ nav_order: 1

## [MAJOR.MINOR.PATCH] - YYYY-MM-DD

## [4.12.1] - 2024-01-05

- Temporarily disable `local_retention_*` fields in `aiven_kafka_topic` resource

## [4.12.0] - 2024-01-03

- Fix insufficient brokers error when create kafka topic
Expand Down
4 changes: 2 additions & 2 deletions docs/resources/kafka_topic.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@ Optional:
- `flush_messages` (String) flush.messages value
- `flush_ms` (String) flush.ms value
- `index_interval_bytes` (String) index.interval.bytes value
- `local_retention_bytes` (String) local.retention.bytes value
- `local_retention_ms` (String) local.retention.ms value
- `local_retention_bytes` (String) local.retention.bytes value. This field is temporarily disabled.
- `local_retention_ms` (String) local.retention.ms value. This field is temporarily disabled.
- `max_compaction_lag_ms` (String) max.compaction.lag.ms value
- `max_message_bytes` (String) max.message.bytes value
- `message_downconversion_enable` (Boolean) message.downconversion.enable value
Expand Down
12 changes: 6 additions & 6 deletions internal/sdkprovider/service/kafkatopic/kafka_topic.go
Original file line number Diff line number Diff line change
Expand Up @@ -224,13 +224,13 @@ var aivenKafkaTopicSchema = map[string]*schema.Schema{
},
"local_retention_bytes": {
Type: schema.TypeString,
Description: "local.retention.bytes value",
Description: "local.retention.bytes value. This field is temporarily disabled.",
Optional: true,
DiffSuppressFunc: schemautil.EmptyObjectDiffSuppressFunc,
},
"local_retention_ms": {
Type: schema.TypeString,
Description: "local.retention.ms value",
Description: "local.retention.ms value. This field is temporarily disabled.",
Optional: true,
DiffSuppressFunc: schemautil.EmptyObjectDiffSuppressFunc,
},
Expand Down Expand Up @@ -356,8 +356,8 @@ func getKafkaTopicConfig(d *schema.ResourceData) aiven.KafkaTopicConfig {
SegmentMs: schemautil.ParseOptionalStringToInt64(configRaw["segment_ms"]),
UncleanLeaderElectionEnable: schemautil.OptionalBoolPointer(d, "config.0.unclean_leader_election_enable"),
RemoteStorageEnable: schemautil.OptionalBoolPointer(d, "config.0.remote_storage_enable"),
LocalRetentionBytes: schemautil.ParseOptionalStringToInt64(configRaw["local_retention_bytes"]),
LocalRetentionMs: schemautil.ParseOptionalStringToInt64(configRaw["local_retention_ms"]),
//LocalRetentionBytes: schemautil.ParseOptionalStringToInt64(configRaw["local_retention_bytes"]),
//LocalRetentionMs: schemautil.ParseOptionalStringToInt64(configRaw["local_retention_ms"]),
}
}

Expand Down Expand Up @@ -512,8 +512,8 @@ func flattenKafkaTopicConfig(t *aiven.KafkaTopic) []map[string]interface{} {
"segment_ms": schemautil.ToOptionalString(t.Config.SegmentMs.Value),
"unclean_leader_election_enable": t.Config.UncleanLeaderElectionEnable.Value,
"remote_storage_enable": t.Config.RemoteStorageEnable.Value,
"local_retention_bytes": schemautil.ToOptionalString(t.Config.LocalRetentionBytes.Value),
"local_retention_ms": schemautil.ToOptionalString(t.Config.LocalRetentionMs.Value),
//"local_retention_bytes": schemautil.ToOptionalString(t.Config.LocalRetentionBytes.Value),
//"local_retention_ms": schemautil.ToOptionalString(t.Config.LocalRetentionMs.Value),
},
}
}

0 comments on commit ea6a115

Please sign in to comment.