Skip to content

Commit

Permalink
Update IVA events topic name for consistency
Browse files Browse the repository at this point in the history
  • Loading branch information
TheByronHimes committed May 13, 2024
1 parent 0a9672d commit af5be39
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .devcontainer/.dev_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ notification_event_type: notification
notification_event_topic: notification_events
file_registered_event_topic: internal_file_registry
file_registered_event_type: file_registered
iva_events_topic: ivas
iva_state_changed_event_topic: ivas
iva_state_changed_event_type: iva_state_changed
user_events_topic: users
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ The service requires the following configuration parameters:
```


- **`iva_events_topic`** *(string)*: The name of the topic containing IVA events.
- **`iva_state_changed_event_topic`** *(string)*: The name of the topic containing IVA events.


Examples:
Expand Down
6 changes: 3 additions & 3 deletions config_schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -90,12 +90,12 @@
"title": "File Registered Event Type",
"type": "string"
},
"iva_events_topic": {
"iva_state_changed_event_topic": {
"description": "The name of the topic containing IVA events.",
"examples": [
"ivas"
],
"title": "Iva Events Topic",
"title": "Iva State Changed Event Topic",
"type": "string"
},
"iva_state_changed_event_type": {
Expand Down Expand Up @@ -227,7 +227,7 @@
"access_request_denied_event_type",
"file_registered_event_topic",
"file_registered_event_type",
"iva_events_topic",
"iva_state_changed_event_topic",
"iva_state_changed_event_type",
"service_instance_id",
"kafka_servers",
Expand Down
2 changes: 1 addition & 1 deletion example_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ db_name: users
file_registered_event_topic: internal_file_registry
file_registered_event_type: file_registered
generate_correlation_id: true
iva_events_topic: ivas
iva_state_changed_event_topic: ivas
iva_state_changed_event_type: iva_state_changed
kafka_security_protocol: PLAINTEXT
kafka_servers:
Expand Down
4 changes: 2 additions & 2 deletions src/nos/translators/inbound/event_sub.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ class EventSubTranslatorConfig(BaseSettings):
description="The type used for events detailing internally file registrations.",
examples=["file_registered"],
)
iva_events_topic: str = Field(
iva_state_changed_event_topic: str = Field(
default=...,
description="The name of the topic containing IVA events.",
examples=["ivas"],
Expand All @@ -80,7 +80,7 @@ def __init__(
self.topics_of_interest = [
config.access_request_events_topic,
config.file_registered_event_topic,
config.iva_events_topic,
config.iva_state_changed_event_topic,
]
self.types_of_interest = [
config.access_request_created_event_type,
Expand Down
2 changes: 1 addition & 1 deletion tests/fixtures/test_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ notification_event_type: notification
notification_event_topic: notification_events
file_registered_event_topic: internal_file_registry
file_registered_event_type: file_registered
iva_events_topic: ivas
iva_state_changed_event_topic: ivas
iva_state_changed_event_type: iva_state_changed
user_events_topic: users
4 changes: 2 additions & 2 deletions tests/test_orchestrator.py
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@ async def test_iva_state_change(
await joint_fixture.kafka.publish_event(
payload=trigger_event.model_dump(),
type_=joint_fixture.config.iva_state_changed_event_type,
topic=joint_fixture.config.iva_events_topic,
topic=joint_fixture.config.iva_state_changed_event_topic,
key=TEST_USER.user_id,
)

Expand Down Expand Up @@ -387,7 +387,7 @@ async def test_all_ivas_reset(joint_fixture: JointFixture):
await joint_fixture.kafka.publish_event(
payload=trigger_event.model_dump(),
type_=joint_fixture.config.iva_state_changed_event_type,
topic=joint_fixture.config.iva_events_topic,
topic=joint_fixture.config.iva_state_changed_event_topic,
key=f"all-{TEST_USER.user_id}",
)

Expand Down

0 comments on commit af5be39

Please sign in to comment.