Cli: Unable to push or pull duplicate rules starting with CLI version 50.1.1

Created on 19 Oct 2020  路  16Comments  路  Source: forcedotcom/cli

Summary

Starring with the Winter '21 CLI update (50.1.1), we are unable to push or pull duplicate rules.

Steps To Reproduce:

Repository to reproduce: dreamhouse-lwc

  1. Establish a scratch org per the steps in the dreamhouse readme file
  2. Create a duplicate rule in the dreamhouse scratch org. Here are the values I used:

Screen Shot 2020-10-19 at 2 50 39 PM

  1. Execute the force:source:pull command

Expected result

The duplicate rule will be pulled into the project

Actual result

The duplicate rule is not pulled into the project:

> sfdx force:source:pull                                 
=== Pulled Source
No results found

Additional information

_Feel free to attach a screenshot_.

SFDX CLI Version(to find the version of the CLI engine run sfdx --version):

sfdx-cli/7.76.1-f301d5641f darwin-x64 node-v12.18.3

SFDX plugin Version(to find the version of the CLI plugin run sfdx plugins --core)

@oclif/plugin-autocomplete 0.1.5 (core)
@oclif/plugin-commands 1.3.0 (core)
@oclif/plugin-help 3.2.0 (core)
@oclif/plugin-not-found 1.2.4 (core)
@oclif/plugin-plugins 1.9.1 (core)
@oclif/plugin-update 1.3.10 (core)
@oclif/plugin-warn-if-update-available 1.7.0 (core)
@oclif/plugin-which 1.0.3 (core)
@salesforce/sfdx-trust 3.4.3 (core)
alias 1.1.2 (core)
analytics 1.12.1 (core)
config 1.1.9 (core)
generator 1.1.3 (core)
salesforcedx 50.1.1 (core)
鈹溾攢 templates 50.1.0 (core)
鈹溾攢 @salesforce/sfdx-plugin-lwc-test 0.1.7 (core)
鈹溾攢 custom-metadata 1.0.10 (core)
鈹溾攢 apex 0.1.1 (core)
鈹斺攢 salesforce-alm 50.1.1 (core)
sfdx-browserforce-plugin 1.7.3
sfdx-cli 7.76.1 (core)
sfdx-wry-plugin 0.0.11 (link) /Users/walkej/Documents/sfdx-wry-plugin

OS and version:
MacOS 10.15.6 (19G2021)

bug

Most helpful comment

@thvd - looks like it missed the cutoff for the current release candidate, which would make it an ETA of next week's RC and the following week's release (salesforcedx v50.5.0, Nov 12).

All 16 comments

Thanks for the detailed report and reproducer. We'll get it fixed.

Is there any workaround to fix this? @shetzel ?
@jwalke

Is there any workaround to fix this? @shetzel ?
@jwalke

@leonardopmacedo We're using a previous version of the CLI / sfdx plugin in our pipelines until this gets resolved. Instructions for installing a previous version can be found in this article.

Thank you @jwalke, you saved us <3

@shetzel is there any ETA you can share for this fix?

@thvd - looks like it missed the cutoff for the current release candidate, which would make it an ETA of next week's RC and the following week's release (salesforcedx v50.5.0, Nov 12).

@jwalke @thvd @leonardopmacedo - Another workaround should be to add # .forceignore v2 to your .forceignore file so that only the new parser is used. As it turns out, duplicate rule metadata is being ignored by a default forceignore rule with the old parser. You will need to be on a later CLI version (or salesforcedx plugin) for this workaround to work. Apologies for this regression!

@shetzel I was on v50.5.0 and it wasn't pulling duplicate rules so I rolled back to 49.13.0 but that isn't working either. Any idea when the fix will be released? Thanks

@jwalke what version did you go back to?

p.s. tried the forceignore workaround as well to no avail.

@edralph - we're trying to get the fix into the next RC (and we're behind schedule in getting that out), which would make it in production this coming Thursday. However, adding # .forceignore v2 to your .forceignore file should definitely work around the issue (as should rolling back plugin versions) so if that's working for you then there's something else specific to your environment that is causing it to fail. Temporarily moving the .forceignore file should also work, but obviously that has downsides too.

However, adding # .forceignore v2 to your .forceignore file
@shetzel Silly question... should I include the #? Doesn't that just comment it out? No matter, doesn't work either way. I don't really want to remove the .forceignore file so I'll wait for the fix.

@edralph - yes, you include the #
You can try the fix by installing the current release candidate. sfdx plugins:install salesforcedx@latest-rc

@shetzel got this:
ErrorGettingContent: A request to url https://developer.salesforce.com/media/salesforce-cli/signatures/salesforcedx-50.6.0.sig failed with error code: [403]
Thanks for helping

I've never seen that error before. I'd completely remove the CLI, re-install, then try again.

@edralph got the same error for salesforcedx@latest-rc but after the upgrade from 50.1.1 to 50.5.0 it worked for me, although not immediately. What I did after the upgrade:

  1. Restarted VSCode (just old habit)
  2. Edited the existing rule in VSCode, checked Local Changes but 'No results found'
  3. Added a new duplicate rule to the scratch org, pulled to VSCode, the rule was pulled successfully and it began to see all the changes I made in VSCode to existing rules

@edralph - actually the 403 error you saw when trying to install the latest-rc is a bug we need to fix with our plugin signing. We're working on it. The fix for this issue is in the latest production version though so closing this issue. To get the fix for this issue you can just sfdx update

Just ran the update and it pulled the duplicate rule thank you!

Was this page helpful?
0 / 5 - 0 ratings