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(docs): change to an available Kafka version #7800

Draft
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

vuldin
Copy link
Contributor

@vuldin vuldin commented Mar 22, 2024

Current behavior

Running ./bin/up in the Redpanda example would result in the following when trying to build the Dockerfile:

 => [consumer  3/11] RUN apk add --no-cache openjdk17-jre bash                                                                                                                                 3.4s 
 => [consumer  4/11] RUN apk add --no-cache -t .build-deps curl ca-certificates jq                                                                                                             1.1s 
 => [producer  5/11] RUN mkdir -p /opt                                                                                                                                                         0.3s 
 => ERROR [consumer  6/11] RUN mirror=$(curl --stderr /dev/null https://www.apache.org/dyn/closer.cgi?as_json=1 | jq -r '.preferred')   && curl -sSL "${mirror}kafka/3.5.0/kafka_2.13-3.5.0.t  1.5s 
------                                                                                                                                                                                              
 > [consumer  6/11] RUN mirror=$(curl --stderr /dev/null https://www.apache.org/dyn/closer.cgi?as_json=1 | jq -r '.preferred')   && curl -sSL "${mirror}kafka/3.5.0/kafka_2.13-3.5.0.tgz"   | tar -x
zf - -C /opt   && mv /opt/kafka_2.13-3.5.0 /opt/kafka   && adduser -DH -s /sbin/nologin kafka   && chown -R kafka: /opt/kafka   && rm -rf /tmp/*   && apk del --purge .build-deps:                  
1.431 tar: invalid magic                                                                                                                                                                            
1.431 tar: short read                                                                                                                                                                               
------
failed to solve: process "/bin/sh -c mirror=$(curl --stderr /dev/null https://www.apache.org/dyn/closer.cgi\\?as_json\\=1 | jq -r '.preferred')   && curl -sSL \"${mirror}kafka/${KAFKA_VERSION}/kaf
ka_${SCALA_VERSION}-${KAFKA_VERSION}.tgz\"   | tar -xzf - -C /opt   && mv /opt/kafka_${SCALA_VERSION}-${KAFKA_VERSION} /opt/kafka   && adduser -DH -s /sbin/nologin kafka   && chown -R kafka: /opt/
kafka   && rm -rf /tmp/*   && apk del --purge .build-deps" did not complete successfully: exit code: 1

This is because the Kafka version used (3.5.0) is no longer available.

Proposed changes

Updating the Kafka client version to the the latest available (3.7.0) resolves the issue.

Checks

  • All commits in this Pull Request are signed and Verified by Github.
  • All commits in this Pull Request follow the Ockam commit message convention.
  • There are no Merge commits in this Pull Request. Ockam repo maintains a linear commit history. We merge Pull Requests by rebasing them onto the develop branch. Rebasing to the latest develop branch and force pushing to your Pull Request branch is okay.
  • I have read and accept the Ockam Community Code of Conduct.
  • I have read and accepted the Ockam Contributor License Agreement by adding my Git/Github details in a row at the end of the CONTRIBUTORS.csv file in a separate pull request to the build-trust/ockam repository. The easiest way to do this is to edit the CONTRIBUTORS.csv file in the github web UI and create a separate Pull Request, this will mark the commit as verified.

Running `./bin/up` in the Redpanda example would result in an error.
This changes the Kafka version to one that is currently available.
@vuldin vuldin requested a review from a team as a code owner March 22, 2024 08:13
@vuldin
Copy link
Contributor Author

vuldin commented Mar 22, 2024

I think there is at least one other issue with the example, the next step also fails:

> docker compose logs -f consumer                                       
redpanda-consumer-1  | + sleep 10
redpanda-consumer-1  | + ockam identity create
redpanda-consumer-1  | /consumer.sh: line 7: ockam: command not found
redpanda-consumer-1  | + sleep 10
redpanda-consumer-1  | + ockam identity create
redpanda-consumer-1  | /consumer.sh: line 7: ockam: command not found

I may look more into this and update this PR.

@vuldin vuldin marked this pull request as draft March 22, 2024 08:22
@mrinalwadhwa
Copy link
Member

@vuldin awesome! Thank you for finding the problem and sending the PR

@davide-baldo
Copy link
Member

Hi!
Looking at your PR, I was curious what might have broken in the example.
I’m still debugging but looks like by changing the advertised Kafka address from redpanda-ockam to 127.0.0.1 (in the --advertise-kafka-addr parameter) it works with an older version of ockam (except for the web-based console).

To fetch an older version, you can use this syntax:

curl --proto '=https' --tlsv1.2 -sSfL https://install.command.ockam.io | bash -s -- --version v0.116.0

I’ll dig into more recent versions soon

@davide-baldo
Copy link
Member

davide-baldo commented Mar 25, 2024

@vuldin
Thank you for helping us find the problem!

I've investigated further and found out a couple of issues on the rust side, one we were expecting an IP address where a hostname was provided, and the second one was a typo during a refactoring, modifying a route in the wrong way.

I've opened a PR to address these issues.

@vuldin
Copy link
Contributor Author

vuldin commented Mar 25, 2024

Amazing thanks for the update and PR!

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.

3 participants