mirror of
https://github.com/tiennm99/ccs.git
synced 2026-09-02 22:17:14 +00:00
ci(ai-review): move PR-Agent jobs to ubuntu-latest
The qodo-ai/pr-agent Docker action requires the GitHub event payload at /github/workflow/event.json inside the action container. On self-hosted runners that themselves run inside a Docker container (e.g. myoung34/github-runner), the host docker daemon resolves the volume mount /tmp/runner/work/_temp/_github_workflow:/github/workflow against the host filesystem, where the runner's /tmp path does not exist. The action container starts with an empty /github/workflow mount and fails with FileNotFoundError on event.json. AI review jobs do not need self-hosted runner access (no bun cache, no internal infra). Switch both dispatch-review and pr-agent jobs to ubuntu-latest so the volume mount resolves on the same host where the action expects it.
This commit is contained in:
@@ -37,7 +37,7 @@ jobs:
|
|||||||
dispatch-review:
|
dispatch-review:
|
||||||
name: Queue /review comment
|
name: Queue /review comment
|
||||||
if: github.event_name == 'workflow_dispatch'
|
if: github.event_name == 'workflow_dispatch'
|
||||||
runs-on: [self-hosted, cliproxy]
|
runs-on: ubuntu-latest
|
||||||
permissions:
|
permissions:
|
||||||
issues: write
|
issues: write
|
||||||
|
|
||||||
@@ -86,7 +86,7 @@ jobs:
|
|||||||
)
|
)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
runs-on: [self-hosted, cliproxy]
|
runs-on: ubuntu-latest
|
||||||
timeout-minutes: 20
|
timeout-minutes: 20
|
||||||
permissions:
|
permissions:
|
||||||
issues: write
|
issues: write
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ function resolvePath(relativePath: string) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
describe('PR-Agent review lane migration', () => {
|
describe('PR-Agent review lane migration', () => {
|
||||||
test('keeps ai-review.yml as the PR-Agent workflow on the self-hosted cliproxy runner', () => {
|
test('keeps ai-review.yml as the PR-Agent workflow on a GitHub-hosted runner', () => {
|
||||||
const workflowPath = resolvePath('../../../../.github/workflows/ai-review.yml');
|
const workflowPath = resolvePath('../../../../.github/workflows/ai-review.yml');
|
||||||
const prAgentConfigPath = resolvePath('../../../../.pr_agent.toml');
|
const prAgentConfigPath = resolvePath('../../../../.pr_agent.toml');
|
||||||
|
|
||||||
@@ -19,7 +19,14 @@ describe('PR-Agent review lane migration', () => {
|
|||||||
const appTokenUsages = workflow.match(/uses: actions\/create-github-app-token@v1/g) ?? [];
|
const appTokenUsages = workflow.match(/uses: actions\/create-github-app-token@v1/g) ?? [];
|
||||||
|
|
||||||
expect(workflow).toContain('name: AI Code Review');
|
expect(workflow).toContain('name: AI Code Review');
|
||||||
expect(workflow).toContain('runs-on: [self-hosted, cliproxy]');
|
// AI review jobs run on GitHub-hosted runners. Self-hosted runners that
|
||||||
|
// run inside a Docker container (myoung34/github-runner) cannot host
|
||||||
|
// qodo-ai/pr-agent because the action's docker run command uses a volume
|
||||||
|
// mount path (/tmp/runner/work/_temp/_github_workflow) that resolves on
|
||||||
|
// the host filesystem, not inside the runner container, leaving
|
||||||
|
// /github/workflow/event.json missing in the action.
|
||||||
|
expect(workflow).toContain('runs-on: ubuntu-latest');
|
||||||
|
expect(workflow).not.toContain('runs-on: [self-hosted, cliproxy]');
|
||||||
expect(workflow).toContain('uses: qodo-ai/pr-agent');
|
expect(workflow).toContain('uses: qodo-ai/pr-agent');
|
||||||
expect(appTokenUsages).toHaveLength(2);
|
expect(appTokenUsages).toHaveLength(2);
|
||||||
expect(workflow).toContain('OPENAI.API_BASE');
|
expect(workflow).toContain('OPENAI.API_BASE');
|
||||||
|
|||||||
Reference in New Issue
Block a user