Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

sf project generate manifest --from-org silently drops metadata types unless SF_LIST_METADATA_BATCH_SIZE is set

未关闭
#3,670 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
3/5
预计耗时
1-2 天
新手友好度
68/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
活跃
技术栈
github-actions, node.js
领域
cli, devtools

调研方向

Start with the sf project generate manifest --from-org command and trace the listMetadata calls and handling of SF_LIST_METADATA_BATCH_SIZE. Reproduce the inconsistent type counts with the command shown in the issue, then inspect the debug output to determine why failures are not surfaced. Done means repeated runs produce the same complete manifest, or incomplete results produce warnings and a non-zero exit status.

由索引模型根据 Issue 内容生成。

描述

Summary

sf project generate manifest --from-org still drops whole metadata types at random and reports success, unless SF_LIST_METADATA_BATCH_SIZE is set. That variable came out of #3152, but it is opt-in, so tools that build backups on this command (for example sfdx-hardis org monitor backup) silently miss types by default.

Steps to reproduce

Run the same command five times in a row against one sandbox, without and then with batching:

sf project generate manifest --from-org <alias> --include-packages managed,unlocked --name runN --json
SF_LIST_METADATA_BATCH_SIZE=20 sf project generate manifest --from-org <alias> --include-packages managed,unlocked --name batchN --json
Expected result

The same complete list on every run, or a non-zero status or a warning when a listMetadata call fails.

Actual result

Without batching, the five runs returned 66, 81, 101, 100 and 73 types. Core types were missing in some runs: CustomObject, Flow, LightningComponentBundle, Layout, PermissionSet, Profile. Every run had "status": 0 and "warnings": [], and the debug log shows no error for the dropped types.

With SF_LIST_METADATA_BATCH_SIZE=20, all five runs were identical: 110 types and 13,513 members, about 150 seconds each.

Another org showed the same pattern (47 to 63 types across three runs).

System information
  • @salesforce/cli/2.155.7, darwin-arm64, Node 24.17.0; also on ubuntu-latest in GitHub Actions
  • API version 67.0 / 68.0
Suggestions
  1. Batch the listMetadata calls by default (for example 20), or
  2. at least report the failed types as warnings, or return a non-zero status, so callers can detect an incomplete manifest.

Related: #3152.

主要语言
没有语言数据
星标
571
派生
80
平均合并
14 小时 43 分钟
30 天内合并 PR
5

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

forcedotcom/cli 的其他 Issue

查看 forcedotcom/cli 的全部 Issue

相似的 Issue

更多 CLI Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。