Skip to content

refactor(kafka): delegate the JSON schema generation to the project#33

Merged
yannrouillard merged 1 commit intomainfrom
feat/PTFM-9207/delegate-kafka-schema-generation-to-project
Mar 13, 2024
Merged

refactor(kafka): delegate the JSON schema generation to the project#33
yannrouillard merged 1 commit intomainfrom
feat/PTFM-9207/delegate-kafka-schema-generation-to-project

Conversation

@yannrouillard
Copy link
Copy Markdown
Contributor

The automatic schema generation heuristic was nice for simple cases but has several drawbacks::

  • it would not work as soon as devs are a bit more creative in their code (uses parametrized...). It's difficult to anticipate and we should never underestimate devs creativity.

  • if it doesn't work, devs are not really autonomous to debug in case it doesn't work as expected in their project since the code runs in the CI and they are less likely to look at the mix of shell script and templated scala code used in the GitHub action.

For all these reasons, the code generation for scala now only calls a standardized sbt target that is expected to be implemented in projects. It will be implemented out of the box in template projects and devs are free to change it when they use a different implementation.

The automatic schema generation heuristic was nice for simple cases but
has several drawbacks::

  - it would not work as soon as devs are a bit more creative in their
    code (uses parametrized...).
    It's difficult to anticipate and we should never underestimate devs
    creativity.

  - if it doesn't work, devs are not really autonomous to debug in case
    it doesn't work as expected in their project since the code runs in
    the CI and they are less likely to look at the mix of shell script
    and templated scala code used in the GitHub action.

For all these reasons, the code generation for scala now only calls a
standardized sbt target that is expected to be implemented in projects.
It will be implemented out of the box in template projects and devs are
free to change it when they use a different implementation.
@yannrouillard yannrouillard self-assigned this Mar 13, 2024
Copy link
Copy Markdown

@yacinebender yacinebender left a comment

Choose a reason for hiding this comment

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

LGTM 🚀

@yannrouillard yannrouillard merged commit 7659672 into main Mar 13, 2024
@yannrouillard yannrouillard deleted the feat/PTFM-9207/delegate-kafka-schema-generation-to-project branch March 13, 2024 14:52
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.

2 participants