Skip to content

Commit

Permalink
Remove no longer used waiting_exits from flow inspection
Browse files Browse the repository at this point in the history
  • Loading branch information
rowanseymour committed Dec 16, 2024
1 parent 75dc1d0 commit 8f511af
Show file tree
Hide file tree
Showing 3 changed files with 152 additions and 157 deletions.
303 changes: 151 additions & 152 deletions media/test_flows/mixed_versions.json
Original file line number Diff line number Diff line change
@@ -1,162 +1,161 @@
{
"version": "11.12",
"site": "https://app.rapidpro.io",
"flows": [
{
"uuid": "b4af4237-3a0d-4ee2-9ef3-01658c9215e4",
"name": "New Child",
"spec_version": "13.0.0",
"language": "eng",
"type": "messaging",
"revision": 5,
"expire_after_minutes": 10080,
"localization": {},
"nodes": [
"version": "11.12",
"site": "https://app.rapidpro.io",
"flows": [
{
"uuid": "54393466-b5a3-4cba-a032-920b62a377bb",
"actions": [
{
"type": "send_msg",
"uuid": "c6a26419-37d0-47c8-9785-c99f1ce83644",
"text": "Welcome to the child flow"
},
{
"type": "add_input_labels",
"uuid": "0d04cd6b-de35-4077-83be-7b1b8a2b056b",
"labels": [
"uuid": "b4af4237-3a0d-4ee2-9ef3-01658c9215e4",
"name": "New Child",
"spec_version": "13.0.0",
"language": "eng",
"type": "messaging",
"revision": 5,
"expire_after_minutes": 10080,
"localization": {},
"nodes": [
{
"uuid": "a8a6d847-0785-4f97-a8f8-3af98ed111a0",
"name": "Interesting"
"uuid": "54393466-b5a3-4cba-a032-920b62a377bb",
"actions": [
{
"type": "send_msg",
"uuid": "c6a26419-37d0-47c8-9785-c99f1ce83644",
"text": "Welcome to the child flow"
},
{
"type": "add_input_labels",
"uuid": "0d04cd6b-de35-4077-83be-7b1b8a2b056b",
"labels": [
{
"uuid": "a8a6d847-0785-4f97-a8f8-3af98ed111a0",
"name": "Interesting"
}
]
},
{
"type": "add_contact_groups",
"uuid": "22cb0ec6-c915-4a9f-9256-bcab549dabe0",
"groups": [
{
"uuid": "7faadc84-73f6-49c4-812a-d49ed1c8c1ce",
"name": "Survey Audience"
}
]
}
],
"exits": [
{
"uuid": "c8b7ac23-9d47-45b8-aa34-49297de44c84"
}
]
}
]
},
{
"type": "add_contact_groups",
"uuid": "22cb0ec6-c915-4a9f-9256-bcab549dabe0",
"groups": [
{
"uuid": "7faadc84-73f6-49c4-812a-d49ed1c8c1ce",
"name": "Survey Audience"
],
"_ui": {
"nodes": {
"54393466-b5a3-4cba-a032-920b62a377bb": {
"position": {
"left": 0,
"top": 0
},
"type": "execute_actions"
}
}
]
}
],
"exits": [
{
"uuid": "c8b7ac23-9d47-45b8-aa34-49297de44c84"
}
]
}
],
"_ui": {
"nodes": {
"54393466-b5a3-4cba-a032-920b62a377bb": {
"position": {
"left": 0,
"top": 0
},
"type": "execute_actions"
}
}
},
"_dependencies": {
"groups": [
{
"uuid": "7faadc84-73f6-49c4-812a-d49ed1c8c1ce",
"name": "Survey Audience"
}
],
"labels": [
{
"uuid": "a8a6d847-0785-4f97-a8f8-3af98ed111a0",
"name": "Interesting"
}
]
},
"_results": [],
"_waiting_exits": []
},
{
"entry": "ab20858a-5fcd-492a-9a9d-208d6d4d9593",
"action_sets": [
{
"uuid": "ab20858a-5fcd-492a-9a9d-208d6d4d9593",
"x": 100,
"y": 0,
"destination": "67c3e969-fe81-43cd-9f9d-059935874379",
"actions": [
{
"type": "reply",
"uuid": "185c454f-0617-45eb-bbf2-59d1bb8fb500",
"msg": {
"eng": "Welcome to the parent flow"
},
"media": {},
"quick_replies": [],
"send_all": false
}
],
"exit_uuid": "4671b83f-8a1a-450c-8b8d-31dffc461d41"
}
],
"rule_sets": [
{
"uuid": "67c3e969-fe81-43cd-9f9d-059935874379",
"x": 275,
"y": 95,
"label": "Subflow",
"rules": [
{
"uuid": "0fea6668-f1c5-4a70-a99b-290d55f15633",
"category": {
"eng": "Completed"
},
"destination": null,
"destination_type": null,
"test": {
"type": "subflow",
"exit_type": "completed"
},
"label": null
"_dependencies": {
"groups": [
{
"uuid": "7faadc84-73f6-49c4-812a-d49ed1c8c1ce",
"name": "Survey Audience"
}
],
"labels": [
{
"uuid": "a8a6d847-0785-4f97-a8f8-3af98ed111a0",
"name": "Interesting"
}
]
},
{
"uuid": "e7337d15-93e2-46ce-ae51-8cc96c9f5387",
"category": {
"eng": "Expired"
},
"destination": null,
"destination_type": null,
"test": {
"type": "subflow",
"exit_type": "expired"
},
"label": null
}
],
"finished_key": null,
"ruleset_type": "subflow",
"response_type": "",
"operand": "@step.value",
"config": {
"flow": {
"name": "New Child",
"uuid": "b4af4237-3a0d-4ee2-9ef3-01658c9215e4"
"_results": []
},
{
"entry": "ab20858a-5fcd-492a-9a9d-208d6d4d9593",
"action_sets": [
{
"uuid": "ab20858a-5fcd-492a-9a9d-208d6d4d9593",
"x": 100,
"y": 0,
"destination": "67c3e969-fe81-43cd-9f9d-059935874379",
"actions": [
{
"type": "reply",
"uuid": "185c454f-0617-45eb-bbf2-59d1bb8fb500",
"msg": {
"eng": "Welcome to the parent flow"
},
"media": {},
"quick_replies": [],
"send_all": false
}
],
"exit_uuid": "4671b83f-8a1a-450c-8b8d-31dffc461d41"
}
],
"rule_sets": [
{
"uuid": "67c3e969-fe81-43cd-9f9d-059935874379",
"x": 275,
"y": 95,
"label": "Subflow",
"rules": [
{
"uuid": "0fea6668-f1c5-4a70-a99b-290d55f15633",
"category": {
"eng": "Completed"
},
"destination": null,
"destination_type": null,
"test": {
"type": "subflow",
"exit_type": "completed"
},
"label": null
},
{
"uuid": "e7337d15-93e2-46ce-ae51-8cc96c9f5387",
"category": {
"eng": "Expired"
},
"destination": null,
"destination_type": null,
"test": {
"type": "subflow",
"exit_type": "expired"
},
"label": null
}
],
"finished_key": null,
"ruleset_type": "subflow",
"response_type": "",
"operand": "@step.value",
"config": {
"flow": {
"name": "New Child",
"uuid": "b4af4237-3a0d-4ee2-9ef3-01658c9215e4"
}
}
}
],
"base_language": "eng",
"flow_type": "M",
"version": "11.12",
"metadata": {
"uuid": "70212996-6bea-4229-bbd3-55e5cd607049",
"name": "Legacy Parent",
"saved_on": "2019-05-30T20:11:49.587074Z",
"revision": 5,
"expires": 10080
}
}
}
],
"base_language": "eng",
"flow_type": "M",
"version": "11.12",
"metadata": {
"uuid": "70212996-6bea-4229-bbd3-55e5cd607049",
"name": "Legacy Parent",
"saved_on": "2019-05-30T20:11:49.587074Z",
"revision": 5,
"expires": 10080
}
}
],
"campaigns": [],
"triggers": []
],
"campaigns": [],
"triggers": []
}
3 changes: 0 additions & 3 deletions temba/flows/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,14 +66,12 @@ class Flow(LegacyUUIDMixin, TembaModel, DependencyMixin):
# items in metadata
METADATA_RESULTS = "results"
METADATA_DEPENDENCIES = "dependencies"
METADATA_WAITING_EXIT_UUIDS = "waiting_exit_uuids"
METADATA_PARENT_REFS = "parent_refs"
METADATA_IVR_RETRY = "ivr_retry"

# items in the response from mailroom flow inspection
INSPECT_RESULTS = "results"
INSPECT_DEPENDENCIES = "dependencies"
INSPECT_WAITING_EXITS = "waiting_exits"
INSPECT_PARENT_REFS = "parent_refs"
INSPECT_ISSUES = "issues"

Expand Down Expand Up @@ -696,7 +694,6 @@ def get_metadata(cls, flow_info) -> dict:
return {
Flow.METADATA_RESULTS: flow_info[Flow.INSPECT_RESULTS],
Flow.METADATA_DEPENDENCIES: flow_info[Flow.INSPECT_DEPENDENCIES],
Flow.METADATA_WAITING_EXIT_UUIDS: flow_info[Flow.INSPECT_WAITING_EXITS],
Flow.METADATA_PARENT_REFS: flow_info[Flow.INSPECT_PARENT_REFS],
}

Expand Down
3 changes: 1 addition & 2 deletions temba/tests/mailroom.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,13 +95,12 @@ def contact_export_preview(self, total: int):
def contact_urns(self, urns: dict):
self._contact_urns.append(urns)

def flow_inspect(self, *, dependencies=(), issues=(), results=(), waiting_exits=(), parent_refs=()):
def flow_inspect(self, *, dependencies=(), issues=(), results=(), parent_refs=()):
self._flow_inspect.append(
{
"dependencies": dependencies,
"issues": issues,
"results": results,
"waiting_exits": waiting_exits,
"parent_refs": parent_refs,
}
)
Expand Down

0 comments on commit 8f511af

Please sign in to comment.