fix(docs): change to an available Kafka version
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.
- [X] All commits in this Pull Request follow the Ockam commit message convention.
- [X] 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.
- [X] I have read and accept the Ockam Community Code of Conduct.
- [X] 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.
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 awesome! Thank you for finding the problem and sending the PR
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
@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.
Amazing thanks for the update and PR!