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

feat(dev): Upgrade kafka and zookeeper to support Apple M1 #28574

Merged
merged 6 commits into from
Sep 15, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/actions/setup-sentry/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ runs:
--name sentry_zookeeper \
-d --network host \
-e ZOOKEEPER_CLIENT_PORT=2181 \
confluentinc/cp-zookeeper:4.1.0
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 seems the CI was running an older version.

Copy link
Member

Choose a reason for hiding this comment

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

What version do we run in production?

Copy link
Member Author

Choose a reason for hiding this comment

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

I believe we run 4.1.2-3 and version 3.4.11 for zookeeper.

Should I make the CI test against those versions?

As curiosity, we run a range of versions across the org: https://github.com/search?q=org%3Agetsentry+cp-kafka&type=code

Copy link
Member

Choose a reason for hiding this comment

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

Yeah I think we should have CI match production, let's leave comments here

Copy link
Member Author

Choose a reason for hiding this comment

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

@billyvg I've discovered that version of zookeeper we use in production is no longer available on Docker hub, thus, we cannot match the versions between CI and production.

FYI, this part of the PR is completely unnecessary to me.

Copy link
Member Author

Choose a reason for hiding this comment

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

Asked about the versions picked in #20543 (review)

confluentinc/cp-zookeeper:6.2.0

docker run \
--name sentry_kafka \
Expand All @@ -173,7 +173,7 @@ runs:
-e KAFKA_LISTENER_SECURITY_PROTOCOL_MAP=INTERNAL:PLAINTEXT,EXTERNAL:PLAINTEXT \
-e KAFKA_INTER_BROKER_LISTENER_NAME=INTERNAL \
-e KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR=1 \
confluentinc/cp-kafka:5.1.2
confluentinc/cp-kafka:6.2.0
fi

if [ "$NEED_SNUBA" = "true" ]; then
Expand Down
4 changes: 2 additions & 2 deletions src/sentry/conf/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -1724,15 +1724,15 @@ def build_cdc_postgres_init_db_volume(settings):
),
"zookeeper": lambda settings, options: (
{
"image": "confluentinc/cp-zookeeper:5.1.2",
"image": "confluentinc/cp-zookeeper:6.2.0",
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 leave comments here about the versions and why it differs from CI/prod

Copy link
Member Author

Choose a reason for hiding this comment

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

Updated.

"environment": {"ZOOKEEPER_CLIENT_PORT": "2181"},
"volumes": {"zookeeper": {"bind": "/var/lib/zookeeper"}},
"only_if": "kafka" in settings.SENTRY_EVENTSTREAM or settings.SENTRY_USE_RELAY,
}
),
"kafka": lambda settings, options: (
{
"image": "confluentinc/cp-kafka:5.1.2",
"image": "confluentinc/cp-kafka:6.2.0",
"ports": {"9092/tcp": 9092},
"environment": {
"KAFKA_ZOOKEEPER_CONNECT": "{containers[zookeeper][name]}:2181",
Expand Down