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

adaptation: return nil as no-op adjustment. #118

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

Conversation

klihub
Copy link
Member

@klihub klihub commented Oct 24, 2024

With no NRI plugins registered or none of the registered plugins requesting changes to a container, we should ideally skip applying NRI adjustments on the runtime side altogether, instead of going through the motions without any effective changes. Having seen #117 (quickly fixed by #116), this is not the case.

This PR is the first part in an attempt to change that. With this PR in place, we don't create an a priori empty adjustment in preparation to process NRI requests. We only create it once a plugin makes an actual change to the container being created. Effectively, this should result in a nil adjustment reply when there are no plugins present, or none of the present plugins touches a container.

The other part is a related change to the runtime integration code to check for this and short-circuit processing.

@klihub klihub requested review from samuelkarp and mikebrow October 24, 2024 16:08
Don't create an empty adjustment a priori. Only create once
a plugin makes an adjustment to the container being created.
In particular, this should result in a nil adjustment if no
plugin touches a container.

Signed-off-by: Krisztian Litkey <[email protected]>
@klihub klihub force-pushed the devel/use-nil-as-nop-adjustment branch from f765fc8 to 362c075 Compare October 24, 2024 16:09
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.

1 participant