Skip to content

Conversation

christarazi
Copy link
Member

In the previous iteration, the labels type was an interface{} which we
would type assert to the labels.LabelArray type. Upon investigation,
this failed most of the time, but for some reason it had worked before,
as the fixed commit was eventually merged.

This commit fixes it permanently by specifying the type in the OpenAPI
spec so that a type assertion is no longer needed.

Fixes: 1e41011 ("api, cmd, policy: Show rule labels in policy selectors output")

Reported-by: Tom Hadlaw tom.hadlaw@isovalent.com
Suggested-by: Tom Hadlaw tom.hadlaw@isovalent.com
Signed-off-by: Chris Tarazi chris@isovalent.com

In the previous iteration, the labels type was an interface{} which we
would type assert to the labels.LabelArray type. Upon investigation,
this failed most of the time, but for some reason it had worked before,
as the fixed commit was eventually merged.

This commit fixes it permanently by specifying the type in the OpenAPI
spec so that a type assertion is no longer needed.

Fixes: 1e41011 ("api, cmd, policy: Show rule labels in `policy
selectors` output")

Reported-by: Tom Hadlaw <tom.hadlaw@isovalent.com>
Suggested-by: Tom Hadlaw <tom.hadlaw@isovalent.com>
Signed-off-by: Chris Tarazi <chris@isovalent.com>
@christarazi christarazi requested review from a team as code owners November 13, 2023 23:39
@christarazi christarazi added the kind/bug This is a bug in the Cilium logic. label Nov 13, 2023
@christarazi christarazi requested a review from a team as a code owner November 13, 2023 23:39
@christarazi christarazi added sig/policy Impacts whether traffic is allowed or denied based on user-defined policies. release-note/misc This PR makes changes that have no direct user impact. labels Nov 13, 2023
@christarazi christarazi added the area/cli Impacts the command line interface of any command in the repository. label Nov 13, 2023
@christarazi
Copy link
Member Author

/test

@maintainer-s-little-helper maintainer-s-little-helper bot added the ready-to-merge This PR has passed all tests and received consensus from code owners to merge. label Nov 16, 2023
@nathanjsweet nathanjsweet merged commit 51dd966 into cilium:main Nov 16, 2023
@christarazi christarazi deleted the pr/christarazi/fix-selectors-labels-output branch November 16, 2023 22:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/cli Impacts the command line interface of any command in the repository. kind/bug This is a bug in the Cilium logic. ready-to-merge This PR has passed all tests and received consensus from code owners to merge. release-note/misc This PR makes changes that have no direct user impact. sig/policy Impacts whether traffic is allowed or denied based on user-defined policies.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants