Skip to content

[feature] Support the development of the first feature for agentrunti…#148

Open
BH4AWS wants to merge 1 commit intoopenkruise:masterfrom
BH4AWS:feature/init-runtime-infra
Open

[feature] Support the development of the first feature for agentrunti…#148
BH4AWS wants to merge 1 commit intoopenkruise:masterfrom
BH4AWS:feature/init-runtime-infra

Conversation

@BH4AWS
Copy link
Contributor

@BH4AWS BH4AWS commented Feb 13, 2026

…me, and set up the server-side HTTP service code.

Ⅰ. Describe what this PR does

1\ The first version implements the framework code for the AgentRuntime sidecar solution.
2\ The entire codebase is still under development, with multiple iteration branches; this submission represents the initial iteration.

Ⅱ. Does this pull request fix one issue?

Ⅲ. Describe how to verify it

Ⅳ. Special notes for reviews

@kruise-bot
Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:

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

Details 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

@BH4AWS BH4AWS force-pushed the feature/init-runtime-infra branch 2 times, most recently from 9d61ce0 to a3126a4 Compare February 24, 2026 06:08
@codecov
Copy link

codecov bot commented Feb 24, 2026

Codecov Report

❌ Patch coverage is 28.05755% with 200 lines in your changes missing coverage. Please review.
✅ Project coverage is 52.75%. Comparing base (52e4275) to head (4e67bcb).
⚠️ Report is 63 commits behind head on master.

Files with missing lines Patch % Lines
pkg/agent-runtime/host/metrics.go 0.00% 44 Missing ⚠️
pkg/agent-runtime/routers.go 33.33% 41 Missing and 1 partial ⚠️
pkg/utils/map/map.go 0.00% 24 Missing ⚠️
pkg/agent-runtime/server.go 0.00% 22 Missing ⚠️
...g/agent-runtime/openapi/nativeapi/envs_api_impl.go 0.00% 17 Missing ⚠️
...g/agent-runtime/openapi/nativeapi/init_api_impl.go 0.00% 16 Missing ⚠️
...gent-runtime/openapi/extendedapi/mount_api_impl.go 0.00% 9 Missing ⚠️
pkg/agent-runtime/openapi/nativeapi/api_def.go 0.00% 7 Missing ⚠️
...gent-runtime/openapi/nativeapi/metrics_api_impl.go 73.33% 3 Missing and 1 partial ⚠️
pkg/utils/utils.go 0.00% 4 Missing ⚠️
... and 4 more
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #148      +/-   ##
==========================================
- Coverage   54.03%   52.75%   -1.28%     
==========================================
  Files          94      109      +15     
  Lines        5365     5643     +278     
==========================================
+ Hits         2899     2977      +78     
- Misses       2247     2443     +196     
- Partials      219      223       +4     
Flag Coverage Δ
unittests 52.75% <28.05%> (-1.28%) ⬇️

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@BH4AWS BH4AWS force-pushed the feature/init-runtime-infra branch from a3126a4 to 90c66c2 Compare February 24, 2026 06:18
…me, and set up the server-side HTTP service code.

Signed-off-by: jicheng.sk <jicheng.sk@alibaba-inc.com>
@BH4AWS BH4AWS force-pushed the feature/init-runtime-infra branch from 90c66c2 to 4e67bcb Compare February 24, 2026 06:33
@kruise-bot
Copy link

@BH4AWS: PR needs rebase.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.


import "sync"

type Map[K comparable, V any] struct {
Copy link
Member

Choose a reason for hiding this comment

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

if we can rename it as TypedSyncMap

)

func NewLoggerContext(ctx context.Context, keysAndValues ...any) context.Context {
log := klog.FromContext(ctx)
Copy link
Member

Choose a reason for hiding this comment

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

why not reuse logs.NewLoggerContext ?

)

const (
E2BRunDir = "/run/e2b" // store sandbox metadata files here
Copy link
Member

Choose a reason for hiding this comment

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

use the name of agent-runtime instead of e2b


// Check access token from header
authHeader := c.GetHeader(AccessTokenHeader)
if authHeader != "" {
Copy link
Member

Choose a reason for hiding this comment

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

return 401 when access token is not found

func (s *Server) healthCheckHandler() gin.HandlerFunc {
return func(c *gin.Context) {
startTime := time.Now()
logContext := logs.NewLoggerContext(context.Background(), "PostInitHandler", "")
Copy link
Member

Choose a reason for hiding this comment

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

PostInitHandler -> HealthCheckHancler

defer func() {
logCollector.V(3).Info("Health check completed", "CostTime", time.Since(startTime).String())
}()
c.JSON(http.StatusNoContent, gin.H{
Copy link
Member

Choose a reason for hiding this comment

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

responses with status 204 should contain no content. use StatusOK

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.

3 participants