-
Notifications
You must be signed in to change notification settings - Fork 78
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
sf project generate manifest returns inconsistent results #3152
Comments
Thank you for filing this issue. We appreciate your feedback and will review the issue as soon as possible. Remember, however, that GitHub isn't a mechanism for receiving support under any agreement or SLA. If you require immediate assistance, contact Salesforce Customer Support. |
Hey @jakubmplatek, this is a complicated command that performs a lot of concurrent requests to attempt to gather all of the org's metadata. We are actively working on a few changes that will hopefully improve the reliability of this command. I will link to the existing work item (for internal reference). We will try to post here once this is completed for you to test against. You can also watch the Release Notes for updates. |
Thanks for the update @iowillhoit |
It is currently In Progress by one of our engineers but this is not a simple task. It is possible we will have something before the holiday break, but it could be early January.
The idea with this work is to throttle requests to hopefully reduce connection resets. It will also provide the ability to exclude certain types of metadata (maybe with the |
I can work with that, thanks. |
Thanks @jakubmplatek you too! I'll pass your feedback along 👍 |
FYI: Sounds like we are taking the flag approach |
@jakubmplatek - If you'd like to test a draft version of the changes, run Please let me know if this solves your issues. |
Looks like you've nailed it, so far. I ran my test scripts generating 8 manifests each for plugin v With the stable version I got 35 out of 137 types showing differences across the dataset (this is mostly the type missing from the generated package entirely) What is the default batch size when the |
There is no batching of requests by default to match current command behavior. Batching is "opt-in". I tested with batch sizes of 50, 20, and 10 with good results. However, I was using orgs that didn't have a ton of metadata. The manifests were only about 1300 lines total and I never saw a discrepancy. If you want some visibility of what's going on while the command is running you can set this env var: Thanks for the feedback! |
I ran a longer loop and across 78 packages there were 3 faulty ones (not counting the discrepancies with the three big types mentioned earlier), so the issue is still there, but it's definitely more robust now. I can add a fail-check and retry/alert logic to my workflows - with a daily run this failure rate would give me a failure about once a month, so it's not a blocker anymore, plus I didn't see two consecutive runs fail, so a single retry should solve it completely for my org. Thanks for letting me in on the testing fun! |
Summary
I'm building automation to run scheduled snapshots of all metadata in my orgs, using
sf project generate manifest --from-org
command as a base for generating batches of retrieve calls.I noticed some unexpected changes listed between runs, and found that that initial package manifest generated is inconsistent: it will randomly return a different count of members for a type, or skip a type entirely.
I've tested it by running the generate manifest command in a loop against the same environment and then comparing the generated packages, and found individual runs completely missing some types, including:
ApexClass,MatchingRule,CustomObject,ValidationRule,WebLink,AppMenu,CustomField,CompactLayout,CustomPermission,ListView,CustomMetadata
Tested on different instances, both in prod and sandbox orgs, and in different sf projects, all using the latest cli (
2.69.14
)Steps To Reproduce
authenticate with a salesforce org and run the command a few times to generate multiple manifests (date used to autogenerate a different filename each time)
sf project generate manifest --from-org <alias> --name package_$( date +%s ).xml
compare the contents of the generated package manifests - some of them will have whole metadata types missing, or some members within a metadata type missing
note: the issue is intermittent, so it might take 5-10 runs to see significant differences
Tip
use
sf doctor --create-issue
to automatically fill the required informationlogs generated by doctor:
logs.zip
Expected result
while testing in an org without active users (i.e. no changes to metadata), I expect each package manifest to have strictly equal contents
Actual result
components listed differ between generated manifests
Additional information
System Information
Windows 10, Git for Windows bash
The text was updated successfully, but these errors were encountered: