Skip to content
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

sfdx force:mdapi:deploy does nothing and passes succesfully #1508

Closed
patrykacc opened this issue May 13, 2022 · 47 comments
Closed

sfdx force:mdapi:deploy does nothing and passes succesfully #1508

patrykacc opened this issue May 13, 2022 · 47 comments
Labels
investigating We're actively investigating this issue

Comments

@patrykacc
Copy link

Summary

In our CD pipeline hosted on bitbucket, we use the sfdx force:mdapi:deploy command to deploy a source to a sandbox.
Since today it just stopped deploying the code, and doesn't fail, just passes correctly doing nothing.

Steps To Reproduce:

  1. use sfdx force:source:convert command to create package
  2. then use sfdx force:mdapi:deploy to deploy

I cant provide a repository, but its size is about 4000 components with a small piece of static resources (a couple of MB).

Expected result

The latest changes from the package are deployed to the org.

Actual result

Nothing happens, deployment is not shown even on sandbox under the deployment tab, pipeline passes this step correctly and moves forward.

System Information

sfdx-cli/7.82.0-3d0c527ac6 linux-x64 node-v12.18.3

Please let me know in case you need any more data for investigation, this issue impacts greatly our development process, thanks.

@patrykacc patrykacc added the investigating We're actively investigating this issue label May 13, 2022
@github-actions
Copy link

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.

@eashanp2901
Copy link

Hello @patrykacc, In our project we are doing the same thing. using sfdx force:source:convert command to create package and then using sfdx force:mdapi:deploy to deploy the components to our sandboxes. Please let me know if you find any solution or workaround for this issue. Thank you.

@saikatd88
Copy link

saikatd88 commented May 13, 2022

As a temporary workaround, try to downgrade to SFDX version. 7.149.1 seems to have worked for me.

@SoftCreatR
Copy link

SoftCreatR commented May 13, 2022

When I tested it, it didn't work properly. However, looks like something has changed within the last hour, because when I tried it again (with 7.149.1), it started immediately.

However it might work in the latest versions by using force:mdapi:legacy:deploy instead of force:mdapi:deploy (which has been recently replaced by the functionality introduced in force:mdapi:beta:deploy).

@eashanp2901
Copy link

eashanp2901 commented May 13, 2022

force:mdapi:legacy:deploy this worked for me. Thank you so much @SoftCreatR

@mshanemc
Copy link
Contributor

mshanemc commented May 16, 2022

sfdx-cli/7.82.0-3d0c527ac6 linux-x64 node-v12.18.3

that is an extremely old CLI (like a year and a half). Please update it.
There's likely something wrong with the commands, but using a newer CLI might help.

once that's done, please supply the version information that the issue template requests, as well as the command that you're running.

@babula
Copy link

babula commented May 16, 2022

I'm having this issue as well. I first noticed it on Friday 5/13 so I'm assuming it was introduced in version 7.150.0. I have it running on GitHub with the latest version (sfdx-cli/7.150.0 linux-x64 node-v16.15.0) and was able to reproduce it locally as well (sfdx-cli/7.150.0 win32-x64 node-v16.15.0). Below is the command I'm running. The legacy command does still work, thankfully.

sfdx force:mdapi:deploy -u DevOrg -d src -w -1 --verbose

@mshanemc
Copy link
Contributor

there's a bug with -w -1 that's being tracked as #1519

I'm trying to figure out if this is a different issue--the "it does nothing" (that is, it doesn't start a deployment at all) seems different than the "it's not waiting and timing out" that 1519 is tracking.

Or whether this is just something about that really old CLI version.

@iowillhoit
Copy link
Contributor

Morning all 👋 The --wait -1 (-w -) bug has been fixed in latest-rc. This will be promoted to latest` on Thursday.
• Update with npm: npm install -g sfdx-cli@latest-rc
• Update with Installer: sfdx update stable-rc (run sfdx update stable to rollback)

Please let us know if you continue to have issues. Thanks for everyone's patience while it got this fixed!

@dcstuff
Copy link

dcstuff commented May 18, 2022

@mshanemc Heya. Same issue as the original. sfdx-cli/7.150.0 win32-x64
Success without doin' anything. Downgrading to 149.1 solved it.

@iowillhoit
Copy link
Contributor

Hey @dcstuff, 7.150.0 has the bug. The latest-rc release 7.151.1 has a fix. This will be promoted to latest/stable tomorrow (Thursday) morning.

@dcstuff
Copy link

dcstuff commented May 18, 2022

Thanks, @iowillhoit ! Much appreciated!

@felix-clay
Copy link

Hey @dcstuff, 7.150.0 has the bug. The latest-rc release 7.151.1 has a fix. This will be promoted to latest/stable tomorrow (Thursday) morning.

Any update on this? We are still facing issues as of 13.33 GMT.

Do you know when 7.151.1 will be released in GMT?

Many thanks in advance

@felix-clay
Copy link

We tried the workaround using force:mdapi:legacy:deploy and this does allow the command to start the deployment to our environments, however it seems this command does not play nice with destructiveChanges.xml as i'm getting multiple errors because component doesn't exist, whereas this has not been a problem with the same repo before this bug.

Any help would be hugely appreciated

@iowillhoit
Copy link
Contributor

@felix-clay 7.151.1 should be promoted to latest by 4:00pm GMT. I say "should" because last week we had issues with our CI build triggering. However, you can use 7.151.1 now though by installing the Release Candidate:

• Update with npm: npm install -g sfdx-cli@latest-rc
• Update with Installer: sfdx update stable-rc (run sfdx update stable to rollback)

Regarding your second comment, this issue is really tracking the --wait -1 flag not working as expected. If you are seeing a different issue, could you please open a new issue so we can keep things organized? Be sure to provide all of the info in the Bug template (version, commands with flags, reproduction steps, etc). Thanks a lot!

@iowillhoit
Copy link
Contributor

Version 7.151.1 has been promoted to latest! This should fix all of the --wait -1 issues. If you are having issues unrelated to the --wait flag, please open a new ticket. Thanks!

@felix-clay
Copy link

@felix-clay 7.151.1 should be promoted to latest by 4:00pm GMT. I say "should" because last week we had issues with our CI build triggering. However, you can use 7.151.1 now though by installing the Release Candidate:

• Update with npm: npm install -g sfdx-cli@latest-rc • Update with Installer: sfdx update stable-rc (run sfdx update stable to rollback)

Regarding your second comment, this issue is really tracking the --wait -1 flag not working as expected. If you are seeing a different issue, could you please open a new issue so we can keep things organized? Be sure to provide all of the info in the Bug template (version, commands with flags, reproduction steps, etc). Thanks a lot!

This is still not resolved for me, I am using sfdx-cli/7.151.1 linux-x64 node-v16.15.0 and sfdx force:mdapi:deploy is still completing without actually deploying.

Is this working for anyone else?

@SoftCreatR
Copy link

sfdx-cli 7.151.1 is outdated. You may upgrade to 7.152.0.

@cristiand391
Copy link
Member

@felix-clay could you open a new issue with and complete the template? It seems you might be experiencing a different issue.

have you tried downgrading to 7.149.1 to confirm that it works?

@SoftCreatR
Copy link

SoftCreatR commented May 19, 2022

@iowillhoit @cristiand391 But the symptoms described by @felix-clay are the same as described in the initial issue comment? Btw. upgrading to 7.152.0 doesn't seem to fix it.

@cristiand391
Copy link
Member

@SoftCreatR yes, I'm seeing 2 different bugs here:

  1. command finishes successfully but does nothing
  2. timeouts when using -w -1

bug 2 was fixed in 7.151.1, and that's why we closed this issue, the original author experienced bug 1 but didn't provide more details.

I'll reopen it but will need more info to help troubleshooting:

  1. Does downgrading to 7.149.1 and using force:mdapi:deploy works in the same repo?
  2. With latest 7.152.0, can you see the deploy in the deployment tab in the org?

Also you can get logs by appending --dev-debug to the command.

@cristiand391 cristiand391 reopened this May 19, 2022
@SoftCreatR
Copy link

SoftCreatR commented May 19, 2022

  1. Yes, it does.
  2. No, I can't.

Log: https://gist.github.com/SoftCreatR/b0df4b0f6e60564a25bd457f2cb5a73f

It still works using force:mdapi:legacy:deploy.

@felix-clay
Copy link

  1. Yes, it does.
  2. No, I can't.

Log: https://gist.github.com/SoftCreatR/b0df4b0f6e60564a25bd457f2cb5a73f

It still works using force:mdapi:legacy:deploy.

Agree with above

  1. Still works with same repo on older version.
  2. Deployment doesn't reach the salesforce org, get no output or error messages. Just runs the command and says it's a success with no output.

@sss-sf-dev
Copy link

We have the same issue. It seems to have to do with the size(s?) of the static resources. If I remove our largest one everything is fine. If I trim that one down everything is fine. I don't know if it's the combined size, or the individual file size, but for sure, if I remove the large one from the export and omit it from the package xml then everything deploys without a problem.

Otherwise all the symptoms above apply.

@SoftCreatR
Copy link

SoftCreatR commented May 30, 2022

Heads up: Issue still exists in sfdx 7.153.0.

As a workaround, we switched from mdapi:deploy to source:deploy, which works just fine.

@shetzel
Copy link
Contributor

shetzel commented Jun 2, 2022

  1. Does everyone having problems with force:mdapi:deploy also have large static resources? If so what's the size and does the same command work as expected without the static resources?
  2. Does everyone having problems with force:mdapi:deploy not have problems when deploying the same payload in source formate via force:source:deploy?

I'm trying to gather as much data as I can to reproduce it so anything you all have in common would really help.

@Rogeriohsjr
Copy link

Rogeriohsjr commented Jun 2, 2022

@shetzel

  1. yes, we have large static resources.
    1.1. The size varies, top 3( 3.9MB, 2.3 MB, 2.2MB)
    1.2. If I delete the static resource folder and remove that from my package.xml, the deploy command works.
    1.3. If I try to deploy only the static resources, it doesn't work. It works only wen I add legacy.
  2. Didn't try source:deploy because needs extra config.

@astef-trilogy
Copy link

@shetzel The same command works for a few files, but fails with "full" redeployment of all classes, so I think it's safe to assume that the size is the issue for us as well.

@shetzel
Copy link
Contributor

shetzel commented Jun 3, 2022

Thanks @Rogeriohsjr and @astef-trilogy. It took a while, but I reproduced it.

I started by adding 4.3M static resources to the Dreamhouse project. I got to 78M and it was still deploying everything just fine. I then added 1000 CustomLabels. Still deploys fine. I added 1000 ApexClasses (copies of the PropertyController class) and 💥. Fail. I then removed static resources until I got a successful deploy with the 1000 ApexClasses and got a success around 14M. I added static resources back until 22M and used force:source:deploy with success while force:mdapi:deploy failed. Should hopefully get a fix in the next RC.

@telenyeco
Copy link

Same issue using: sfdx-cli/7.153.1

force:mdapi:deploy does nothing

@brandbarr
Copy link

Affected here as well.

@astef-trilogy
Copy link

Downgrading to 7.149.1 works for the same package & command.

@kcstec7
Copy link

kcstec7 commented Jun 9, 2022

We're having the same issue here, just tried out with 7.154.0 and it's not working.

@cperes-sprintmind
Copy link

I am having the same issue here too. Version 7.154.0 is not working. The command simply does nothing at all.
It worked using force:mdapi:legacy:deploy

@Starz26
Copy link

Starz26 commented Jun 16, 2022

Another vote for the same issue happening. Legacy deploy worked. on sfdx-cli/7.154.0 darwin-x64 node-v16.15.0

@hassanalamibmx
Copy link

was able to reproduce in sfdx-cli/7.155.1

@shetzel
Copy link
Contributor

shetzel commented Jun 23, 2022

This should now be fixed with CLI v7.156.1

@shetzel shetzel closed this as completed Jun 23, 2022
@sf-erush
Copy link

Hi, hate to report this. But I am seeing this behavior in sfdx-cli/7.176.1 linux-x64 node-v14.19.0 in the sfdx force:mdapi:deploy cmd. This was as of today 11-11-22 @shetzel

@clemb8
Copy link

clemb8 commented Nov 14, 2022

Hi, We've got the same behavior here on our CI : salesforce/salesforcedx:latest-slim image (7.176.1) in the sfdx force:mdapi:deploy commande

@zhortonrocket
Copy link

@shetzel I'm running 7.176.1 and am also seeing this issue has popped back up. Our builds started to fail around Nov 11th. Running force:mdapi:legacy:deploy does work as workaround for us.

@shetzel
Copy link
Contributor

shetzel commented Nov 21, 2022

Can one or more of you run your deploy command using the doctor to generate a log that should contain a stack trace?
sfdx doctor --command="full_mdapi_command"

We'll need the stack trace to see where it's coming from. A small project to repro it would be super helpful as well but the stack trace should point us to the problem code.

@Rogeriohsjr
Copy link

Running the command you suggested asked me to upgrade my version. After I upgraded I didn't see the issue anymore.

"Update your CLI version from: 7.176.1 to the latest version: 7.177.1."

I just run the sfdx update.

Thanks for that command, it shows some suggestion to fix some other issues as well like apiVersion in sfdx-project.json.

@shetzel
Copy link
Contributor

shetzel commented Nov 21, 2022

@Rogeriohsjr - glad that worked for you!

I'd like to make sure that CLI version 7.177.1 works for everyone else as well. If it doesn't, please help us squash this bug by providing a stack trace and/or repro. Using the doctor command is a great way to discover potential configuration issues.

@sf-erush
Copy link

@shetzel our builds are back up and working. Thanks

@zhortonrocket
Copy link

@shetzel our builds are also working again after the update. Thanks!

@tony-tawk-ei
Copy link

Hello , i am facing this issue with the version 7.188.1 .

@mshanemc
Copy link
Contributor

@tony-tawk-ei can you please open a new issue with the standard reproduction stuff. That's sounds like something new.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
investigating We're actively investigating this issue
Projects
None yet
Development

No branches or pull requests