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

Build docker image with serdes #251

Open
wants to merge 9 commits into
base: main
Choose a base branch
from
Open

Conversation

azatsafin
Copy link
Member

@azatsafin azatsafin commented Mar 28, 2024

  • Breaking change? (if so, please describe the impact and migration path for existing application instances)

What changes did you make? (Give an overview)
Resolves #156

  • Added Dockerfile to build kafka-ui image with Smile and Glue serders
  • Added script for the same to build locally

Is there anything you'd like reviewers to focus on?

How Has This Been Tested? (put an "x" (case-sensitive!) next to an item)

  • No need to
  • Manually (please, describe, if necessary)
  • Unit checks
  • Integration checks
  • Covered by existing automation

Checklist (put an "x" (case-sensitive!) next to all the items, otherwise the build will fail)

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation (e.g. ENVIRONMENT VARIABLES)
  • My changes generate no new warnings (e.g. Sonar is happy)
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged

Check out Contributing and Code of Conduct

A picture of a cute animal (not mandatory but encouraged)

@kapybro kapybro bot added status/triage Issues pending maintainers triage status/triage/manual Manual triage in progress area/serde Serialization & Deserialization (plugins) status/triage/completed Automatic triage completed and removed status/triage Issues pending maintainers triage labels Mar 28, 2024
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Hello there azatsafin! 👋

Thank you and congrats 🎉 for opening your first PR on this project! ✨ 💖

We will try to review it soon!

ARG BASE_UI_IMAGE=ghcr.io/kafbat/kafka-ui:main
FROM $BASE_UI_IMAGE

ARG SERDE_SMILE_JAR=https://github.com/kafbat/ui-serde-smile/releases/download/v1.0.1/serde-smile-v1.0.1-jar-with-dependencies.jar
Copy link
Member

Choose a reason for hiding this comment

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

Could we add glue serde also?

Copy link
Member

Choose a reason for hiding this comment

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

@germanosin yes, it's a WIP

@azatsafin azatsafin changed the title Docker file with smile serde Build docker image with serdes Apr 2, 2024
@azatsafin azatsafin marked this pull request as ready for review April 2, 2024 14:56
@azatsafin azatsafin requested review from a team as code owners April 2, 2024 14:56
@@ -0,0 +1,38 @@
ARG BASE_UI_IMAGE=ghcr.io/kafbat/kafka-ui:main
Copy link
Member

Choose a reason for hiding this comment

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

This means that if we run this workflow without running our main image, we're gonna build an outdated image. We need to either depend on the base image workflow or use some other approach.

Copy link
Member Author

Choose a reason for hiding this comment

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

it is possible, but I think it is better approach
this enables to track versioning of serders separatly from the kafka-ui main.

@@ -0,0 +1,33 @@
#!/bin/bash
# Smile
smile_latest_release=$(curl -s "https://api.github.com/repos/kafbat/ui-serde-smile/releases/latest")
Copy link
Member

Choose a reason for hiding this comment

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

Can we collapse this script even more so we can have a list of repos (like kafbat/ui-serde-smile) so we could iterate over it and pull each jar?

wget -O "kafka-ui-smile-serde-${SERDE_SMILE_VERSION}.jar" $SERDE_SMILE_JAR

ENV kafka.clusters.0.serde.0.name="Smile"
ENV kafka.clusters.0.serde.0.filePath="/usr/lib/serdes/kafka-ui-serde-smile-${SERDE_SMILE_VERSION}.jar"
Copy link
Member

Choose a reason for hiding this comment

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

@kafbat/backend need to discuss this, perhaps we could introduce a way to load serdes from one common path so we don't have to add these many properties and delegate the rest (like serde properties) to the user

.github/workflows/build-serders.yml Outdated Show resolved Hide resolved
Copy link

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarCloud

@Haarolean Haarolean added the hacktoberfest-accepted PRs accepted towards hacktoberfest goal and will be counted as approved label Oct 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/serde Serialization & Deserialization (plugins) hacktoberfest-accepted PRs accepted towards hacktoberfest goal and will be counted as approved status/triage/completed Automatic triage completed status/triage/manual Manual triage in progress
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Infra: Ship a serde-enriched docker image alongside with the main one
3 participants