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

[Core] Fix unpacking issue in unregister raw function #870

Merged
merged 9 commits into from
Aug 4, 2024
Merged

Conversation

mk-armah
Copy link
Member

@mk-armah mk-armah commented Aug 1, 2024

Description

Fix unpacking error in unregister raw:

What - Resolved an issue in the unregister_raw method where an incorrect unpacking operation was causing a ValueError ("not enough values to unpack (expected 2, got 1)").

Why - This error occurred because the method was incorrectly expecting a tuple of entities and errors from the asyncio.gather call, but only receiving a single list due to the absence of zip unpacking.

How -The fix involved using zip to correctly unpack the results into entities and errors, and then flattening these lists to handle multiple resource mappings properly. This change ensures that the method correctly processes the output of the asynchronous tasks and handles errors appropriately.

Type of change

Please leave one option from the following and delete the rest:

  • Bug fix (non-breaking change which fixes an issue)

Screenshots

Include screenshots from your environment showing how the resources of the integration will look.

API Documentation

Provide links to the API documentation used for this integration.

@github-actions github-actions bot added the size/S label Aug 1, 2024
Copy link
Member

@matan84 matan84 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good job, left one comment

CHANGELOG.md Outdated Show resolved Hide resolved
@mk-armah mk-armah changed the title Fix unpacking issue in unregister raw function [Core] Fix unpacking issue in unregister raw function Aug 1, 2024
Copy link
Collaborator

@yairsimantov20 yairsimantov20 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🌊
Good job!

Copy link
Member

@matan84 matan84 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Tankilevitch Tankilevitch merged commit 7f75c02 into main Aug 4, 2024
7 checks passed
@Tankilevitch Tankilevitch deleted the bug/ocean branch August 4, 2024 08:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants