Skip to content

fix: stops logging relations to types the run did not read as errors - #576

Merged
semx merged 1 commit into
bb-Ricardo:developmentfrom
marcinpsk:fix/unloaded-type-relations
Oct 5, 2026
Merged

semx merged 1 commit into
bb-Ricardo:developmentfrom
marcinpsk:fix/unloaded-type-relations

Conversation

@marcinpsk

@marcinpsk marcinpsk commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

Interfaces and power ports reference their NetBox module. Only the check_redfish source reads modules from NetBox.
A VMware only run therefore logged "Problems resolving relation 'module'" for every interface and power port with a module. NetBox 3.3 to 4.2 has modules, but the module type is only read from 4.3. There check_redfish logged the same errors.

The resolver resolves relations as before. It logs an error only when the type was read and the object is still missing. Otherwise the value stays as NetBox returned it.

Added NetBoxInventory.load_from_netbox() so it would be a single place to change it.

Closes #575

Interfaces and power ports reference their NetBox module. Only the
check_redfish source reads modules from NetBox. A VMware only run
therefore logged "Problems resolving relation 'module'" for every
interface and power port with a module. NetBox 3.3 to 4.2 has modules,
but the module type is only read from 4.3. There check_redfish logged
the same errors.

The inventory now records the object types read from NetBox. The
resolver resolves relations as before. It logs an error only when the
type was read and the object is still missing. Otherwise the value
stays as NetBox returned it.

The errors were log noise only. A VMware sync never sets or unsets the
module, so no request changes it.
@marcinpsk
marcinpsk requested a review from bb-Ricardo as a code owner October 5, 2026 07:50

@semx semx left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks Marcin. The vcsim test reproduces the report on development (12 and 8 "Problems resolving relation 'module'" errors on the two fixtures) and passes here; the full suite is green (263 passed). Merging; it goes out as 1.9.1.

@semx
semx merged commit f901067 into bb-Ricardo:development Oct 5, 2026
1 check passed
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.

3 participants