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

Doing a force:source:pull return "No results found" when a template had been exported #1062

Closed
pacafuentes opened this issue Jun 24, 2021 · 9 comments

Comments

@pacafuentes
Copy link

Summary

Doing a force:source:pull return "No results found" when a template had been exported.

We ship a template to create a community in our package, when the template needs to be changed we just make changes in the template, export it, and then sfdx force:source:pull to add the files affected by the change in our package.

But after changing the template sfdx force:source:pull returns "No results found"

Steps To Reproduce:

  1. A new scratch is created, push my code ok, next I create a Community and made a pull. I get:

=== Pulled Source No results found

(Which is the expected result)

  1. I create a tab, try pull again, it works:
    === Pulled Source STATE FULL NAME TYPE PROJECT PATH ─────── ──────────────────── ──────── ─────────────────────────────────────────────────────────────────────── Add CommunityApi__c.All1 ListView force-app/base/objects/CommunityApi__c/listViews/All1.listView-meta.xml Changed Admin Profile force-app/components/default/profiles/Admin.profile-meta.xml

  2. Create a community in the scratch org, export the template

  3. Run sfdx force:source:pull , got "No results found" when it should retrieve the exported template

Expected result

Exported template files should be retrieve

Actual result

=== Pulled Source No results found

Additional information

Scratch org dev file:

{ "orgName": "MuleSoft Scratch", "edition": "Developer", "hasSampleData": "true", "country" : "US", "features": ["Communities", "ServiceCloud", "Sites", "PlatformCache", "Knowledge", "LightningServiceConsole"], "settings": { "knowledgeSettings": { "enableKnowledge": true, "enableLightningKnowledge": true }, "lightningExperienceSettings": { "enableS1DesktopEnabled": true }, "communitiesSettings": { "enableNetworksEnabled": true, "enableOotbProfExtUserOpsEnable": true }, "apexSettings": { "enableCompileOnDeploy" : true } } }

Running sfdx force:source:retrieve doesn't get the community metadata either.

I manageed to do a force:pull of just one file. I did the following:

  • Downgrade sfdx-cli to 7.99.0
  • Added the name file I wanted to be downloaded to : my-sfdx-project/.sfdx/sourcePathInfos.json
  • The metadata files of the community created acctually were in my-sfdx-project/.sfdx/maxRevision.json , I changed lastRetrievedFromServer for the file to 0
  • Did a force:pull and the file was downloaded

The metadata files of the community created acctually were in my-sfdx-project/.sfdx/maxRevision.json

This was weird for me, it seems sfdx get notices about the new metadata files, but for some reason the lastRetrievedFromServer and serverRevisionCounter where the same number, which means source:pull won't fetch the last changes

On sfdx log file I could see:
{"name":"sfdx", "log":"RemoteSourceTrackingService","level":40,"msg":"Polling for SourceMembers timed out after 26s and 12 attempts","time":"2021-06-15T16:19:01.167Z","v":0}

It seems like Polling SourceMembers timed out.

SFDX CLI Version: sfdx-cli/7.106.3 darwin-x64 node-v15.12.0

OS and version: OSX Catalina 10.15.7

@pacafuentes pacafuentes added the investigating We're actively investigating this issue label Jun 24, 2021
@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.

@WillieRuemmele
Copy link
Member

Hi @pacafuentes it sounds like you discovered a timeout... there's the environment variable SFDX_SOURCE_MEMBER_POLLING_TIMEOUT which you can set to avoid this error. You can also run the force:source:tracking:* commands to help recover your local source tracking when you know what you should see.

@pacafuentes
Copy link
Author

Hi @WillieRuemmele I set the variable SFDX_SOURCE_MEMBER_POLLING_TIMEOUT to 10 minutes and got the same result

@WillieRuemmele
Copy link
Member

WillieRuemmele commented Jun 25, 2021

ok, just to verify - 10 mins = 600s. So SFDX_SOURCE_MEMBER_POLLING_TIMEOUT=600

there's also SFDX_DISABLE_SOURCE_MEMBER_POLLING which will disable source member polling, so your source tracked results might be wrong (seeing a remote change, when it's already pulled) That's what the source:tracking:* commands are for

Have you tried to force:source:retrieve the metadata? There's a new beta source plugin that fixes a lot of these metadata related issues.

@WillieRuemmele WillieRuemmele added more information required Issue requires more information or a response from the customer and removed investigating We're actively investigating this issue labels Jun 25, 2021
@no-response
Copy link

no-response bot commented Jul 5, 2021

This issue has been automatically closed because there has been no response to our request for more information from the original author. Currently, there is not enough information provided for us to take action. Please reply and reopen this issue if you need additional assistance.

@no-response no-response bot closed this as completed Jul 5, 2021
@pacafuentes
Copy link
Author

pacafuentes commented Jul 14, 2021

Hi! Sorry for the delay.

I used SFDX_SOURCE_MEMBER_POLLING_TIMEOUT=600 and SFDX_DISABLE_SOURCE_MEMBER_POLLING with the same result.

I tried force:source:retrieve and nothing happened.

If there's any useful info I can provide, let me know.

Thanks!

@no-response no-response bot removed the more information required Issue requires more information or a response from the customer label Jul 14, 2021
@no-response no-response bot reopened this Jul 14, 2021
@pacafuentes
Copy link
Author

Same behaviour when a Custom Object is created in the org, when doing force:source:pull the metadata of the Custom Object isn't pull

@jrod9904
Copy link

Same behaviour when a Custom Object is created in the scratch org, when using force:source:pull the metadata of the Custom Object isn't pull

@WillieRuemmele
Copy link
Member

Hi @pacafuentes @jrod9904 sorry to leave you radio silent for 2+ years 😦 ... are you still experiencing these source tracking issues on the latest CLI versions? Have you found any workarounds?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants