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: inconsistent schema during message produce #664

Merged
merged 1 commit into from
Jul 3, 2023

Conversation

eliax1996
Copy link
Contributor

@eliax1996 eliax1996 commented Jun 22, 2023

This pr is ment to fix this issue the test where we try this problem is test_publish_with_schema_id_of_another_subject.

The list of subjects bound to a topic has been added to the /schemas/ids/{id} if the {"includeSubjects": "True"} param are included. This helps the rest proxy in understand if a certain subject when it's required to produce a message providing only the SchemaID, once the REST proxy get the Schema and the list of allowed Subjects it calculate the subject and checks if the required subject it's allowed or not.

@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Jun 22, 2023

Deploying with  Cloudflare Pages  Cloudflare Pages

Latest commit: ca65ddd
Status: ✅  Deploy successful!
Preview URL: https://5a76e9b1.karapace.pages.dev
Branch Preview URL: https://eliax1996-fix-inconsistent-s.karapace.pages.dev

View logs

karapace/serialization.py Outdated Show resolved Hide resolved
@eliax1996 eliax1996 force-pushed the eliax1996/fix-inconsistent-schema-publish branch 2 times, most recently from 4f0ad54 to 66c0057 Compare June 24, 2023 16:28
@eliax1996 eliax1996 marked this pull request as ready for review June 24, 2023 16:28
@eliax1996 eliax1996 requested review from a team as code owners June 24, 2023 16:28
@eliax1996 eliax1996 force-pushed the eliax1996/fix-inconsistent-schema-publish branch 4 times, most recently from c160c44 to bcda64b Compare June 24, 2023 16:58
@eliax1996 eliax1996 force-pushed the eliax1996/fix-inconsistent-schema-publish branch from 31178d7 to 12085a3 Compare June 26, 2023 08:38
@eliax1996 eliax1996 force-pushed the eliax1996/fix-inconsistent-schema-publish branch from 12085a3 to a25b2c2 Compare June 26, 2023 09:39
karapace/in_memory_database.py Outdated Show resolved Hide resolved
karapace/typing.py Outdated Show resolved Hide resolved
karapace/serialization.py Outdated Show resolved Hide resolved
karapace/serialization.py Outdated Show resolved Hide resolved
karapace/serialization.py Outdated Show resolved Hide resolved
@eliax1996 eliax1996 force-pushed the eliax1996/fix-inconsistent-schema-publish branch from f3957c0 to b9983c5 Compare June 26, 2023 10:45
karapace/serialization.py Outdated Show resolved Hide resolved
karapace/kafka_rest_apis/__init__.py Outdated Show resolved Hide resolved
karapace/kafka_rest_apis/__init__.py Outdated Show resolved Hide resolved
karapace/kafka_rest_apis/__init__.py Outdated Show resolved Hide resolved
karapace/kafka_rest_apis/__init__.py Outdated Show resolved Hide resolved
karapace/kafka_rest_apis/__init__.py Outdated Show resolved Hide resolved
@eliax1996 eliax1996 force-pushed the eliax1996/fix-inconsistent-schema-publish branch 3 times, most recently from 0e5db50 to 4b5ed0c Compare June 26, 2023 14:57
@eliax1996 eliax1996 force-pushed the eliax1996/fix-inconsistent-schema-publish branch 4 times, most recently from ead18a2 to 3ec4164 Compare June 26, 2023 15:41
@eliax1996 eliax1996 force-pushed the eliax1996/fix-inconsistent-schema-publish branch from 8c8a4ad to 9e79723 Compare June 28, 2023 16:20
pytest.ini Outdated Show resolved Hide resolved
karapace/client.py Outdated Show resolved Hide resolved
@eliax1996 eliax1996 force-pushed the eliax1996/fix-inconsistent-schema-publish branch 6 times, most recently from 4eef18f to 2454161 Compare June 29, 2023 11:07
@eliax1996 eliax1996 force-pushed the eliax1996/fix-inconsistent-schema-publish branch from 2454161 to ab3fc15 Compare June 29, 2023 13:02
karapace/schema_registry_apis.py Outdated Show resolved Hide resolved
karapace/kafka_rest_apis/__init__.py Outdated Show resolved Hide resolved
karapace/serialization.py Outdated Show resolved Hide resolved
karapace/serialization.py Outdated Show resolved Hide resolved
karapace/kafka_rest_apis/__init__.py Outdated Show resolved Hide resolved
@eliax1996 eliax1996 force-pushed the eliax1996/fix-inconsistent-schema-publish branch 4 times, most recently from 3293378 to 5fa299c Compare July 3, 2023 08:43
tests/integration/test_rest.py Outdated Show resolved Hide resolved
tests/integration/test_rest.py Outdated Show resolved Hide resolved
@eliax1996 eliax1996 force-pushed the eliax1996/fix-inconsistent-schema-publish branch from 5fa299c to 8d73b67 Compare July 3, 2023 09:27
…ossible to produce a message only if the schema sent with the record is registered to the topic.
@eliax1996 eliax1996 force-pushed the eliax1996/fix-inconsistent-schema-publish branch from 8d73b67 to ca65ddd Compare July 3, 2023 09:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

it is possible to produce an event with a different schema than the one attached to the topic
3 participants