Skip to content

Conversation

@a-b
Copy link
Member

@a-b a-b commented Mar 10, 2022

Thank you for contributing to the CF CLI! Please read the following:

  • Please make sure you have implemented changes in line with the contributing guidelines
  • We're not allowed to accept any PRs without a signed CLA, no matter how small.
    If your contribution falls under a company CLA but your membership is not public, expect delays while we confirm.
  • All new code requires tests to protect against regressions.
  • Contributions must be made against the appropriate branch. See the contributing guidelines
  • Contributions must conform to our style guide. Please reach out to us if you have questions.

Does this PR modify CLI v6, CLI v7, or CLI v8?

It modifies CLI V8

Description of the Change

For the cf cs command, before V8 it was able to work in a idempotent way. The expected behavior was to be able to fulfill with an OK status the command even if the service name was already taken. Now, V8 fails in this scenario.
By looking into the code, this pattern was implemented but left the error handler when CAPI V3 answered with a 422 status code with the message
"the service instance name is taken".

Adding the message into the error handling function and everything works as expected.

Why Is This PR Valuable?

Enabling an expected behavior to the create-service command.

Why Should This Be In Core?

Bugifx.

Applicable Issues

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?

It was implemented everything for this feature but the error handler when
CAPI V3 answered with a 422 status code with the message
the service instance name is taken.
@a-b a-b requested a review from hjcalderon10 March 10, 2022 18:44
@a-b a-b marked this pull request as ready for review March 10, 2022 18:44
@a-b a-b changed the title [Bugfix] Idempotency when trying to create a service twice [Bugfix] [v8] Idempotency when trying to create a service twice Mar 10, 2022
@a-b a-b added the v8 label Mar 10, 2022
@a-b a-b merged commit 2b4e144 into v8 Mar 10, 2022
@a-b a-b deleted the bugfix/cf-cli-23-duplicate-service-creation-for-v8 branch March 10, 2022 18:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants