Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Remove backwards compat hack from EventContext serialzation code #15777

Closed
H-Shay opened this issue Jun 13, 2023 · 0 comments · Fixed by #16069
Closed

Remove backwards compat hack from EventContext serialzation code #15777

H-Shay opened this issue Jun 13, 2023 · 0 comments · Fixed by #16069
Assignees
Labels
O-Uncommon Most users are unlikely to come across this or unexpected workflow S-Tolerable Minor significance, cosmetic issues, low or no impact to users. T-Task Refactoring, removal, replacement, enabling or disabling functionality, other engineering tasks. Z-Future-Maintenance Things that can't yet be done, but will need cleaning up in a couple of months/releases

Comments

@H-Shay
Copy link
Contributor

H-Shay commented Jun 13, 2023

#15233 changed the format of EventContext and as such required two small hacks to make the serialization backwards compatible:

# workaround for backwards/forwards compatibility: if the input doesn't have a value
# for "state_group_deltas" just assign an empty dict
state_group_deltas = input.get("state_group_deltas", None)
if state_group_deltas:
state_group_deltas = _decode_state_group_delta(state_group_deltas)
else:
state_group_deltas = {}

# add dummy delta_ids and prev_group for backwards compatibility
"delta_ids": None,
"prev_group": None,

We should remove these after a few (let's say 4?) releases. The second one (lines 189-191) can just be removed, and the first one just requires a change:

state_group_deltas = _decode_state_group_delta(input["state_group_deltas"])

and the removal of the if statement.

@H-Shay H-Shay added T-Task Refactoring, removal, replacement, enabling or disabling functionality, other engineering tasks. O-Uncommon Most users are unlikely to come across this or unexpected workflow S-Tolerable Minor significance, cosmetic issues, low or no impact to users. Z-Future-Maintenance Things that can't yet be done, but will need cleaning up in a couple of months/releases labels Jun 13, 2023
@H-Shay H-Shay added this to the Revisit: Next Quarter milestone Jun 13, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
O-Uncommon Most users are unlikely to come across this or unexpected workflow S-Tolerable Minor significance, cosmetic issues, low or no impact to users. T-Task Refactoring, removal, replacement, enabling or disabling functionality, other engineering tasks. Z-Future-Maintenance Things that can't yet be done, but will need cleaning up in a couple of months/releases
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant