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

Forbid not registered instances deregistration #1733

Merged
merged 2 commits into from
Aug 23, 2023

Conversation

arbulu89
Copy link
Contributor

@arbulu89 arbulu89 commented Aug 22, 2023

Description

Now that SAP instances deregistration will be triggered by external users, i want to enforce some better rules.
The application and database instances cannot be deregistered if they are not registered already.

PD: the new application_instance_not_registered and database_instance_not_registered atoms will be added to the fallback controller in next PRs, when they are really used

How was this tested?

Tested

@arbulu89 arbulu89 added the enhancement New feature or request label Aug 22, 2023
@arbulu89 arbulu89 marked this pull request as ready for review August 22, 2023 15:28
Copy link
Member

@CDimonaco CDimonaco left a comment

Choose a reason for hiding this comment

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

LGTM for me, just a nitpick we could order the clauses maybe_emit_application_instance_deregistered_event maybe_emit_database_instance_deregistered_event, to match the actual usage in the aggregate (invert the current order)

But it's really up to you, no strong opinions

@arbulu89
Copy link
Contributor Author

arbulu89 commented Aug 23, 2023

LGTM for me, just a nitpick we could order the clauses maybe_emit_application_instance_deregistered_event maybe_emit_database_instance_deregistered_event, to match the actual usage in the aggregate (invert the current order)

But it's really up to you, no strong opinions

Oh, yes, you are right! Good catch.
This should be a strong opinion indeed hehe
As we should enforce the order with precedence of occurrence

@CDimonaco
Copy link
Member

LGTM for me, just a nitpick we could order the clauses maybe_emit_application_instance_deregistered_event maybe_emit_database_instance_deregistered_event, to match the actual usage in the aggregate (invert the current order)
But it's really up to you, no strong opinions

Oh, yes, you are right! Good catch. This should be a strong opinion indeed hehe As we should enforce the order with precedence of occurrence

You're right, I was not strong on that because in the end they are two different functions and the clauses between same functions are already ordered, anyway lgtm, good job!

@rtorrero
Copy link
Contributor

Thanks @arbulu89, looks good to me 👍

@arbulu89 arbulu89 merged commit 5a1443a into main Aug 23, 2023
@arbulu89 arbulu89 deleted the avoid-not-registered-instances-deregistration branch August 23, 2023 13:36
EMaksy pushed a commit that referenced this pull request Aug 28, 2023
* Forbid not registered instances deregistration

* Invert order of appearance to follow usage precedence
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Development

Successfully merging this pull request may close these issues.

3 participants