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

Bugfix: entitlements multiplan #62

Merged
merged 15 commits into from
Dec 12, 2024
Merged

Conversation

sdischer-sap
Copy link
Member

@sdischer-sap sdischer-sap commented Dec 12, 2024

Description

This fixes a bug that caused multiple entitlements with same serviceName but different planName to get stuck in unhealthy state. It was caused by some false error handling in the observation logic.

Along with the fix I refactored and documented the related code a little to make it more readable since it was highly confusing. Also cleaned out some duplicated controller logic.

Unittests were added to properly validate the lookup of assigned services.

Copy link
Contributor

@lasse-sap lasse-sap left a comment

Choose a reason for hiding this comment

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

Is this the right behaviour? I would expect the controller to return an error in case the ServicePlan of an Entitlement could not be found, am I missing something here?

@sdischer-sap
Copy link
Member Author

sdischer-sap commented Dec 12, 2024

Is this the right behaviour? I would expect the controller to return an error in case the ServicePlan of an Entitlement could not be found, am I missing something here?

Any logic being touched here refers to the assignedServices. So that is just checking if the servicePlan is already set for the subaccount. The logic about what servicePlans are available to the subaccount for assignment are part of this entitledServices and the search within those still returns an error in case its not found.

Copy link
Contributor

@lasse-sap lasse-sap left a comment

Choose a reason for hiding this comment

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

Thanks for clarifying! LGTM

@sdischer-sap sdischer-sap merged commit 9829296 into main Dec 12, 2024
9 checks passed
@sdischer-sap sdischer-sap deleted the fix/entitlements_multiplan branch December 12, 2024 11:53
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