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

libcni: always delete the cache on conflist for CNI DEL #1095

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions libcni/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -598,9 +598,7 @@ func (c *CNIConfig) DelNetworkList(ctx context.Context, list *NetworkConfigList,
}
}

if cachedResult != nil {
_ = c.cacheDel(list.Name, rt)
}
_ = c.cacheDel(list.Name, rt)
Copy link

Choose a reason for hiding this comment

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

why should delete if there is no cachedResult?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The alternatives would be to stop checking the results in the cache in the crio tests (since the tests use CNI 0.3.1 ...) or to fix a lot of tests to use CNI version >= 0.4.0 .

This was discussed in the CNI maintainers meeting may 27th 2024, and seemed the simpler way forward, given it is totally innocuous.

Copy link

Choose a reason for hiding this comment

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

if maintainers approve 🤷 ... but it feels weird to change a library because some tests seems to be wrong ...

Copy link

Choose a reason for hiding this comment

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

that seems a fair point

/lgtm


return nil
}
Expand Down
Loading