forcedotcom / salesforcedx-vscode

Salesforce Extensions for VS Code
https://developer.salesforce.com/tools/vscode
BSD 3-Clause "New" or "Revised" License
947 stars 404 forks source link

Same Command Different Outcomes #3143

Closed MGarfOppLoans closed 2 years ago

MGarfOppLoans commented 3 years ago

Summary

Running sfdx force:apex:test:run -l RunLocalTests -u ${username} --json in CI/CD waits for all tests to finish, running locally on mac/windows it returns immediately with the test run id

Steps To Reproduce:

  1. Run sfdx force:apex:test:run -l RunLocalTests -u ${username} --json in Windows or Mac
  2. Get back something also immediately akin too
{
  "status": 0,
  "result": {
    "testRunId": "7071100002CE9yl"
  }
}
  1. Run same command in Github Actions using Ubuntu image.
  2. No immediate response is given and it provides the final report an hour later
undefined undefined
,{
  "status": 0,
  "result": {
    "summary": {
      "outcome": "Passed",
      "testsRan": 2000,
      "passing": 2000,
      "failing": 0,
      "skipped": 0,
      "passRate": "100%",
      "failRate": "0%",
      "testStartTime": "Mon Apr 12 2021 12:05:34 PM",
      "testExecutionTime": "869706 ms",
      "testTotalTime": "869706 ms",
      "commandTime": "1222 ms",
      "hostname": "xxxxxxxxxxxxxxxxx",
      "orgId": "xxxxxxxxxxxxxxxx",
      "username": "xxxxxxxxxxxxxx",
      "testRunId": "707S000001hpUdZ",
      "userId": "00550000007aWbzAAE"
    },
   // cut off for brevity

Expected result

Returns immediately with Test Report ID

Actual result

Only for CI/CD it long tails, the rest give immediate response

Additional information

SFDX CLI Version(to find the version of the CLI engine run sfdx --version): Locally: 7.94.3-a4e7c7955b Remotely: 7.96.0-633fe15

OS and version: Tested on Mac/Windows locally and tested on ubuntu-latest in github actions

github-actions[bot] commented 3 years ago

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.

AnanyaJha commented 3 years ago

Hi @MGarfOppLoans thanks for reporting this! Do you mind sharing what version of the plugins you have locally and in your github actions? You can find this by running sfdx plugins --core.

MGarfOppLoans commented 3 years ago
@oclif/plugin-autocomplete 0.3.0
@oclif/plugin-commands 1.3.0 (core)
@oclif/plugin-not-found 1.2.4 (core)
@oclif/plugin-plugins 1.10.0 (core)
@oclif/plugin-warn-if-update-available 1.7.0 (core)
@oclif/plugin-which 1.0.3 (core)
@salesforce/lwc-dev-server 2.10.0
├─ @oclif/plugin-update 1.3.10
└─ @oclif/plugin-help 2.2.3
@salesforce/sfdx-diff 0.0.6
@salesforce/sfdx-scanner 2.8.0
@salesforce/sfdx-trust 3.6.0 (core)
alias 1.1.8 (core)
auth 1.5.1 (core)
config 1.2.7 (core)
evergreen 0.34.0
└─ evergreen-build 0.20.2
generator 1.1.5 (core)
salesforcedx 51.6.0 (core)
├─ limits 1.0.4 (core)
├─ schema 1.0.4 (core)
├─ data 0.4.3 (core)
├─ apex 0.1.4 (core)
├─ org 1.6.0 (core)
├─ custom-metadata 1.0.11 (core)
├─ templates 51.3.0 (core)
├─ user 1.2.1 (core)
├─ @salesforce/sfdx-plugin-lwc-test 0.1.7 (core)
└─ salesforce-alm 51.6.6 (core)
sfdx-cli 7.94.3 (core)
telemetry 1.1.1 (core)
AnanyaJha commented 3 years ago

Thanks @MGarfOppLoans is that what you have locally? And in GithubActions, do you know what version of the cli gets installed?

MGarfOppLoans commented 3 years ago

That's locally, I'll get the other. Just need to run the command in my ci/cd

randi274 commented 2 years ago

@MGarfOppLoans we've done some work on this recently, can you retest and let us know if you're still facing an issue?

MGarfOppLoans commented 2 years ago

no longer running into the issue