-
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 deploy start' commands are taking a long time to pass back a completion status to pipelines #2495
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. |
@stuartgrieve This might be related to a specific metadata type you have in your project. Can you run the command with |
Is there any harm to setting the SF_DISABLE_SOURCE_MEMBER_POLLING environment variable to True to disable this behavior? I was noticing my GitLab pipeline status was stuck in Status: In-Progress for about 30 minutes after the deployment finished. This deployment only contained 1 I have also seen this behavior in other deployments which contained different types of metadata. |
I would take a look at the description of
|
So based on my understanding on the variable's description, the risk is that the CLI is unable to track what's changed between the local source and the org. The comment " Sometimes you don't require source tracking at all, such as in a continuous integration (CI) job" makes me think you can accept this risk in disabling the source member polling if you are enforcing strict version control via a Git repository, especially when in my case our Git repo is tied to our CI jobs. |
@mcarvin8 If you were able to find which SourceMember it was hanging on (following #2495 (comment)) then we could add it to an exclusion list. Even if you decide to disable source member polling, this could save someone else some time in the future |
I haven't been able to replicate this with the above Logging updates suggested, but I noticed 3 deployments run into this issue in my org (1 production and 2 sandbox) and all deployments were deploying 'ApexComponent'. The Prod deployment which stalled in the CLI was just deploying a single ApexComponent without running any tests in the org. I'll try again to see if I can get the 'Still Looking for SourceMember' log generated with an ApexComponent deployment, but thought I'd share that for now. |
This is stopping us from moving from sfdx to sf commands as sf project deploy start commands keeps timings out and the pipelines are breaking. Any timlines to improve the performance. |
If you don't care about tracking, you can set the Additionally, for long-lived sboxes, the SourceMember history is going to pile up in ways the scratch orgs can't, and that can lead to perf issues as well. Lastly, we need a way to better expose what's taking SourceMember polling so long, which may help you fix issues. The info is in the logs and captured in telemetry, but not in the json responses. |
heads-up...we've added a command for nightly...now |
We dont do source tracking, hence for us it may not be the solution we are looking. We only need a working model of project start command |
Summary
We run our deployment automation using Bitbucket Pipelines, using the docker image: salesforce/cli:nightly-full
Over the past week or two, our development team has noticed validations/deployments hitting the sandbox, completing, and then a significant wait before the
sf project deploy start
command completes in Bitbucket.After some further investigations, it seems to happen more so on successful runs. I ran four scenarios which run on a consistent pipeline script to a single sandbox:
Status: Succeeded
Some 20 minutes later, Bitbucket has still not received the completion status
Steps To Reproduce
I can't provide our repository since the content is sensitive, but this behaviour seems to be agnostic to the metadata included in the build anyway. Below is the script we're using for PR validations:
Expected result
When a validation/deployment successfully completes in an org, the CLI receives the exit code shortly afterwards
Actual result
Instead, we are seeing it hang for 10-20 minutes.
System Information
Terminal: bash
Additional information
The text was updated successfully, but these errors were encountered: