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

[fix][schema]Fix AutoProduceBytes producer can not be created to a topic with ProtoBuf schema #19767

Merged
merged 2 commits into from
Apr 1, 2023
Merged

[fix][schema]Fix AutoProduceBytes producer can not be created to a topic with ProtoBuf schema #19767

merged 2 commits into from
Apr 1, 2023

Conversation

liangyepianzhou
Copy link
Contributor

@liangyepianzhou liangyepianzhou commented Mar 9, 2023

Motivation

  1. There is a topic1 with a protobuf schema.
  2. Create a producer1 with AutoProduceBytes schema.
  3. The producer1 will be created failed because the way to get the schema of protobuf schema is not supported. ### ###

Modification

Because the Protobuf schema is implemented from the AvroBaseStructSchema. So we add a way to get Protobuf schema just like the AvroSchema.

Verifying this change

  • Make sure that the change passes the CI checks.

(Please pick either of the following options)

This change is a trivial rework / code cleanup without any test coverage.

(or)

This change is already covered by existing tests, such as (please describe tests).

(or)

This change added tests and can be verified as follows:

(example:)

  • Added integration tests for end-to-end deployment with large payloads (10MB)
  • Extended integration test for recovery after broker failure

Does this pull request potentially affect one of the following parts:

If the box was checked, please highlight the changes

  • Dependencies (add or upgrade a dependency)
  • The public API
  • The schema
  • The default values of configurations
  • The threading model
  • The binary protocol
  • The REST endpoints
  • The admin CLI options
  • The metrics
  • Anything that affects deployment

Documentation

  • doc
  • doc-required
  • doc-not-needed
  • doc-complete

Matching PR in forked repository

PR in forked repository:

@github-actions github-actions bot added the doc-not-needed Your PR changes do not impact docs label Mar 9, 2023
@Technoboy- Technoboy- added this to the 3.0.0 milestone Mar 20, 2023
@liangyepianzhou liangyepianzhou merged commit be57e9a into apache:master Apr 1, 2023
@liangyepianzhou liangyepianzhou deleted the xiangying/fix/schema/autoProduceBytes branch April 1, 2023 11:22
@lhotari
Copy link
Member

lhotari commented Dec 16, 2024

I wonder how this change makes sense. The condition is about SchemaType.PROTOBUF and then the schema is set to be GenericAvroSchema. This doesn't look right.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
doc-not-needed Your PR changes do not impact docs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants