Skip to content

Conversation

elezar
Copy link
Member

@elezar elezar commented Feb 12, 2025

This removes the logic for constructing an nvidia.com/gpu.imex-domain label. This also means that the logic to include the imex nodes_config.cfg file in the GFD container is not required.

This is a backport of #1147

@elezar elezar requested review from klueska and jgehrcke February 12, 2025 18:45
}
if imexDomainID == "" {
return nil, nil
return empty{}, nil
Copy link
Contributor

Choose a reason for hiding this comment

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

why empty{} instead of nil?

Copy link
Member Author

Choose a reason for hiding this comment

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

In order to avoid explicit nil checks at the callsite, we have an empty{} Labeler which returns no labels.

Copy link
Contributor

Choose a reason for hiding this comment

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

OK. Thanks.

Copy link
Collaborator

Choose a reason for hiding this comment

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

could we do the same for line (89/32)

Copy link
Member Author

Choose a reason for hiding this comment

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

could we do the same for line (89/32)

No. On that line we're returning an actual error and we want to return nil as the labeler.

@cdesiniotis
Copy link
Contributor

cdesiniotis commented Feb 24, 2025

@tariq1890 we should look into rolling back the changes introduced in NVIDIA/gpu-operator@5525636 and NVIDIA/gpu-operator#1070 as they are no longer needed.

}
if imexDomainID == "" {
return nil, nil
return empty{}, nil
Copy link
Collaborator

Choose a reason for hiding this comment

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

could we do the same for line (89/32)

return nil, fmt.Errorf("failed to open imex config file: %v", err)
}
defer imexConfigFile.Close()

clusterUUID, cliqueID, err := getFabricIDs(devices)
if err != nil {
return nil, err
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
return nil, err
return empty{}, nil

Copy link
Member Author

Choose a reason for hiding this comment

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

No. Here we are returning an actual error. Do you have a motivation as to why we want to ignore it?

This removes the logic for constructing an nvidia.com/gpu.imex-domain label.
This also means that the logic to include the imex nodes_config.cfg file
in the GFD container is not required.

Signed-off-by: Evan Lezar <[email protected]>
@elezar elezar force-pushed the remove-imex-domain-label branch from 17afec9 to dd78f3d Compare March 6, 2025 09:22
@elezar elezar requested a review from ArangoGutierrez March 6, 2025 09:22
@elezar elezar dismissed ArangoGutierrez’s stale review March 6, 2025 09:39

The proposed changes are not valid since we are actually returning an error in the other instance.

Copy link
Contributor

@jgehrcke jgehrcke left a comment

Choose a reason for hiding this comment

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

I looked at the review conversations. They look good. I approve ignorantly. Thank you, @elezar

@elezar elezar merged commit 4594f37 into NVIDIA:release-0.17 Mar 6, 2025
8 checks passed
@elezar elezar deleted the remove-imex-domain-label branch March 6, 2025 11:01
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.

5 participants