• Sam Mohyee 12
  • NEWBIE
  • 15 Points
  • Member since 2018

  • Chatter
    Feed
  • 0
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 4
    Questions
  • 3
    Replies

Here's what I've been staring at for 16 minutes so far. 

User-added image

Deployed via SFDX, specifying a single apex test to run, which has less than 40 lines of code. Takes only a fraction of a second to run in scratch org or sandbox.

But when I deploy to Production, all components are validated within a minute or two, then the status switches to 'Running {testname}'.... and stays that way. For literally 15 minutes or more. Before the test is even started. 

I'm not finding a lot of posts on this issue. Plenty of people talking about the time it takes to actually run the test. But I'm talking about the time it takes to start running the tests. This isn't a one time thing, but it also isn't consistent. Sometimes the tests will begin running pretty much immediately. Sometimes I'll end up cancelling and redeploying because a 30 minute delay to START testing seems ridiculous even given Salesforce's standards. And when I do cancel and redeploy? Good chance it'll take a fifth of the time, for no apparent reason.

What I'd really like is some better communication during this process. Why is my test run delayed? What was prioritized ahead of it? How can I anticipate deployment times so it's not a complete crapshoot regardless of build size? 

I've posted on SF StackExchange and this forum about a bug in SFDX's metadata retrieval process (link here). Sure, there's always a chance I'm mistaken, and it's user error or something. But if it is indeed a bug, what's the appropriate process to make Salesforce aware?

To date, the answer has been, 'log a case and hope they escalate it appropriately'. What's infuriating about Salesforce support is that I can't categorize my issue properly under Development, because that topic requires some higher, paid support tier. Presumably because they think I need help learning how to develop or something. No, Salesforce, I just want to make you aware of a replicable bug with your new tool!

Short of logging a case under an irrelevant topic header and trying to escalate it to the right people, is there a more straightforward way to communicate possible bugs/issues with Salesforce?

I'm trying to convert some code I'm writing in my sandbox into an SFDX project. 

Per the SFDX doc (here), I created an unmanaged package in the package manager in my sandbox, and added my apex class, which in turn pulled into the package all the fields and objects referenced by the class:
User-added image

Note that there are three custom objects from a managed package included there:

  • Loan
  • Deposit
  • Entity Involvement

However, when I look at the unzipped package retrieved via sfdx force:mdapi:retrieve, there appears to only be metadata for one of those objects, along with the standard account object (which we've relabeled 'Relationship'):

User-added image

Naturally, this produces an error when trying to convert to an SFDC project and deploy to a scratch org, since referenced metadata is missing. Note that all but the Account object are part of a managed package... but it's strange that one of the managed package objects was retrieved successfully, and the other two didn't. 

Is this a bug, or am I doing something wrong? And if it's a bug, how can I report it if our company's SF support level precludes any development-related cases?

When using Visual Studio code, you should be able to hit [SHIFT] + [ALT] + [F] in Windows to auto-format a file. I'm mainly interested in auto-indentation, like what is available in the Dev Console with [SHIFT] + [TAB].

Doing so on an apex file returns the error: There is no formatter for 'apex'-files installed.

Anyone know a solution to this? I'm currently looking into installing an extension to provide Java formatting support, and extending its file types to include .apex files. 

Here's what I've been staring at for 16 minutes so far. 

User-added image

Deployed via SFDX, specifying a single apex test to run, which has less than 40 lines of code. Takes only a fraction of a second to run in scratch org or sandbox.

But when I deploy to Production, all components are validated within a minute or two, then the status switches to 'Running {testname}'.... and stays that way. For literally 15 minutes or more. Before the test is even started. 

I'm not finding a lot of posts on this issue. Plenty of people talking about the time it takes to actually run the test. But I'm talking about the time it takes to start running the tests. This isn't a one time thing, but it also isn't consistent. Sometimes the tests will begin running pretty much immediately. Sometimes I'll end up cancelling and redeploying because a 30 minute delay to START testing seems ridiculous even given Salesforce's standards. And when I do cancel and redeploy? Good chance it'll take a fifth of the time, for no apparent reason.

What I'd really like is some better communication during this process. Why is my test run delayed? What was prioritized ahead of it? How can I anticipate deployment times so it's not a complete crapshoot regardless of build size? 

Here's what I've been staring at for 16 minutes so far. 

User-added image

Deployed via SFDX, specifying a single apex test to run, which has less than 40 lines of code. Takes only a fraction of a second to run in scratch org or sandbox.

But when I deploy to Production, all components are validated within a minute or two, then the status switches to 'Running {testname}'.... and stays that way. For literally 15 minutes or more. Before the test is even started. 

I'm not finding a lot of posts on this issue. Plenty of people talking about the time it takes to actually run the test. But I'm talking about the time it takes to start running the tests. This isn't a one time thing, but it also isn't consistent. Sometimes the tests will begin running pretty much immediately. Sometimes I'll end up cancelling and redeploying because a 30 minute delay to START testing seems ridiculous even given Salesforce's standards. And when I do cancel and redeploy? Good chance it'll take a fifth of the time, for no apparent reason.

What I'd really like is some better communication during this process. Why is my test run delayed? What was prioritized ahead of it? How can I anticipate deployment times so it's not a complete crapshoot regardless of build size? 

I'm trying to convert some code I'm writing in my sandbox into an SFDX project. 

Per the SFDX doc (here), I created an unmanaged package in the package manager in my sandbox, and added my apex class, which in turn pulled into the package all the fields and objects referenced by the class:
User-added image

Note that there are three custom objects from a managed package included there:

  • Loan
  • Deposit
  • Entity Involvement

However, when I look at the unzipped package retrieved via sfdx force:mdapi:retrieve, there appears to only be metadata for one of those objects, along with the standard account object (which we've relabeled 'Relationship'):

User-added image

Naturally, this produces an error when trying to convert to an SFDC project and deploy to a scratch org, since referenced metadata is missing. Note that all but the Account object are part of a managed package... but it's strange that one of the managed package objects was retrieved successfully, and the other two didn't. 

Is this a bug, or am I doing something wrong? And if it's a bug, how can I report it if our company's SF support level precludes any development-related cases?

When using Visual Studio code, you should be able to hit [SHIFT] + [ALT] + [F] in Windows to auto-format a file. I'm mainly interested in auto-indentation, like what is available in the Dev Console with [SHIFT] + [TAB].

Doing so on an apex file returns the error: There is no formatter for 'apex'-files installed.

Anyone know a solution to this? I'm currently looking into installing an extension to provide Java formatting support, and extending its file types to include .apex files.