Skip to content

Commit

Permalink
feat: [EDXOLDMNG-218] Marks new events as incompatible with the event…
Browse files Browse the repository at this point in the history
… bus
  • Loading branch information
NikolayBorovenskiy committed Jan 18, 2023
1 parent cb01610 commit 4015419
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion openedx_events/content_authoring/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,5 +133,5 @@ class CertificateConfigData:
certificate_type = attr.ib(type=str)
course_key = attr.ib(type=CourseKey)
title = attr.ib(type=str)
signatories = attr.ib(type=List[CertificateSignatoryData])
signatories = attr.ib(type=List[CertificateSignatoryData], factory=list)
is_active = attr.ib(type=bool, default=False)
2 changes: 2 additions & 0 deletions openedx_events/content_authoring/signals.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@
# .. event_type: org.openedx.content_authoring.course.certificate_config.changed.v1
# .. event_name: COURSE_CERTIFICATE_CONFIG_CHANGED
# .. event_description: Fired when a course certificate configuration changes in Studio.
# Warning: This event is currently incompatible with the event bus, list/dict cannot be serialized yet
# .. event_data: CertificateConfigData
COURSE_CERTIFICATE_CONFIG_CHANGED = OpenEdxPublicSignal(
event_type="org.openedx.content_authoring.course.certificate_config.changed.v1",
Expand All @@ -83,6 +84,7 @@
# .. event_type: org.openedx.content_authoring.course.certificate_config.deleted.v1
# .. event_name: COURSE_CERTIFICATE_CONFIG_DELETED
# .. event_description: Fired when a course certificate configuration deletes in Studio.
# Warning: This event is currently incompatible with the event bus, list/dict cannot be serialized yet
# .. event_data: CertificateConfigData
COURSE_CERTIFICATE_CONFIG_DELETED = OpenEdxPublicSignal(
event_type="org.openedx.content_authoring.course.certificate_config.deleted.v1",
Expand Down
6 changes: 5 additions & 1 deletion openedx_events/event_bus/avro/tests/test_avro.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,11 @@

# If a signal is explicitly not for use with the event bus, add it to this list
# and document why in the event's annotations
KNOWN_UNSERIALIZABLE_SIGNALS = ["org.openedx.learning.discussions.configuration.changed.v1"]
KNOWN_UNSERIALIZABLE_SIGNALS = [
"org.openedx.learning.discussions.configuration.changed.v1",
"org.openedx.content_authoring.course.certificate_config.changed.v1",
"org.openedx.content_authoring.course.certificate_config.deleted.v1",
]


def generate_test_event_data_for_data_type(data_type):
Expand Down

0 comments on commit 4015419

Please sign in to comment.