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

Support "canonical" handling of app and version labels #8122

Draft
wants to merge 13 commits into
base: master
Choose a base branch
from

Conversation

jshaughn
Copy link
Collaborator

@jshaughn jshaughn commented Feb 5, 2025

No description provided.

@jshaughn jshaughn self-assigned this Feb 5, 2025
@jshaughn jshaughn added test: back-end/integration PR adds/updates back-end tests (unit and/or integration) requires docs PR Requires kiali.io or other documentation updates requires operator PR It requires update in operator code labels Feb 5, 2025
Copy link
Collaborator

@jmazzitelli jmazzitelli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In all of the unit tests, you have now added this:

	conf.IstioLabels.AppLabelName = "app"
	conf.IstioLabels.VersionLabelName = "version"

Why don't you have some of these tests set those to empty string? That will exercise your new code. And since all of the tests don't have the canonical or kubernetes.io labels, the tests should all pass still.

@jshaughn
Copy link
Collaborator Author

jshaughn commented Feb 5, 2025

Why don't you have some of these tests set those to empty string? That will exercise your new code. And since all of the tests don't have the canonical or kubernetes.io labels, the tests should all pass still.

Yes, this is a Draft PR, I'm not done coding but I wanted to start running CI. When all of the current tests are passing I'll write dedicated tests for the new use cases.

I originally thought the same as you, that the tests will still pass. But its not true because the way the tests are written is that they access the serverConfig settings directly. I didn't want to convert all of it so instead I used the existing tests to prove that things still work if the user DOES set the fields explicitly in the config. The new default will be that the config is unset, and that is what the pending tests will verify.

…nfig,

and use labelNames other than "app" and "version".

try to get the pod count right in the failing test
services, I think it screws up the caching.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
requires docs PR Requires kiali.io or other documentation updates requires operator PR It requires update in operator code test: back-end/integration PR adds/updates back-end tests (unit and/or integration)
Projects
Status: 👀 In review
Development

Successfully merging this pull request may close these issues.

2 participants