-
Notifications
You must be signed in to change notification settings - Fork 852
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 topic properties to Migrator #3207
Conversation
c.Key == "replication.factor" || | ||
c.Key == "write.caching" || | ||
c.Key == "redpanda.iceberg.mode" || | ||
strings.HasPrefix(c.Key, "redpanda.remote.") { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this correct? Do we have to first query the destination server settings to ensure that we're not overwriting a custom setting?
replication_factor_override: true | ||
replication_factor: -1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The template linter is a bit annoying, since it doesn't check if there are any unrecognised fields... Something to improve in Benthos.
|
||
continue | ||
} else { | ||
mgr.Logger().Infof("Created topic %q", topic) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's a debug message which gets printed if the topic already exists...
b28c503
to
e3efdbd
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, the only thing is that I think we don't want to mirror redpanda.remote.* properties
c.Key == "replication.factor" || | ||
c.Key == "write.caching" || | ||
c.Key == "redpanda.iceberg.mode" || | ||
strings.HasPrefix(c.Key, "redpanda.remote.") { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure we want to mirror redpanda.remote.*
but just want to take defaults in the destination cluster. The thing is in Redpanda Cloud we never want this to be off, and the default is always on. Maybe we should just not mirror it...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good, I removed redpanda.remote.
from that list.
Also make sure ACLs are always migrated even if the destination topic already exists. Signed-off-by: Mihai Todor <[email protected]>
Signed-off-by: Mihai Todor <[email protected]>
e3efdbd
to
840ed26
Compare
c.Key == "max.message.bytes" || | ||
c.Key == "replication.factor" || | ||
c.Key == "write.caching" || | ||
c.Key == "redpanda.iceberg.mode" { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe simpler as a switch or a slices.Contain?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I went for a map since that's what Copilot suggested when I asked it to make the code look nicer 😅
Signed-off-by: Mihai Todor <[email protected]>
Signed-off-by: Mihai Todor <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
Also make sure ACLs are always migrated even if the destination topic already exists.