Skip to content

LG-9810 Activating Profiles should be Atomic#8592

Merged
theabrad merged 5 commits intomainfrom
abrad-lg-9810-atomic-profiles
Jun 20, 2023
Merged

LG-9810 Activating Profiles should be Atomic#8592
theabrad merged 5 commits intomainfrom
abrad-lg-9810-atomic-profiles

Conversation

@theabrad
Copy link
Contributor

🎫 Ticket

LG-9810

🛠 Summary of changes

Wrapped all of our profile activate methods into transactions to make them atomic. This way if there are any errors when activate is called it will rollback to the previous state before the change.

theabrad added 3 commits June 13, 2023 15:47
changelog: Internal, IdV Profile States, Add transactions around all out
activate profile methods
@theabrad theabrad requested a review from a team June 13, 2023 20:07
Copy link
Contributor

@matthinz matthinz left a comment

Choose a reason for hiding this comment

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

Could we get tests for these methods? Maybe monkeypatch User.activate to raise, call each method, and verify that the fields are not changed?

@theabrad theabrad requested a review from matthinz June 16, 2023 18:48
Copy link
Contributor

@matthinz matthinz left a comment

Choose a reason for hiding this comment

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

👍 LGTM, nice work!

@theabrad theabrad merged commit 52e238c into main Jun 20, 2023
@theabrad theabrad deleted the abrad-lg-9810-atomic-profiles branch June 20, 2023 16:37
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.

2 participants