Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

sf agent test run fails with "RETRY" enum error during status polling

Đang mở
#3,523 5 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
52/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Ít trao đổi
Công nghệ
node.js, typescript
Lĩnh vực
cli, testing-qa

Hướng nghiên cứu

Bắt đầu với @salesforce/agents/src/types.ts và kiểm tra định nghĩa TestStatus được AgentTester.results sử dụng trong quá trình polling. Chạy lại lệnh được ghi trong tài liệu sf agent test run --wait, sau đó xác minh rằng trạng thái RETRY được xử lý và polling trả về kết quả kiểm thử mà không có lỗi enum.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

area:afdx bug owned by another team
Summary

sf agent test run --wait fails during status polling with:
INTERNAL_SERVER_ERROR: The specified enum type has no constant with the specified name: RETRY

Steps To Reproduce
  1. sf agent test create --spec specs/test.yaml --api-name MyTest -o <org>
  2. sf agent test run --api-name MyTest -o <org> --wait 5 --json
Expected result

Test polls and returns results

Actual result

Crashes with RETRY enum error

Additional information

Stack trace

{
"name": "INTERNAL_SERVER_ERROR",
"message": "The specified enum type has no constant with the specified name: RETRY",
"exitCode": 1,
"context": "AgentTestRun",
"data": {
"errorCode": "INTERNAL_SERVER_ERROR",
"message": "The specified enum type has no constant with the specified name: RETRY"
},
"stack": "INTERNAL_SERVER_ERROR: The specified enum type has no constant with the specified name: RETRY\n at SfCommandError.from (file:///opt/atlassian/pipelines/agent/build/node_modules/@salesforce/cli/node_modules/@salesforce/sf-plugins-core/lib/SfCommandError.js:48:16)\n at AgentTestRun.catch (file:///opt/atlassian/pipelines/agent/build/node_modules/@salesforce/cli/node_modules/@salesforce/sf-plugins-core/lib/sfCommand.js:332:47)\n at AgentTestRun.catch (file:///opt/atlassian/pipelines/agent/build/node_modules/@salesforce/cli/node_modules/@salesforce/plugin-agent/lib/commands/agent/test/run.js:117:27)\n at AgentTestRun._run (/opt/atlassian/pipelines/agent/build/node_modules/@salesforce/cli/node_modules/@oclif/core/lib/command.js:186:29)\n at process.processTicksAndRejections (node:internal/process/task_queues:105:5)\n at async Config.runCommand (/opt/atlassian/pipelines/agent/build/node_modules/@salesforce/cli/node_modules/@oclif/core/lib/config/config.js:446:25)\n at async run (/opt/atlassian/pipelines/agent/build/node_modules/@salesforce/cli/node_modules/@oclif/core/lib/main.js:97:16)\n at async file:///opt/atlassian/pipelines/agent/build/node_modules/@salesforce/cli/bin/run.js:15:1",
"cause": "INTERNAL_SERVER_ERROR: The specified enum type has no constant with the specified name: RETRY\n at HttpApi.getError (/opt/atlassian/pipelines/agent/build/node_modules/@salesforce/cli/node_modules/@jsforce/jsforce-node/lib/http-api.js:315:15)\n at process.processTicksAndRejections (node:internal/process/task_queues:105:5)\n at async /opt/atlassian/pipelines/agent/build/node_modules/@salesforce/cli/node_modules/@jsforce/jsforce-node/lib/http-api.js:127:33\n at async AgentTester.results (/opt/atlassian/pipelines/agent/build/node_modules/@salesforce/cli/node_modules/@salesforce/agents/lib/agentTester.js:127:25)\n at async Object.poll (/opt/atlassian/pipelines/agent/build/node_modules/@salesforce/cli/node_modules/@salesforce/agents/lib/agentTester.js:89:45)\n at async doPoll (/opt/atlassian/pipelines/agent/build/node_modules/@salesforce/cli/node_modules/@salesforce/core/lib/status/pollingClient.js:62:26) {\n data: {\n errorCode: 'INTERNAL_SERVER_ERROR',\n message: 'The specified enum type has no constant with the specified name: RETRY'\n },\n errorCode: 'INTERNAL_SERVER_ERROR'\n}",
"warnings": [],
"code": "1",
"status": 1,
"commandName": "AgentTestRun"
}

Root Cause

TestStatus type in @salesforce/agents/src/types.ts doesn't include 'RETRY':
type TestStatus = 'NEW' | 'IN_PROGRESS' | 'COMPLETED' | 'ERROR' | 'TERMINATED'

But the API returns status: "RETRY" during polling.

Impact
  • Blocks ALL agent testing via CLI
  • No workaround available
  • Affects both stable and nightly builds
  • --api-version flag doesn't help
System Information
CLI:
@salesforce/cli/2.129.2 darwin-x64 node-v20.19.3

Plugin Version:
@oclif/plugin-autocomplete 3.2.41 (core)
@oclif/plugin-commands 4.1.40 (core)
@oclif/plugin-help 6.2.38 (core)
@oclif/plugin-not-found 3.2.75 (core)
@oclif/plugin-plugins 5.4.59 (core)
@oclif/plugin-search 1.2.39 (core)
@oclif/plugin-update 4.7.23 (core)
@oclif/plugin-version 2.2.38 (core)
@oclif/plugin-warn-if-update-available 3.1.55 (core)
@oclif/plugin-which 3.2.44 (core)
@salesforce/cli 2.129.2 (core)
agent 1.32.5 (core)
apex 3.9.13 (core)
api 1.3.11 (core)
auth 4.3.1 (core)
code-analyzer 5.10.2 (user)
data 4.0.80 (core)
deploy-retrieve 3.24.16 (core)
info 3.4.111 (core)
limits 3.3.80 (core)
marketplace 1.3.10 (core)
org 5.9.72 (core)
packaging 2.25.10 (core)
schema 3.3.98 (core)
settings 2.4.60 (core)
signups 2.6.56 (user)
sobject 1.4.86 (core)
telemetry 3.8.3 (core)
templates 56.11.0 (core)
trust 3.7.114 (core)
user 3.8.0 (core)
asp 0.0.0 (link) /Users/gimli/Documents/dev/workspace/altify-qa-deployment/asp
SF ENV. VARS.
SF_AUTOUPDATE_DISABLE,true
SF_DISABLE_AUTOUPDATE,true
SF_UPDATE_INSTRUCTIONS,Use "npm update --global @salesforce/cli" to update npm-based installations.
Windows: false
Shell: zsh
Channel: stable

Diagnostics

✅ pass - salesforcedx plugin isn’t installed
❌ fail - you have at least one linked plugin
✅ pass - [@salesforce/plugin-trust] can ping: https://registry.npmjs.org
✅ pass - [@salesforce/plugin-trust] can ping: https://registry.yarnpkg.com
✅ pass - [@salesforce/plugin-trust] can ping: https://registry.npmjs.org/
✅ pass - using latest or latest-rc CLI version
❌ warn - [@salesforce/plugin-deploy-retrieve] sourceApiVersion matches apiVersion
✅ pass - can access: https://test.salesforce.com
✅ pass - can access: https://appexchange.salesforce.com/services/data
✅ pass - can access: https://developer.salesforce.com/media/salesforce-cli/sf/channels/stable/sf-win32-x64-buildmanifest
❌ fail - [@salesforce/plugin-auth] CLI supports v2 crypto

Ngôn ngữ chính
Không có dữ liệu ngôn ngữ
Star
571
Fork
80
Merge trung bình
14 giờ 43 phút
Pull request đã merge (30 ngày)
5

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của forcedotcom/cli

Tất cả issue của forcedotcom/cli

Issue tương tự

Thêm issue về CLI

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.