-
Notifications
You must be signed in to change notification settings - Fork 552
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
[CORE-2736] Adds output batch compression for Data Transforms #18514
base: dev
Are you sure you want to change the base?
[CORE-2736] Adds output batch compression for Data Transforms #18514
Conversation
4adf296
to
58df36c
Compare
/ci-repeat 1 |
/ci-repeat 1 |
new failures in https://buildkite.com/redpanda/redpanda/builds/49248#018f82f5-d2fc-4bd5-b204-a1774afd79bf:
new failures in https://buildkite.com/redpanda/redpanda/builds/49248#018f82f5-d2ff-46d2-8840-d9e063a709e2:
|
d9f6691
to
f13207f
Compare
@@ -149,6 +153,7 @@ The --var flag can be repeated to specify multiple variables like so: | |||
cmd.Flags().StringSliceVarP(&fc.outputTopics, "output-topic", "o", []string{}, "The output topic to write the transform results to (repeatable)") | |||
cmd.Flags().StringVar(&fc.functionName, "name", "", "The name of the transform") | |||
cmd.Flags().Var(&fc.env, "var", "Specify an environment variable in the form of KEY=VALUE") | |||
cmd.Flags().StringVar(&fc.compression, "compression", "", "Output batch compression type") |
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.
Shouldn't this be an explicit "none"?
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.
yeah fair point
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.
With the current flag-overrides-file model, wouldn't this preclude the ability to control the setting via YAML?
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.
Yeah I think so, if you ask me!
NAME INPUT TOPIC OUTPUT TOPIC RUNNING LAG | ||
foo2bar foo bar 2 / 3 7 | ||
scrubber pii cleaned, munged 0 / 1 99 | ||
NAME INPUT TOPIC OUTPUT TOPIC RUNNING LAG COMPRESSION |
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 useful? We don't print env vars and this feels like that configuration. Maybe in the detail view? Doesn't feel like there is a user story where someone wants this
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.
good point, yeah I suppose not.
src/go/rpk/pkg/cli/transform/meta.go
Outdated
@@ -81,3 +81,40 @@ Subsequent 'rpk transform list' operations will show transform processors as | |||
} | |||
return cmd | |||
} | |||
|
|||
func newSetCompressionCommand(fs afero.Fs, p *config.Params) *cobra.Command { |
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.
Probably confusing for users that this is not sticky across deploys
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.
You mean like on the backend (i.e. sticks to (name, transform))? Or writing back to the config (i.e. sticks to the transform itself)?
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 am not sure! I just wanted to point out that the following sequence of commands would end up with a non expected outcome.
rpk transform deploy
rpk transform set compression=gzip
rpk transform deploy
# no more gzip!
I personally would just not have this command, but otherwise I think writing back to the file is a reasonable choice (or adding a warning if there is no config file)
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.
No, it's a great point. The set
command doesn't seem particularly useful. Thanks!
src/go/rpk/pkg/cli/transform/meta.go
Outdated
at a cost. So, while it does occur asynchronously with respect to transform | ||
execution, compression may introduce latency on the output 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.
at a cost. So, while it does occur asynchronously with respect to transform | |
execution, compression may introduce latency on the output topic. | |
at a cost. So, while it occurs asynchronously with respect to transform | |
execution, compression may introduce latency on the output topic. |
boost::lexical_cast<compression>("bogus) should raise bad_lexical cast. Previous behavior: runtime_error("Fell off the end of a string-switch") Failure to match the source string to one of the compression lexical cases should set the fail bit on the istream instead of allowing the runtime_error to escape. Signed-off-by: Oren Leiman <oren.leiman@redpanda.com>
Also adds bool transform_metadata_patch::empty() Signed-off-by: Oren Leiman <oren.leiman@redpanda.com>
f13207f
to
1e48f71
Compare
force push to sync w/ dev after a couple weeks of inactivity |
"lz4", | ||
"zstd" | ||
], | ||
"description": "Output batch compression mode (TODO(oren): might want to limit which?)" |
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.
todo removal reminder
"zstd" | ||
], | ||
"required": false, | ||
"description": "Output batch compression mode (TODO(oren): might want to limit which?)" |
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.
todo removal reminder
"zstd" | ||
], | ||
"required": false, | ||
"description": "Output batch compression mode (TODO(oren): might want to limit which?)" |
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.
todo removal reminder
Signed-off-by: Oren Leiman <oren.leiman@redpanda.com>
Signed-off-by: Oren Leiman <oren.leiman@redpanda.com>
Signed-off-by: Oren Leiman <oren.leiman@redpanda.com>
Respecting transform_metadata::compression_mode Signed-off-by: Oren Leiman <oren.leiman@redpanda.com>
Signed-off-by: Oren Leiman <oren.leiman@redpanda.com>
Signed-off-by: Oren Leiman <oren.leiman@redpanda.com>
Signed-off-by: Oren Leiman <oren.leiman@redpanda.com>
Signed-off-by: Oren Leiman <oren.leiman@redpanda.com>
- tranform_from_json - deploy Signed-off-by: Oren Leiman <oren.leiman@redpanda.com> dt/rpk
Signed-off-by: Oren Leiman <oren.leiman@redpanda.com>
1e48f71
to
47536f4
Compare
force push contents:
|
This PR adds the ability to configure output batch compression on WASM transforms, either at deploy time or post facto, via metadata patch request. Includes rpk experience for same
TODO:
Backports Required
Release Notes
Improvements