Skip to content

Fix response class schema#11510

Merged
adleong merged 1 commit intomainfrom
alex/nice-schema---not
Oct 20, 2023
Merged

Fix response class schema#11510
adleong merged 1 commit intomainfrom
alex/nice-schema---not

Conversation

@adleong
Copy link
Member

@adleong adleong commented Oct 19, 2023

Fixes #11483

Service profile's response class schema indicates that a not response match should be an array. This is incorrect and parsing of the response class will fail if an array is provided.

Update the schema to properly indicate that not's value should be an object.

Signed-off-by: Alex Leong <[email protected]>
@adleong adleong requested a review from a team as a code owner October 19, 2023 19:38
olix0r
olix0r previously approved these changes Oct 19, 2023
@olix0r olix0r dismissed their stale review October 19, 2023 19:54

hold up

@olix0r
Copy link
Member

olix0r commented Oct 19, 2023

How will this work for ServiceProfile resources that exist out there today with the array form?

Is it safe for us to change the semantics of a CRD in place? Does this require a version change or migration?

@adleong
Copy link
Member Author

adleong commented Oct 19, 2023

It's likely there aren't any ServiceProfiles that exist today with a not response match because it is currently impossible for them to pass validation. If validation were bypassed, the destination controller would not be able to deserialize these ServiceProfiles with array form and therefore wouldn't have been honored anyway.

I think an in-place fix is appropriate here.

@adleong adleong merged commit cca3cf8 into main Oct 20, 2023
@adleong adleong deleted the alex/nice-schema---not branch October 20, 2023 22:17
mateiidavid added a commit that referenced this pull request Oct 27, 2023
This edge release includes a fix for the `ServiceProfile` CRD resource schema.
The schema incorrectly required `not` response matches to be arrays, while the
in-cluster validator parsed `not` response matches as objects. In addition, an
issues has been fixed in `linkerd profile`. When used with the `--open-api`
flag, it would not strip trailing slashes when generating a resource from
swagger specifications.

* Fixed an issue where trailing slashes wouldn't be stripped when generating
  `ServiceProfile` resources through `linkerd profile --open-api` ([#11519])
* Fixed an issue in the `ServiceProfile` CRD schema. The schema incorrectly
  required that a `not` response match should be an array, which the service
  profile validator rejected since it expected an object. The schema has been
  updated to properly indicate that `not` values should be an object ([#11510];
  fixes [#11483])
* Improved logging in the destination controller by adding the client pod's
  name to the logging context. This will improve visibility into the messages
  sent and received by the control plane from a specific proxy ([#11532])
* Fixed an issue in the destination controller where the metadata API would not
  initialize a `Job` informer. The destination controller uses the metadata API
  to retrieve `Job` metadata, and relies mostly on informers. Without an
  initialized informer, an error message would be logged, and the controller
  relied on direct API calls ([#11541]; fixes [#11531])

[#11541]: #11532
[#11532]: #11532
[#11531]: #11531
[#11519]: #11519
[#11510]: #11510
[#11483]: #11483

Signed-off-by: Matei David <[email protected]>
@mateiidavid mateiidavid mentioned this pull request Oct 27, 2023
mateiidavid added a commit that referenced this pull request Oct 27, 2023
This edge release includes a fix for the `ServiceProfile` CRD resource schema.
The schema incorrectly required `not` response matches to be arrays, while the
in-cluster validator parsed `not` response matches as objects. In addition, an
issues has been fixed in `linkerd profile`. When used with the `--open-api`
flag, it would not strip trailing slashes when generating a resource from
swagger specifications.

* Fixed an issue where trailing slashes wouldn't be stripped when generating
  `ServiceProfile` resources through `linkerd profile --open-api` ([#11519])
* Fixed an issue in the `ServiceProfile` CRD schema. The schema incorrectly
  required that a `not` response match should be an array, which the service
  profile validator rejected since it expected an object. The schema has been
  updated to properly indicate that `not` values should be an object ([#11510];
  fixes [#11483])
* Improved logging in the destination controller by adding the client pod's
  name to the logging context. This will improve visibility into the messages
  sent and received by the control plane from a specific proxy ([#11532])
* Fixed an issue in the destination controller where the metadata API would not
  initialize a `Job` informer. The destination controller uses the metadata API
  to retrieve `Job` metadata, and relies mostly on informers. Without an
  initialized informer, an error message would be logged, and the controller
  relied on direct API calls ([#11541]; fixes [#11531])

[#11541]: #11532
[#11532]: #11532
[#11531]: #11531
[#11519]: #11519
[#11510]: #11510
[#11483]: #11483

Signed-off-by: Matei David <[email protected]>
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.

Incorrect schema for responseClasses.condition.not in service profile

3 participants