Skip to content
This repository has been archived by the owner on Jul 6, 2022. It is now read-only.

Validate parent-child relationship in async step #591

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

norshtein
Copy link
Member

Close #589

@jeremyrickard
Copy link
Contributor

This change will likely break how things work with Kubernetes. Please do not merge it until we can discuss more.

if !parentFound {
return true, nil
return false, fmt.Errorf(
Copy link
Contributor

Choose a reason for hiding this comment

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

This was done to support the way things can be done with Kubernetes. Take a Helm chart that may declare both a parent and child instance. When these are created, Kubernetes via Service Catalog will make the request for both resources, but there isn't a way to constrain the order. Therefore, you could get the child before the parent. In this scenario, the change you've introduced would cause things to end up in a failure state.

@norshtein
Copy link
Member Author

Got that. Thanks for the explanation!

@norshtein norshtein force-pushed the validate-parent-child-relationship branch from f5c6278 to eaaf438 Compare October 8, 2018 03:31
@norshtein norshtein changed the title Validate parent-child relationship before provisioning Validate parent-child relationship in async step Oct 8, 2018
@zhongyi-zhang
Copy link
Contributor

Extending ParentServiceID to a set of IDs should be done before this change. Or, it would break the sql-dbms-registered service which was recently checked in. See catalog:
https://github.com/Azure/open-service-broker-azure/blob/master/pkg/services/mssql/catalog.go#L374
https://github.com/Azure/open-service-broker-azure/blob/master/pkg/services/mssql/catalog.go#L323
BTW, I think ChildServiceID can be minimized to a simple bool to identity whether it is a parent service.

@norshtein
Copy link
Member Author

Agree we should extend ParentServiceID to a set because registered services make parent-child relationship become a many-to-many relationship.
One question: do we really need a simple bool to identity whether it is a parent service? Anywhere this bool is used?

@zhongyi-zhang
Copy link
Contributor

@norshtein here: https://github.com/Azure/open-service-broker-azure/blob/master/pkg/service/schema.go#L544. The alias is appended to provisioning parameters if it is a parent service.

@norshtein
Copy link
Member Author

Thanks for pointing it out!

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

Successfully merging this pull request may close these issues.

3 participants