[feature] Support the development of the first feature for agentrunti…#148
[feature] Support the development of the first feature for agentrunti…#148BH4AWS wants to merge 1 commit intoopenkruise:masterfrom
Conversation
|
[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. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
9d61ce0 to
a3126a4
Compare
Codecov Report❌ Patch coverage is 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
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
a3126a4 to
90c66c2
Compare
…me, and set up the server-side HTTP service code. Signed-off-by: jicheng.sk <jicheng.sk@alibaba-inc.com>
90c66c2 to
4e67bcb
Compare
|
@BH4AWS: PR needs rebase. DetailsInstructions 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 { |
There was a problem hiding this comment.
if we can rename it as TypedSyncMap
| ) | ||
|
|
||
| func NewLoggerContext(ctx context.Context, keysAndValues ...any) context.Context { | ||
| log := klog.FromContext(ctx) |
There was a problem hiding this comment.
why not reuse logs.NewLoggerContext ?
| ) | ||
|
|
||
| const ( | ||
| E2BRunDir = "/run/e2b" // store sandbox metadata files here |
There was a problem hiding this comment.
use the name of agent-runtime instead of e2b
|
|
||
| // Check access token from header | ||
| authHeader := c.GetHeader(AccessTokenHeader) | ||
| if authHeader != "" { |
There was a problem hiding this comment.
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", "") |
There was a problem hiding this comment.
PostInitHandler -> HealthCheckHancler
| defer func() { | ||
| logCollector.V(3).Info("Health check completed", "CostTime", time.Since(startTime).String()) | ||
| }() | ||
| c.JSON(http.StatusNoContent, gin.H{ |
There was a problem hiding this comment.
responses with status 204 should contain no content. use StatusOK
…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