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

Add empty hostname workaround #19393

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

Conversation

sarah-witt
Copy link
Contributor

@sarah-witt sarah-witt commented Jan 14, 2025

What does this PR do?

Submits placeholder value for empty hostnames in the vSphere check, where these hosts will be removed later on.

Motivation

Review checklist (to be filled by reviewers)

  • Feature or bugfix MUST have appropriate tests (unit, integration, e2e)
  • Add the qa/skip-qa label if the PR doesn't need to be tested during QA.
  • If you need to backport this PR to another branch, you can add the backport/<branch-name> label to the PR and it will automatically open a backport PR once this one is merged

Copy link

codecov bot commented Jan 14, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 88.61%. Comparing base (c31d8c2) to head (40937d9).
Report is 2 commits behind head on master.

Additional details and impacted files
Flag Coverage Δ
activemq ?
cassandra ?
hive ?
hivemq ?
hudi ?
ignite ?
jboss_wildfly ?
kafka ?
presto ?
solr ?
vsphere 96.61% <100.00%> (+0.32%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

@sarah-witt sarah-witt marked this pull request as ready for review January 14, 2025 22:30
@sarah-witt sarah-witt requested a review from a team January 14, 2025 22:30
@sarah-witt sarah-witt requested a review from a team as a code owner January 14, 2025 22:30
Copy link
Contributor

@iliakur iliakur left a comment

Choose a reason for hiding this comment

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

one simplification suggestion, but lgtm!

Comment on lines -148 to +156
host_name = None
# workaround to send empty hostname
if self.hostname is None:
host_name = VSphereEvent.EMPTY_HOSTNAME
else:
host_name = self.hostname
Copy link
Contributor

Choose a reason for hiding this comment

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

Since EMPTY_HOSTNAME is a string, we could just use that as a default value. That'll simplify things here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants