DefaultServices.updateInstance() rejects plan updates despites plan is updateable.
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 45/100
Research direction
Start at cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/services/DefaultServices.java lines 515-517 and compare the service definition and service plan updateability fields against the linked OSB and Cloud Foundry API definitions. Review the existing service instance update flow and its tests, if present. Done means valid plan updates are no longer rejected solely because the service definition is not updateable.
Written by the indexing model from the issue text.
Description
The OSB API states regarding a service offering metadata that its updateable flag can be overriden in plans.
https://github.com/openservicebrokerapi/servicebroker/blob/master/spec.md#service-offering-object
Response Field Type Description [...] plan_updateable boolean Whether the Service Offering supports upgrade/downgrade for Service Plans by default. Service Plans can override this field (see Service Plan). Please note that the misspelling of the attribute plan_updatable as plan_updateable was done by mistake. We have opted to keep that misspelling instead of fixing it and thus breaking backward compatibility. Defaults to false.
https://github.com/openservicebrokerapi/servicebroker/blob/master/spec.md#service-plan-object
Response Field Type Description [...] plan_updateable boolean Whether the Plan supports upgrade/downgrade/sidegrade to another version. This field is OPTIONAL. If specificed, this takes precedence over the Service Offering's plan_updateable field. If not specified, the default is derived from the Service Offering. Please note that the attribute is intentionally misspelled as plan_updateable for legacy reasons.
Unfortunately the CC API reuses the two fields, but isn't precise enough to state that plan.updateable override serviceoffering.plan_updateable
https://apidocs.cloudfoundry.org/12.42.0/services/retrieve_a_particular_service.html
Name Description Default Valid Values Example Values plan_updateable A boolean describing that an instance of this service can be updated to a different plan false
https://apidocs.cloudfoundry.org/12.42.0/service_plans/retrieve_a_particular_service_plan.html
"plan_updateable": true,
As a result, cf-java-client refuses service instance updates unless the service definition is updateable, regardless than the service plan is updateable.
Given that CloudFoundry itself likely performs the checks, is there any reason to also perform the check client-side ?
If there is a good reason, then the logic should be fixed to only reject when both serviceplan.plan_updateable=false and servicedefinition.plan_updateable=false
- Dominant language
- Java
- Stars
- 334
- Forks
- 319
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from cloudfoundry/cf-java-client
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
cloudfoundry/cf-java-client#1374 ·
-
Integration tests fail: test-service-broker.jar incompatible with java-buildpack v5 (JDK 17 default) Open
Difficulty 2/5 Half a day Newbie friendliness 74/100
cloudfoundry/cf-java-client#1344 · 1 comment ·
-
Difficulty 5/5 Over a week Newbie friendliness 15/100
cloudfoundry/cf-java-client#1373 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 55/100
cloudfoundry/cf-java-client#1370 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 45/100
cloudfoundry/cf-java-client#1367 ·
All issues in cloudfoundry/cf-java-client
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
checkstyle/test-configs#263 ·
-
bug
Difficulty 1/5 Under an hour Newbie friendliness 90/100
apache/cloudstack#14222 ·
-
[BUG]茶杯方块在取茶时会引发崩溃 Open
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
1.0.0-alpha2 Type/Improvement
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
wso2/dpdp-accelerator#272 ·