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
fix: ScrapeClass TLSConfig nil pointer exception #6507
Conversation
Signed-off-by: Kemal Akkoyun <kakkoyun@gmail.com>
It looks good to me but I'd rather leave the approval to @nicolastakashi to check the logic. Can we maybe add a test for this case in |
Good point. I'll ad it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree that tests would be good to have :)
8bedda7
to
4245ea0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
@kakkoyun merge it at your will :)
@simonpasquier Maybe I should have merged this to the release branch? |
@kakkoyun Since its already merged can you cherry-pick and create the PR to release branch? |
Thanks. I'll do it. |
…#6507) Signed-off-by: Simon Pasquier <spasquie@redhat.com>
fix: ScrapeClass TLSConfig nil pointer exception (#6507)
Signed-off-by: Kemal Akkoyun kakkoyun@gmail.com
Description
When only
relabeling
is configured in aScrapeClass
object, theTLSConfig
field is nil. This causes a panic when theTLSConfig
field is accessed in theScrapeClass
object.I'm not sure about the business logic of the
ScrapeClass
TLSConfig field, but from pure Go perspective, it should fix the panic.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.
Example config to reproduce the issue:
Changelog entry
Please put a one-line changelog entry below. This will be copied to the changelog file during the release process.