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

RuntimeProxy: return err when FailurePolicyType set to Fail #754

Merged
merged 1 commit into from
Oct 31, 2022

Conversation

honpey
Copy link
Contributor

@honpey honpey commented Oct 28, 2022

Ⅰ. Describe what this PR does

Ⅱ. Does this pull request fix one issue?

Ⅲ. Describe how to verify it

Ⅳ. Special notes for reviews

V. Checklist

  • I have written necessary docs and comments
  • I have added necessary unit tests and integration tests
  • All checks passed in make test

@codecov
Copy link

codecov bot commented Oct 28, 2022

Codecov Report

Base: 68.64% // Head: 68.41% // Decreases project coverage by -0.23% ⚠️

Coverage data is based on head (46cb86e) compared to base (9d20593).
Patch coverage: 33.82% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #754      +/-   ##
==========================================
- Coverage   68.64%   68.41%   -0.24%     
==========================================
  Files         205      208       +3     
  Lines       23389    23956     +567     
==========================================
+ Hits        16056    16389     +333     
- Misses       6230     6426     +196     
- Partials     1103     1141      +38     
Flag Coverage Δ
unittests 68.41% <33.82%> (-0.24%) ⬇️

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

Impacted Files Coverage Δ
pkg/runtimeproxy/resexecutor/resource_executor.go 9.52% <0.00%> (ø)
pkg/runtimeproxy/utils/utils.go 100.00% <ø> (ø)
pkg/runtimeproxy/server/docker/handler.go 36.77% <9.09%> (-0.47%) ⬇️
pkg/runtimeproxy/resexecutor/cri/container.go 70.00% <26.66%> (-2.60%) ⬇️
pkg/runtimeproxy/resexecutor/cri/pod.go 72.54% <36.36%> (-4.05%) ⬇️
pkg/runtimeproxy/resexecutor/cri/utils.go 87.90% <66.66%> (-1.67%) ⬇️
pkg/runtimeproxy/dispatcher/dispatcher.go 39.02% <75.00%> (ø)
pkg/tools/cache/expiration_cache.go 75.75% <100.00%> (ø)
pkg/scheduler/plugins/elasticquota/controller.go 60.91% <0.00%> (-11.39%) ⬇️
pkg/koordlet/runtimehooks/reconciler/reconciler.go 71.57% <0.00%> (-9.48%) ⬇️
... and 18 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@@ -84,8 +84,9 @@ func (rd *RuntimeHookDispatcher) Dispatch(ctx context.Context, runtimeRequestPat
}
// currently, only one hook be called during one runtime
// TODO: multi hook server to merge response
return rd.dispatchInternal(ctx, hookType, client, request)
rsp, err := rd.dispatchInternal(ctx, hookType, client, request)
return rsp, err, hookServer.FailurePolicy
Copy link
Contributor

Choose a reason for hiding this comment

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

hookServer.FailurePolicy is this a required field or optional(with default)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

optional, if not set from config, default to PolicyNone

Signed-off-by: honpey <honpey@gmail.com>
@hormes
Copy link
Member

hormes commented Oct 28, 2022

/lgtm

@zwzhang0107
Copy link
Contributor

/lgtm

@koordinator-bot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

Approval requirements bypassed by manually added approval.

This pull-request has been approved by:

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@koordinator-bot koordinator-bot bot merged commit ced5252 into koordinator-sh:main Oct 31, 2022
@hormes hormes mentioned this pull request Nov 1, 2022
3 tasks
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.

None yet

3 participants