Skip to content

Comments

#1569 | Changed default value of schema.repository.deleteSchemaPathSuffix to empty string.#1754

Closed
adriansobolewski wants to merge 7 commits intoallegro:masterfrom
adriansobolewski:change-deleteSchemaPathSuffix-default-value
Closed

#1569 | Changed default value of schema.repository.deleteSchemaPathSuffix to empty string.#1754
adriansobolewski wants to merge 7 commits intoallegro:masterfrom
adriansobolewski:change-deleteSchemaPathSuffix-default-value

Conversation

@adriansobolewski
Copy link
Contributor

@adriansobolewski adriansobolewski commented Oct 18, 2023

Why on earth did I change so many lines just to change the default config value?

I've noticed that there is a "hacky" constructor with default values in SchemaRegistryRawSchemaClient. So to change the default value of deleteSchemaPathSuffix I would have to make changes in two places:

  1. In the properties file
  2. In the default constructor

After analysis, I've found out that the default constructor is used to provide schema client to hermes-frontend and hermes-consumers. Those default clients didn't even use the delete/create/validate methods, so I've introduced an read-only abstraction to get rid of this "hacky" constructor with default values.

After this change changing the deleteSchemaPathSuffix can be done just in one place.

Additionally, the code is cleaner and the read-only schema client is simpler and uses less dependencies.

If you don't like this change I can drop the commit with the refactor.

…ffix to empty string. This has been done to make requests to default Confluent schema registry match its delete url.
…hods to read and modify the schema. Modified RawSchemaClient to provide only read methods.
@adriansobolewski adriansobolewski force-pushed the change-deleteSchemaPathSuffix-default-value branch 3 times, most recently from c2548ff to 2cf0f3f Compare October 18, 2023 13:46
@adriansobolewski adriansobolewski force-pushed the change-deleteSchemaPathSuffix-default-value branch from 2cf0f3f to 6867e5f Compare October 18, 2023 13:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants