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

feat: optimize []string annotation #6921

Conversation

dongjiang1989
Copy link
Contributor

@dongjiang1989 dongjiang1989 commented Sep 10, 2024

Description

Describe the big picture of your changes here to communicate to the maintainers why we should accept this pull request.
If it fixes a bug or resolves a feature request, be sure to link to that issue.

optimize []string kubebuilder annotation

Type of change

What type of changes does your code introduce to the Prometheus operator? Put an x in the box that apply.

  • CHANGE (fix or feature that would cause existing functionality to not work as expected)
  • FEATURE (non-breaking change which adds functionality)
  • BUGFIX (non-breaking change which fixes an issue)
  • [] ENHANCEMENT (non-breaking change which improves existing functionality)
  • NONE (if none of the other choices apply. Example, tooling, build system, CI, docs, etc.)

Verification

Please check the Prometheus-Operator testing guidelines for recommendations about automated tests.

Changelog entry

Please put a one-line changelog entry below. This will be copied to the changelog file during the release process.

optimize []string annotation

Signed-off-by: dongjiang1989 <[email protected]>
@dongjiang1989 dongjiang1989 marked this pull request as ready for review September 10, 2024 07:57
@dongjiang1989 dongjiang1989 requested a review from a team as a code owner September 10, 2024 07:57
Signed-off-by: dongjiang1989 <[email protected]>
Copy link
Contributor

@simonpasquier simonpasquier left a comment

Choose a reason for hiding this comment

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

Thanks for the PR! We can't change validations on v1 APIs unfortunately (at least not being stricter as it could break users). I'd also be reluctant to change v1beta1 APIs and v1alpha1 AlertmanagerConfig is frozen. Which basically leaves us with the v1alpha1 ScrapeConfig CRD.

We'd need e2e tests too for each added validation.

cc @mviswanathsai

@dongjiang1989
Copy link
Contributor Author

dongjiang1989 commented Sep 10, 2024

Thanks for the PR! We can't change validations on v1 APIs unfortunately (at least not being stricter as it could break users). I'd also be reluctant to change v1beta1 APIs and v1alpha1 AlertmanagerConfig is frozen. Which basically leaves us with the v1alpha1 ScrapeConfig CRD.

We'd need e2e tests too for each added validation.

cc @mviswanathsai

Thanks. @simonpasquier
I Got it. Change CRD and add e2e test cases done.

Signed-off-by: dongjiang1989 <[email protected]>
@pull-request-size pull-request-size bot added size/M and removed size/L labels Sep 10, 2024
Signed-off-by: dongjiang1989 <[email protected]>
Signed-off-by: dongjiang1989 <[email protected]>
@pull-request-size pull-request-size bot added size/L and removed size/M labels Sep 10, 2024
Signed-off-by: dongjiang1989 <[email protected]>
Signed-off-by: dongjiang1989 <[email protected]>
Signed-off-by: dongjiang1989 <[email protected]>
@nicolastakashi
Copy link
Contributor

Thanks for taking it @dongjiang1989 I think it's not a ENHANCEMENT i think it's a NONE on the change log, wdyt @simonpasquier ?

@dongjiang1989
Copy link
Contributor Author

dongjiang1989 commented Sep 11, 2024

Thanks for taking it @dongjiang1989 I think it's not a ENHANCEMENT i think it's a NONE on the change log, wdyt @simonpasquier ?

Thanks @nicolastakashi . I got it. Change it done.

Copy link
Contributor

@simonpasquier simonpasquier left a comment

Choose a reason for hiding this comment

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

Thanks! Technically it's a CHANGE since we're hardening the API validations.

@simonpasquier simonpasquier merged commit 10ddb1f into prometheus-operator:main Sep 11, 2024
18 checks passed
@dongjiang1989 dongjiang1989 deleted the optimize-prometheus-crd branch September 11, 2024 12:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants