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 #2861

Closed
wants to merge 2 commits into from

Conversation

vchrisb
Copy link
Contributor

@vchrisb vchrisb commented Apr 29, 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 vchrisb deleted the branch cloudfoundry:v8 April 29, 2024 12:00
@vchrisb vchrisb closed this Apr 29, 2024
@vchrisb vchrisb deleted the v8 branch April 29, 2024 12:00
@vchrisb vchrisb restored the v8 branch April 29, 2024 12:01
@vchrisb vchrisb reopened this Apr 29, 2024
@gururajsh
Copy link
Member

@vchrisb We had some environment issues and integration tests did not run. Can you please update the branch and reopen the PR? Also, can you please create a separate PR for main?

@vchrisb vchrisb closed this May 3, 2024
@vchrisb vchrisb deleted the v8 branch May 3, 2024 03:21
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