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

transform: multiple output topics control plane #16946

Merged
merged 3 commits into from
Mar 8, 2024

Conversation

rockwotj
Copy link
Contributor

@rockwotj rockwotj commented Mar 7, 2024

The control plane already mostly supports multiple output topics, this patchset removes the last of the validation needed to deploy transforms with multiple outputs. However there are currently no SDKs with support for multiple outputs, so there isn't a way to write tests yet. Those tests will come in followups once the SDKs are updated.

Backports Required

  • none - not a bug fix
  • none - this is a backport
  • none - issue does not exist in previous branches
  • none - papercut/not impactful enough to backport
  • v23.3.x
  • v23.2.x

Release Notes

Features

  • Data Transforms now support writing to multiple output topics. The REDPANDA_OUTPUT_TOPIC environment variable exposed in transforms is now removed for REDPANDA_OUTPUT_TOPIC_%d for each output topic specified.

Signed-off-by: Tyler Rockwood <rockwood@redpanda.com>
@github-actions github-actions bot added area/redpanda area/wasm WASM Data Transforms labels Mar 7, 2024
@rockwotj rockwotj requested a review from oleiman March 7, 2024 20:18
@rockwotj rockwotj self-assigned this Mar 7, 2024
This removes the last validation for preventing multiple output topics.

Signed-off-by: Tyler Rockwood <rockwood@redpanda.com>
oleiman
oleiman previously approved these changes Mar 7, 2024
Copy link
Member

@oleiman oleiman left a comment

Choose a reason for hiding this comment

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

lgtm

@@ -424,7 +424,11 @@ absl::flat_hash_map<ss::sstring, ss::sstring>
make_environment_vars(const model::transform_metadata& meta) {
absl::flat_hash_map<ss::sstring, ss::sstring> env = meta.environment;
env.emplace("REDPANDA_INPUT_TOPIC", meta.input_topic.tp());
env.emplace("REDPANDA_OUTPUT_TOPIC", meta.output_topics.begin()->tp());
Copy link
Member

Choose a reason for hiding this comment

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

Might want to throw that in the release notes for posterity

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, done. I honestly think it's probably confusing to anyone who reads that, but if they know about this random env var it will be clear. IYKYK I guess.

Previously the output topic was written as `REDPANDA_OUTPUT_TOPIC`, now
that there can be multiple we'll write each as
`REDPANDA_OUTPUT_TOPIC_%d` with the index as the key. This is
technically a breaking change to remove the `REDPANDA_OUTPUT_TOPIC` key
for the first output topic, but since this isn't documented anywhere and
even I haven't used it it's going hurt anything here.

Signed-off-by: Tyler Rockwood <rockwood@redpanda.com>
@rockwotj
Copy link
Contributor Author

rockwotj commented Mar 8, 2024

force push: fix a broken wasi test

@rockwotj rockwotj requested a review from oleiman March 8, 2024 04:05
@rockwotj rockwotj merged commit fca00f2 into redpanda-data:dev Mar 8, 2024
16 checks passed
@rockwotj rockwotj deleted the multi-topic-control-plane branch March 8, 2024 18:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/redpanda area/wasm WASM Data Transforms
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants