Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix saving ingress data on supervisor shutdown #4672

Merged
merged 2 commits into from
Nov 7, 2023

Conversation

mdegat01
Copy link
Contributor

@mdegat01 mdegat01 commented Nov 7, 2023

Proposed change

#4152 broke supervisor's ability to save ingress session data on shutdown because it puts dataclasses directly into _data and validation expects dictionaries. Fix this by ensuring _data is always a serializable dictionary representation of ingress data and converting to the dataclasses as necessary in methods.

Type of change

  • Dependency upgrade
  • Bugfix (non-breaking change which fixes an issue)
  • New feature (which adds functionality to the supervisor)
  • Breaking change (fix/feature causing existing functionality to break)
  • Code quality improvements to existing code or addition of tests

Additional information

Checklist

  • The code change is tested and works locally.
  • Local tests pass. Your PR cannot be merged unless tests pass
  • There is no commented out code in this PR.
  • I have followed the development checklist
  • The code has been formatted using Black (black --fast supervisor tests)
  • Tests have been added to verify that the new code works.

If API endpoints of add-on configuration are added/changed:

@mdegat01 mdegat01 force-pushed the fix-saving-ingress-data branch from 3e146f2 to 8cd11b9 Compare November 7, 2023 17:06
@pvizeli pvizeli added the bugfix A bug fix label Nov 7, 2023
@mdegat01 mdegat01 merged commit 87385cf into main Nov 7, 2023
22 checks passed
@mdegat01 mdegat01 deleted the fix-saving-ingress-data branch November 7, 2023 18:07
@github-actions github-actions bot locked and limited conversation to collaborators Nov 9, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Can't parse data: expected a dictionary for dictionary value @ data['session_data']
2 participants