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

Enforce service name uniqueness in shared services in spaces #2521

Merged
merged 1 commit into from Sep 29, 2021

Conversation

JenGoldstrich
Copy link
Contributor

@JenGoldstrich JenGoldstrich commented Sep 28, 2021

Fixes #2306

Tested this locally on a bosh lite using the repro steps in the above issue,

$ cf share-service si -s target -o target
Sharing service instance si into org target / space target as admin...
A service instance called si has already been shared with target.
FAILED

Locally rake bundle exec rake spec and it passed.

Co-authored-by: Brandon Potts bpotts@vmware.com
Co-authored-by: Seth Boyles sboyles@pivotal.io
Co-authored-by: Jenna Goldstrich jgoldstrich@pivotal.io

Co-authored-by: Brandon Potts <bpotts@vmware.com>
Co-authored-by: Seth Boyles <sboyles@pivotal.io>
Co-authored-by: Jenna Goldstrich <jgoldstrich@pivotal.io>

This commit prevents a space from being shared if it contains a
service instance whose name is already in use in the target space.

This commit resolves GitHub issue #2306

This commit is a retry of a previous commit.

Co-authored-by: Brandon Potts <bpotts@vmware.com>
Co-authored-by: Seth Boyles <sboyles@pivotal.io>

Fix issue in unit tests where target_space would no longer update its
list of shared_services

Remove test that validated idempotant service_instance creates, this is
no longer valid as we are changing them to enforce name uniqueness

Authored-by: Jenna Goldstrich <jgoldstrich@pivotal.io>
@JenGoldstrich JenGoldstrich marked this pull request as ready for review September 28, 2021 21:04
Copy link
Contributor

@MarcPaquette MarcPaquette left a comment

Choose a reason for hiding this comment

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

LGTM

@MarcPaquette MarcPaquette merged commit 72d5012 into main Sep 29, 2021
@sweinstein22 sweinstein22 deleted the unique_shared_service branch December 29, 2021 15:52
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.

Cloud Controller API does not validate if 2 services with the same name are shared in the same spaces
4 participants