- Notifications
You must be signed in to change notification settings - Fork1k
fix(coderd): ensure a newly created task can be fetched#19670
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
Due to how we currently label a workspace as a task, there is a delaybetween when a task workspace is created and when it is labelled asa task.This PR introduces fallback check for when a workspace does _not_ have`HasAITask` set. This fallback check tests to see if the special "AIPrompt" parameter is present in the workspace's build parameters.
c8583d8
tocaf9000
Compare{Name:codersdk.AITaskPromptParameterName,Value:wantPrompt}, | ||
} | ||
}) | ||
coderdtest.AwaitWorkspaceBuildJobCompleted(t,client,workspace.LatestBuild.ID) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Removing this call effectively tests that we can fetch a taskprior to the build job being finished
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Uh oh!
There was an error while loading.Please reload this page.
12bce12
intomainUh oh!
There was an error while loading.Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
post-merge 🦭 of 👍
Due to how we currently label a workspace as a task, there is a delay between when a task workspace is created and when it is labelled as a task.
This PR introduces fallback check for when a workspace doesnot have
HasAITask
set. This fallback check tests to see if the special "AI Prompt" parameter is present in the workspace's build parameters.