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: Casting UUID like str to UUID #487

Merged
merged 5 commits into from
Jun 24, 2022
Merged

Conversation

lizable
Copy link
Contributor

@lizable lizable commented Jun 22, 2022

Description

This PR resolves AttributeError triggered by unmatching type between UUID-like string and UUID object itself during updating the quota limit. Simply casting string value to UUID would workaround this issue.
It's been confirmed while reviewing #443, so It should be merged with it, too.
For more information, please check the UUID module definition in official python documentation (version 3.10.5).

Screenshot

Screen Shot 2022-06-22 at 7 14 08 PM

@lizable lizable added type:bug Reports about that are not working urgency:blocker IT SHOULD BE RESOLVED BEFORE NEXT RELEASE! comp:storage-proxy Related to Storage proxy component minor labels Jun 22, 2022
@lizable lizable added this to the 22.06 milestone Jun 22, 2022
@lizable lizable self-assigned this Jun 22, 2022
@lizable lizable changed the title Fix/casting UUID like str to UUID fix: Casting UUID like str to UUID Jun 23, 2022
Copy link
Member

@achimnol achimnol left a comment

Choose a reason for hiding this comment

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

I think this sould be handled using Trafaret, e.g., ai.backend.common.validators.UUID.

@achimnol achimnol merged commit 126126c into main Jun 24, 2022
@achimnol achimnol deleted the fix/casting-uuid-like-str-to-uuid branch June 24, 2022 03:33
@achimnol achimnol modified the milestones: 22.06, 22.03 Jun 24, 2022
achimnol pushed a commit that referenced this pull request Jun 24, 2022
…ta (#487)

Backported-From: main (22.06)
Backported-To: 22.03
@inureyes inureyes added effort:easy Need to understand only a specific region of codes (good first issue, easy). and removed minor labels Apr 10, 2023
@Yaminyam Yaminyam added the size:XS ~10 LoC label Apr 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
comp:storage-proxy Related to Storage proxy component effort:easy Need to understand only a specific region of codes (good first issue, easy). size:XS ~10 LoC type:bug Reports about that are not working urgency:blocker IT SHOULD BE RESOLVED BEFORE NEXT RELEASE!
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants