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

test: add local dev container for consuming event-bus events #332

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

pwnage101
Copy link
Contributor

Launching the new container:

(enterprise-subsidy) ubuntu@ip-10-13-20-242:~/edx-repos/enterprise-subsidy$ make dev.up
docker-compose -f /home/ubuntu/edx-repos/devstack/docker-compose.yml up -d redis
[+] Running 1/0
 ✔ Container edx.devstack.redis  Running                                                                                                                                                                                        0.0s 
docker-compose up -d
[+] Running 4/4
 ✔ Container enterprise-subsidy.memcache                                            Running                                                                                                                                     0.0s 
 ✔ Container enterprise-subsidy.mysql80                                             Running                                                                                                                                     0.0s 
 ✔ Container enterprise-subsidy.consume_learner_credit_course_enrollment_lifecycle  Started                                                                                                                                     0.3s 
 ✔ Container enterprise-subsidy.app                                                 Running                                                                                                                                     0.0s 

Checking that the container is running and 1) started, 2) consumed an event, and 3) produced a new event:

(enterprise-subsidy) ubuntu@ip-10-13-20-242:~/edx-repos/enterprise-subsidy$ make consume_learner_credit_course_enrollment_lifecycle-logs
docker-compose logs -f --tail=500 consume_learner_credit_course_enrollment_lifecycle
enterprise-subsidy.consume_learner_credit_course_enrollment_lifecycle  | 2025-01-09 19:21:04,807 INFO 7 [edx_event_bus_kafka.internal.consumer] [user None] [ip None] [request_id None] consumer.py:284 - Running consumer for {'full_topic': 'dev-learner-credit-course-enrollment-lifecycle', 'consumer_group': 'learner_credit_course_enrollment_lifecycle_dev'}
...
enterprise-subsidy.consume_learner_credit_course_enrollment_lifecycle  | 2025-01-09 19:26:14,819 INFO 7 [edx_event_bus_kafka.internal.consumer] [user None] [ip None] [request_id None] consumer.py:513 - Message received from Kafka: topic=dev-learner-credit-course-enrollment-lifecycle, partition=0, offset=3, message_id=97848778-cebf-11ef-ac26-0242ac120013, key=b'\x00\x00\x00\x00\x01H31f0cc88-1daf-4d28-b862-70367a70838a', event_timestamp_ms=1736450774790
...
[edx_event_bus_kafka.internal.producer] [user None] [ip None] [request_id None] producer.py:244 - Message delivered to Kafka event bus: topic=dev-enterprise-subsidies-transaction-lifecycle, partition=0, offset=21, message_id=97a1cd4c-cebf-11ef-a6d5-0242ac120020, key=b'\x00\x00\x00\x00\x01Heec30573-1aa7-4a0f-abff-31c7e5873ac8'

@pwnage101 pwnage101 force-pushed the pwnage101/ENT-9885-3 branch 2 times, most recently from 64f852e to a1c5dc1 Compare January 10, 2025 19:52
@pwnage101 pwnage101 force-pushed the pwnage101/ENT-9885-3 branch from a1c5dc1 to aba3dbd Compare January 10, 2025 19:53
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.

1 participant