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] Idempotency when trying to share a service twice (v8) #2874

Merged
merged 2 commits into from
May 7, 2024

Conversation

vchrisb
Copy link
Contributor

@vchrisb vchrisb commented May 3, 2024

Where this PR should be backported?

  • main - all changes should by default start here
  • v8
  • v7

Description of the Change

While cf create-service has an Exitcode of 0 if a service with the name already exist, does cf share-service have an Exitcode of 1 for the similar situation.
This behavior is different to cf cli v7.

cli v7:

Sharing service instance foo into org test / space dev2 as admin...
Service instance foo is already shared with that space.
OK

cli v8:

Sharing service instance foo into org test / space dev2 as admin...
A service instance called foo has already been shared with dev2.
FAILED

The PR is changing the behavior of cf8 share-service to return an exit code of 0 if the service is already shared and make it consistent with v7.

Why Is This PR Valuable?

Make cf share-service idempotent and consistent with v7

Applicable Issues

#2669

How Urgent Is The Change?

Is the change urgent? If so, explain why it is time-sensitive.

Other Relevant Parties

Who else is affected by the change?

@vchrisb
Copy link
Contributor Author

vchrisb commented May 6, 2024

/easycla

Copy link
Member

@gururajsh gururajsh left a comment

Choose a reason for hiding this comment

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

LGTM

@gururajsh gururajsh merged commit 1240228 into cloudfoundry:v8 May 7, 2024
12 checks passed
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.

None yet

2 participants