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

refactor(coderd): drop sidebar app constraint and simplify provisionerdserver for tasks#20591

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

Conversation

@mafredri
Copy link
Member

@mafredrimafredriforce-pushed themafredri/refactor-coderd-clean-up-provisionerdserver-for-tasks branch fromcbaeff0 toef35c8dCompareOctober 30, 2025 17:26
expectHasAiTask:false,
expectUsageEvent:false,
expectHasAiTask:true,
expectUsageEvent:true,// We no longer reset hasAITask if the app doesn't exist.
Copy link
MemberAuthor

@mafredrimafredriOct 30, 2025
edited
Loading

Choose a reason for hiding this comment

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

Review: Do we want this (send usage event) to be false here or not? Essentially this is a task, but invalid app config means it can't really run.

Copy link
Member

Choose a reason for hiding this comment

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

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

For now I restored the previous behavior of resettinghasAITask if it's an unknown app ID. This change restores both of these booleans to false.

We can revisit if deemed necessary.

johnstcn reacted with thumbs up emoji
@mafredrimafredri marked this pull request as ready for reviewOctober 30, 2025 17:29
@mafredrimafredriforce-pushed themafredri/refactor-coderd-clean-up-provisionerdserver-for-tasks branch 2 times, most recently from647b226 to2d2a5b5CompareOctober 30, 2025 17:37
Comment on lines -2029 to -2062
warnUnknownTaskAppID=true
}

id,err:=uuid.Parse(appID)
iferr!=nil {
returnxerrors.Errorf("parse app id: %w",err)
}

taskAppID= uuid.NullUUID{UUID:id,Valid:true}

agentID,ok:=agentIDByAppID[appID]
taskAgentID= uuid.NullUUID{UUID:agentID,Valid:ok}
}

// This is a hacky workaround for the issue with tasks 'disappearing' on stop:
// reuse has_ai_task and sidebar_app_id from the previous build.
// This workaround should be removed as soon as possible.
ifworkspaceBuild.Transition==database.WorkspaceTransitionStop&&workspaceBuild.BuildNumber>1 {
ifprevBuild,err:=s.Database.GetWorkspaceBuildByWorkspaceIDAndBuildNumber(ctx, database.GetWorkspaceBuildByWorkspaceIDAndBuildNumberParams{
WorkspaceID:workspaceBuild.WorkspaceID,
BuildNumber:workspaceBuild.BuildNumber-1,
});err==nil {
hasAITask=prevBuild.HasAITask.Bool
taskAppID=prevBuild.AITaskSidebarAppID
warnUnknownTaskAppID=false
s.Logger.Debug(ctx,"task workaround: reused has_ai_task and app_id from previous build to keep track of task",
slog.F("job_id",job.ID.String()),
slog.F("build_number",prevBuild.BuildNumber),
slog.F("workspace_id",workspace.ID),
slog.F("workspace_build_id",workspaceBuild.ID),
slog.F("transition",string(workspaceBuild.Transition)),
slog.F("sidebar_app_id",taskAppID.UUID),
slog.F("has_ai_task",hasAITask),
)
Copy link
Member

Choose a reason for hiding this comment

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

❤️

Copy link
Contributor

@DanielleMaywoodDanielleMaywood left a comment

Choose a reason for hiding this comment

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

All good from my end

@mafredrimafredriforce-pushed themafredri/refactor-coderd-clean-up-provisionerdserver-for-tasks branch from2d2a5b5 toe5cee2cCompareNovember 3, 2025 11:05
@mafredrimafredri merged commita6b0eae intomainNov 3, 2025
30 checks passed
@mafredrimafredri deleted the mafredri/refactor-coderd-clean-up-provisionerdserver-for-tasks branchNovember 3, 2025 11:46
@github-actionsgithub-actionsbot locked and limited conversation to collaboratorsNov 3, 2025
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.

Reviewers

@johnstcnjohnstcnjohnstcn approved these changes

@DanielleMaywoodDanielleMaywoodDanielleMaywood approved these changes

@deansheatherdeansheatherAwaiting requested review from deansheather

Assignees

@mafredrimafredri

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

4 participants

@mafredri@johnstcn@DanielleMaywood

[8]ページ先頭

©2009-2025 Movatter.jp