Skip to content

Add checks to prevent potential panics #709

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

vyzigold
Copy link
Contributor

  • Use two-return type assertions to check we have correct type
  • Check for a variable not being nil before dereferencing
  • Check for map item existence before accessing
  • Fix log message grammar

Even thought I don't expect these issues to cause problems, unless there is a change in how inventory secrets look, I think this is still an improvement, which doesn't hurt anything. As far as I see, this doesn't change any behavior, which was also confirmed by my local testing. All scrapeconfigs were created correctly, compute node IPs were retrieved like before and I haven't seen any error logs in the operator logs.

Generated-By: cursor with claude-4-sonnet model

- Use two-return type assertions to check we have correct type
- Check for a variable not being nil before dereferencing
- Check for map item existence before accessing
- Fix log message grammar

This shouldn't be a problem unless there is a change in how inventory
secrets look, but this is still an improvement, which doesn't
hurt anything.

Generated-By: cursor with claude-4-sonnet model
@openshift-ci openshift-ci bot requested review from olliewalsh and stuggi June 25, 2025 20:58
Copy link
Contributor

openshift-ci bot commented Jun 25, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: vyzigold

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@vyzigold vyzigold requested a review from jlarriba June 27, 2025 06:53
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.

1 participant