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 enums #2636

Merged
merged 7 commits into from
Oct 27, 2023
Merged

Fix enums #2636

merged 7 commits into from
Oct 27, 2023

Conversation

seallard
Copy link
Contributor

@seallard seallard commented Oct 27, 2023

Description

This PR patches a breaking change in Python 3.11 related to enum mixins, see python/cpython#100458. Closes #2618.

I think this bug explains the weird values seen in the ticketing service.

To resolve the issue, all instances of

from cg.utils.enums import StrEnum
from cg.utils.enums import IntEnum

were replaced with

from enum import StrEnum
from enum import IntEnum

It might be the case that some database tables need to be patched 🥲

Fixed

  • Broken enums

This version is a

  • PATCH - when you make backwards compatible bug fixes or documentation/instructions

Implementation Plan

  • Document in ...
  • Deploy this branch on ...
  • Inform to ...

@seallard seallard requested a review from a team as a code owner October 27, 2023 07:40
Copy link
Contributor

@diitaz93 diitaz93 left a comment

Choose a reason for hiding this comment

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

💯

@clingen-sthlm clingen-sthlm temporarily deployed to stage October 27, 2023 07:50 Inactive
Copy link
Contributor

@islean islean left a comment

Choose a reason for hiding this comment

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

🔥

@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@clingen-sthlm clingen-sthlm temporarily deployed to stage October 27, 2023 08:54 Inactive
@seallard
Copy link
Contributor Author

@seallard seallard merged commit 0d4d035 into master Oct 27, 2023
@seallard seallard deleted the fix-enums branch October 27, 2023 08:57
@henrikstranneheim
Copy link
Contributor

Good catch 🥇 . Now we should be able to remove.value safely for these enum classes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Broken priority value presented in Susy order summaries
5 participants