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

SONAR-23559 Improves editions and versions setting for sonarqube chart #606

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

davividal
Copy link
Collaborator

@davividal davividal commented Dec 13, 2024

@davividal davividal requested review from jCOTINEAU and carminevassallo and removed request for jCOTINEAU December 13, 2024 14:31
Copy link

Copy link
Collaborator

@carminevassallo carminevassallo left a comment

Choose a reason for hiding this comment

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

Hi @davividal,

the basic logic works, I could validate locally 🎉

However, there are a few things that I'd suggest we improve. Please let me know your opinion.

cd "$(dirname "$0")/../tests/dynamic-compatibility-test"

go mod tidy
go test -timeout=0 -v schema_test.go
Copy link
Collaborator

Choose a reason for hiding this comment

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

It's super cool that you added more tests! It will be then easier to spot the existence of drift from our desired tagging logic! However, I consider this as static tests, as they do not require to apply our helm chart to a cluster and run SonarQube. Can we move schema_test.go to the unit-compatibility-test folder?

}
}
},
"allOf": [
Copy link
Collaborator

@carminevassallo carminevassallo Dec 20, 2024

Choose a reason for hiding this comment

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

Based on the acceptance criteria of the task, I think that adding this strong validation of the fields is not required.

Specifically, when edition is set, as of now we always favor this, regardless of whether community.enabled is set or not. The downside of adding the strong validation is to have quite a few warnings (not really meaningful) written when edition is not set.

E.g.

Error: values don't meet the specifications of the schema(s) in the following chart(s):
sonarqube:
- (root): Must validate "then" as "if" was valid
- (root): edition is required
- (root): Must validate all the schemas (allOf)

Only the second warning is really actionable.

Having said that, shall we simplify the validation? wdyt? You might also look at this PR and the usage of the fail-fast mechanism in charts/sonarqube-dce/templates/validation.yaml

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.

2 participants