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

Regression with supported JSON schema on broker catalog #222

Closed
renelehmann opened this issue Jan 14, 2022 · 4 comments
Closed

Regression with supported JSON schema on broker catalog #222

renelehmann opened this issue Jan 14, 2022 · 4 comments

Comments

@renelehmann
Copy link

Issue

A regression has been detected between using cf-deployment v17.0.0 with capi-release 1.120.0 and cf-deployment v17.1.0 with capi-release 1.123.0.
Newer JSON schemas than draft-04 on the broker catalog which have been supported before aren't supported anymore.

On updating the broker CC errors e.g.:
Schema service_binding.create.parameters is not valid. Custom meta schemas are not supported.

With a catalog on the broker like that:

                  "service_binding": {
                    "create": {
                      "parameters": {
                        "$schema": "http://json-schema.org/draft-06/schema#",

Context

cf-deployment v17.1.0 with capi-release 1.123.0
broker with a catalog and parameters referring $schema draft-06.

Updating the catalog on CC errors (cf-cli 7.3.0):

cf update-service-broker broker brokeruser password https://broker.example.com
Updating service broker broker as ...
Job failed: Service broker catalog is invalid:
Service broker
  Plan free
    Schemas
      Schema service_binding.create.parameters is not valid. Custom meta schemas are not supported.

FAILED

Testings:
The update of CC (newer capi 1.123.0) with a catalog referring to schema draft-06 doesn't work.
The update of CC (newer capi 1.123.0) with a catalog referring to an older JSON schema draft-04 works.
The update of CC (older capi 1.120.0) with a catalog referring to schema draft-06 works.

Expected result

capi should support at least JSON $schema draft-06 as it was before the regression.

Current result

capi-releases with and between 1.121.0 and 1.123.0 doesn't support https://json-schema.org/ draft-06 anymore but does support JSON schema draft-04.

@philippthun
Copy link
Member

Hi @renelehmann, it seems you have to adapt the JSON itself. Cloud Controller now uses json-schema gem version 2.8.1; according to the changelog, draft-06/schema# is not valid anymore:

Corrected the draft6 schema id to http://json-schema.org/draft/schema#

@renelehmann
Copy link
Author

Thanks a lot @philippthun for the hint. It looks like we have a breaking change if "draft-06" is used and "draft" cannot be referred on the previous capi versions.

@philippthun
Copy link
Member

@philippthun
Copy link
Member

The json-schema gem has been reverted to version 2.8.0. The link for JSON schema draft 6 is https://json-schema.org/draft-06/schema.

This change will be included in the next capi-release (CAPI 1.128.0).

Note: As a workaround, changing the JSON schema to "draft-4" should mitigate the problem (this is also the version guaranteed to work: "Platforms MUST support at least JSON Schema draft v4.").

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

No branches or pull requests

3 participants