-
Notifications
You must be signed in to change notification settings - Fork 172
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!: update event_bus_kafka and add event_bus_redis #3907
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -66,6 +66,7 @@ | |
'taxonomy', | ||
'django_object_actions', | ||
'nested_admin', | ||
'openedx_events', | ||
] | ||
|
||
ALGOLIA = { | ||
|
@@ -721,8 +722,8 @@ | |
}, | ||
} | ||
|
||
EVENT_BUS_KAFKA_PROCESSING_DELAY_SECONDS = 60 | ||
EVENT_BUS_KAFKA_MESSAGE_DELAY_THRESHOLD_SECONDS = 60 | ||
EVENT_BUS_PROCESSING_DELAY_SECONDS = 60 | ||
EVENT_BUS_MESSAGE_DELAY_THRESHOLD_SECONDS = 60 | ||
Comment on lines
+725
to
+726
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. So we're removing kafka config from edx-internal and keeping them only in Discovery? Are these settings not going to change? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nothing is being removed here, just renamed. The goal is to remove all Kafka references from the course-discovery source code so that deployers can choose to use event-bus-redis or other Event Bus implementations. My understanding is that these delay settings aren't specific to Kafka, but are needed for any Event Bus implementation. I've already added the new name here, copying the value: https://github.com/edx/edx-internal/pull/8376/files#diff-5e0513d8ace97560c1f17a81784c4d90cb5159626173cc2ffbc2e1fd05bd28b7R40 (private repo PR) The next PR would remove the Kafka-specific name. The actual behavior shouldn't change at all. |
||
|
||
ALGOLIA_INDEX_EXCLUDED_SOURCES = [] | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -86,6 +86,11 @@ | |
|
||
CELERY_TASK_ALWAYS_EAGER = False | ||
|
||
EVENT_BUS_CONSUMER = 'edx_event_bus_redis.RedisEventConsumer' | ||
EVENT_BUS_PRODUCER = 'edx_event_bus_redis.create_producer' | ||
EVENT_BUS_REDIS_CONNECTION_URL = 'redis://:[email protected]:6379/' | ||
EVENT_BUS_TOPIC_PREFIX = 'dev' | ||
|
||
##################################################################### | ||
# Lastly, see if the developer has any local overrides. | ||
if os.path.isfile(join(dirname(abspath(__file__)), 'private.py')): | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -49,8 +49,9 @@ edx-django-release-util | |
edx-django-sites-extensions | ||
edx-django-utils | ||
edx-drf-extensions | ||
# edx-event-bus-kafka 3.7.0 introduces `reset_offsets_and_sleep_indefinitely` | ||
edx-event-bus-kafka>=3.7.1 | ||
navinkarkera marked this conversation as resolved.
Show resolved
Hide resolved
|
||
# edx-event-bus-kafka 4.0.0 adds support for configurable consumer API | ||
edx-event-bus-kafka>=4.0.1 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can't we just remove this constraint? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is a pattern we've been following in some repos in order to prevent accidental regressions -- when we depend on a new API from some library, we bump the min-version constraint. We've occasionally seen unintended downgrades when a transitive dependency conflict occurs, and the pip constraint solver decides that the right answer is to downgrade some other dependencies. It's not essential to use this, though, and I'd be OK with removing it. I'll also note that it's also a tool people sometimes use in order to do a "surgical upgrade" of one library, like the new |
||
edx-event-bus-redis | ||
edx-opaque-keys | ||
edx-rest-api-client | ||
elasticsearch | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed names to make it generic
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[inform] I don't see any overrides in 2U's configuration repos, so this change should be safe to do without further coordination.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
...cancel that, there are references to the second one,
EVENT_BUS_KAFKA_MESSAGE_DELAY_THRESHOLD_SECONDS
. Repo owners will need to review and make some config changes in advance.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Internal PR for updating these ahead of time: https://github.com/edx/edx-internal/pull/8376
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, the configs have been updated to use the new generic name, so we should be unblocked here.