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

feat(coderd): implement task to app linking#20237

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

Open
mafredri wants to merge2 commits intomafredri/feat-coderd-tasks-data-model-split4_split_split
base:mafredri/feat-coderd-tasks-data-model-split4_split_split
Choose a base branch
Loading
frommafredri/feat-coderd-tasks-data-model-split4_split_split_split

Conversation

mafredri
Copy link
Member

@mafredrimafredri commentedOct 9, 2025
edited
Loading

This change adds workspace build/agent/app linking to tasks and wires it
intowsbuilder andprovisionerdserver.

Closescoder/internal#948
Closes#20212
Closes#19773

This change adds workspace build/agent/app linking to tasks and wires itinto `wsbuilder` and `provisionerdserver`.Closescoder/internal#948Closes#20212Closes#19773
@mafredriGraphite App
Copy link
MemberAuthor

mafredri commentedOct 9, 2025
edited
Loading

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stackon Graphite.
Learn more

This stack of pull requests is managed byGraphite. Learn more aboutstacking.

@mafredrimafredriforce-pushed themafredri/feat-coderd-tasks-data-model-split4_split_split branch from8b065ed to293764dCompareOctober 9, 2025 10:40
@mafredrimafredriforce-pushed themafredri/feat-coderd-tasks-data-model-split4_split_split_split branch from5adbc9d to30464daCompareOctober 9, 2025 10:40
@mafredrimafredri marked this pull request as ready for reviewOctober 9, 2025 10:43
@mafredrimafredri requested review fromjohnstcn anddannykopping and removed request forjohnstcnOctober 9, 2025 10:43
@mafredrimafredriforce-pushed themafredri/feat-coderd-tasks-data-model-split4_split_split_split branch from30464da tod3fd9ebCompareOctober 9, 2025 10:52
@mafredrimafredriforce-pushed themafredri/feat-coderd-tasks-data-model-split4_split_split branch from293764d to83a00fbCompareOctober 9, 2025 10:52
@mafredrimafredriforce-pushed themafredri/feat-coderd-tasks-data-model-split4_split_split_split branch 2 times, most recently fromacd5dcf to336477cCompareOctober 9, 2025 10:58
@mafredrimafredriforce-pushed themafredri/feat-coderd-tasks-data-model-split4_split_split branch from83a00fb to281cf6eCompareOctober 9, 2025 10:58
// the agent to a task. As per previous behavior, this is OK
// because we always overwrite the given protoAgent.Id.
agentID:=uuid.New()
protoAgent.Id=makeStaticID(agentID)
Copy link
MemberAuthor

@mafredrimafredriOct 9, 2025
edited
Loading

Choose a reason for hiding this comment

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

Review: This was unfortunately the most compatible way I could think of sinceInsertWorkspaceResource is called from all over the place, and tests across the code-base. So I wanted to avoid churn by changing the function call. We also needed a way to opt-out of using the provided ID here since many tests start erroring out on duplicate IDs.

Functional options would've been one choice, but for this tiny change it seemed overkill.

Frankly it's a bit weird we have this field but discard it nonetheless.

Copy link
Member

Choose a reason for hiding this comment

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

My worry here is that a future change will usemakeStaticID without covering all the possible code paths withstaticID(). It should be fairly apparent in tests since a failure to remove the prefix will cause an invalid UUID error. The only other solution I could imagine would involve changing types which would involve more churn. Can you create a follow-up PR for refactoring this?

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

Can you create a follow-up PR for refactoring this?

What's your proposal for how it would be refactored?

I can also name itmakeStaticAgentID if that helps make it clear that it (currently) only has one intended use-case.

Copy link
MemberAuthor

@mafredrimafredriOct 9, 2025
edited
Loading

Choose a reason for hiding this comment

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

Replaced with functional options, see a7e1d10

Copy link
Contributor

Choose a reason for hiding this comment

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

LGTM:shipit:

Copy link
Contributor

Choose a reason for hiding this comment

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

LGTM:shipit:

Copy link
Member

Choose a reason for hiding this comment

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

I like this much better! Thank you@mafredri !

}
}

iftask,err:=db.GetTaskByWorkspaceID(ctx,workspace.ID);err==nil {
Copy link
MemberAuthor

Choose a reason for hiding this comment

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

Review: Previous sidebar app behavior is retained for the time being, we're just improving the task data model in parallel.

johnstcn reacted with thumbs up emoji
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.

I've got no objections (other than what Cian has already raised withmakeStaticID), although I'm not familiar enough with either components to feel confident to give the green light

@mafredrimafredriforce-pushed themafredri/feat-coderd-tasks-data-model-split4_split_split branch from281cf6e tofff8343CompareOctober 9, 2025 12:58
@mafredrimafredriforce-pushed themafredri/feat-coderd-tasks-data-model-split4_split_split_split branch from336477c tof7e0c43CompareOctober 9, 2025 12:58
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@johnstcnjohnstcnjohnstcn approved these changes

@DanielleMaywoodDanielleMaywoodDanielleMaywood left review comments

@dannykoppingdannykoppingAwaiting requested review from dannykopping

Assignees

@mafredrimafredri

Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

3 participants
@mafredri@johnstcn@DanielleMaywood

[8]ページ先頭

©2009-2025 Movatter.jp