- Notifications
You must be signed in to change notification settings - Fork1k
ci: create tasks instead of workspaces in ai triage workflow#19940
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
Uh oh!
There was an error while loading.Please reload this page.
Conversation
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.
Looks good to me although will defer to@mafredri for approval
Uh oh!
There was an error while loading.Please reload this page.
Co-authored-by: Danielle Maywood <danielle@themaywoods.com>
# AgentAPI must be stable | ||
agentapi_status=$(curl \ | ||
--header"Content-Type: application/json" \ | ||
--header"Coder-Session-Token:${CODER_SESSION_TOKEN}" \ | ||
--location \ | ||
--request GET \ | ||
--show-error \ | ||
--silent \ | ||
"${CODER_URL}/@${username}/${WORKSPACE_NAME}/apps/agentapi/status"| jq -r'.status') | ||
if [["${response}"=="stable" ]];then | ||
"${CODER_URL}/@${username}/${TASK_NAME}/apps/${APP_SLUG}/status"| jq -r'.status') | ||
if [["${agentapi_status}"=="stable" ]];then | ||
echo"AgentAPI stable" | ||
break | ||
else | ||
echo"Waiting for AgentAPI to report stable status (attempt${attempt}/120)" | ||
sleep 5 | ||
continue |
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.
Unfortunately it looks like we may need another wait here, as agentapi will become stable before it starts processing the task. We probably need to wait until the prompt shows up in the messages endpoint or something.
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.
This ended up looking very similar to what we'd wantcoder exp task status --watch
to be. Will update in a separate PR.
Uh oh!
There was an error while loading.Please reload this page.
id:generate-summary | ||
env: | ||
ARCHIVE_URL:${{ steps.create-archive.outputs.archive_url }} | ||
APP_SLUG:ccw |
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.
I know we have the required envs check, but I'm wondering if it'd be better to define thesetraiage.sh
envs in one place so they're applied to all action steps?
Mayhaps doing something like this early on:
echo "APP_SLUG=$APP_SLUG" >> "$GITHUB_ENV"
(There's probably a better way to do it.)
Or write atraiage.config.sh
which can be sourced intraiage.sh
.
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.
Long-term I want to remove the need for this (e.g by usingcoder task send
). Leaving it here, exposed and ugly, makes it easier to delete later IMO.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
fi | ||
# AgentAPI application should not be 404'ing | ||
agentapi_app_status_code=$(curl \ |
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.
We could be fancy, look up the app URL and do assh bash 'while :; curl; if ...; fi; done'
.
The only motivation here is to reduce coderd load, though.
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.
As with app_slug above, I'm disinclined to do fanciness if it can later be incorporated into the CLI.
063e863
intomainUh oh!
There was an error while loading.Please reload this page.
Depends on#19939