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

Remove backwards compat hack from EventContext serialzation code  #15777

@H-Shay

Description

@H-Shay

#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.

Metadata

Metadata

Assignees

Labels

O-UncommonMost users are unlikely to come across this or unexpected workflowS-TolerableMinor significance, cosmetic issues, low or no impact to users.T-TaskRefactoring, removal, replacement, enabling or disabling functionality, other engineering tasks.Z-Future-MaintenanceThings that can't yet be done, but will need cleaning up in a couple of months/releases

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions