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(coderd): ensure lifecycle executor has sufficient task permissions#20539

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
DanielleMaywood merged 1 commit intomainfromdanielle/fix/lifecycle-executor
Oct 29, 2025

Conversation

@DanielleMaywood
Copy link
Contributor

@DanielleMaywoodDanielleMaywood commentedOct 29, 2025
edited
Loading

We recently made a change to thewsbuilder to handle task related logic. Our test coverage for the lifecycle executor didn't handle this scenario and so we missed that it had insufficient permissions.

This PR addsUpdate andRead permissions forTasks in the lifecycle executor, as well as an autostart/autostop test tailored to task workspaces to verify the change.


Anthropic's Claude Sonnet 4.5 Thinking was involved in writing the tests

@DanielleMaywoodDanielleMaywoodforce-pushed thedanielle/fix/lifecycle-executor branch 2 times, most recently from4a360c9 to4ad5bdeCompareOctober 29, 2025 14:05
We recently made a change to the `wsbuilder` to handle task relatedlogic. Our test coverage for the lifecycle executor didn't handle thisscenario and so we missed the insufficient permissions.This PR adds `Update` and `Read` permissions for `Task`s in thelifecycle executor, as well as an autostart/autostop test tailored totask workspaces to verify the change.
@DanielleMaywoodDanielleMaywoodforce-pushed thedanielle/fix/lifecycle-executor branch from4ad5bde to6cb618cCompareOctober 29, 2025 14:17
@DanielleMaywoodDanielleMaywood marked this pull request as ready for reviewOctober 29, 2025 14:59
@DanielleMaywoodDanielleMaywood added the cherry-pick/v2.28Needs to be cherry-picked to the 2.28 release branch labelOct 29, 2025
funcTestExecutorTaskWorkspace(t*testing.T) {
t.Parallel()

createTaskTemplate:=func(t*testing.T,client*codersdk.Client,orgID uuid.UUID,ctx context.Context,defaultTTL time.Duration) codersdk.Template {
Copy link
Member

Choose a reason for hiding this comment

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

Can we avoid duplication here? I'm fine to defer cleanup to later though.

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

What thoughts do you have here? Is this related to how many similar test utilities we have for creating task templates?

Copy link
Member

Choose a reason for hiding this comment

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

Yup, similar test setups, but let's defer 👍🏻

DanielleMaywood reacted with thumbs up emoji
@DanielleMaywoodDanielleMaywood merged commit06dbada intomainOct 29, 2025
34 checks passed
@DanielleMaywoodDanielleMaywood deleted the danielle/fix/lifecycle-executor branchOctober 29, 2025 15:44
@github-actionsgithub-actionsbot locked and limited conversation to collaboratorsOct 29, 2025
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.

Reviewers

@mafredrimafredrimafredri approved these changes

@johnstcnjohnstcnjohnstcn approved these changes

Assignees

@DanielleMaywoodDanielleMaywood

Labels

cherry-pick/v2.28Needs to be cherry-picked to the 2.28 release branch

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

4 participants

@DanielleMaywood@mafredri@johnstcn

[8]ページ先頭

©2009-2025 Movatter.jp