Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

fix: use correct logger for lifecycle_executor#11763

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
sreya merged 1 commit intomainfromjon/lifecyclelogger
Jan 23, 2024
Merged
Changes fromall 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
10 changes: 7 additions & 3 deletionscoderd/autobuild/lifecycle_executor.go
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -130,7 +130,11 @@ func (e *Executor) runOnce(t time.Time) Stats {

for _, ws := range workspaces {
wsID := ws.ID
log := e.log.With(slog.F("workspace_id", wsID))
wsName := ws.Name
log := e.log.With(
slog.F("workspace_id", wsID),
slog.F("workspace_name", wsName),
)

eg.Go(func() error {
err := func() error {
Expand DownExpand Up@@ -256,7 +260,7 @@ func (e *Executor) runOnce(t time.Time) Stats {
// If the transition didn't succeed then updating the workspace
// to indicate dormant didn't either.
auditLog.Success = err == nil
auditBuild(e.ctx,e.log, *e.auditor.Load(), *auditLog)
auditBuild(e.ctx, log, *e.auditor.Load(), *auditLog)
}
if err != nil {
return xerrors.Errorf("transition workspace: %w", err)
Expand All@@ -274,7 +278,7 @@ func (e *Executor) runOnce(t time.Time) Stats {
return nil
}()
if err != nil {
e.log.Error(e.ctx, "failed to transition workspace", slog.Error(err))
log.Error(e.ctx, "failed to transition workspace", slog.Error(err))
statsMu.Lock()
stats.Errors[wsID] = err
statsMu.Unlock()
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp