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

Org creation and/or run test commands timeout or take much longer #57

Closed
afawcett opened this issue Apr 15, 2018 · 4 comments
Closed

Org creation and/or run test commands timeout or take much longer #57

afawcett opened this issue Apr 15, 2018 · 4 comments

Comments

@afawcett
Copy link

afawcett commented Apr 15, 2018

As per the discussion on StackExchange I am still finding org creation hangs. I updated with the latest .yaml edits made to this repo and still had no luck. Is this build still working? I also see some comments from Travis support on the SE post above.

Finally i used the option described in the StackExchange post, while this works i do see a number of npm obsolete errors so would prefer to use the recommended approach from this repo.

My repository is https://github.com/afawcett/declarative-lookup-rollup-summaries. Note that the yaml also includes some changes to attempt to get test failures to abort the build. These edits in the script section where made afterward.

@afawcett
Copy link
Author

I have reverted my travis config file back (from the working npm installation route shared on the SE post above) so that i can compare with this repo (which appears to have built successfull a few days ago)... you can see the two configs are pretty much identical... any thoughts?

Working... (from this repo)

{
  "sudo": true,
  "os": "trusty",
  "cache": false,
  "env": "URL=https://developer.salesforce.com/media/salesforce-cli/sfdx-linux-amd64.tar.xz",
  "before_install": [
    "openssl aes-256-cbc -K $encrypted_f42060fe945a_key -iv $encrypted_f42060fe945a_iv -in assets/server.key.enc -out assets/server.key -d",
    "export SFDX_AUTOUPDATE_DISABLE=false",
    "export SFDX_USE_GENERIC_UNIX_KEYCHAIN=true",
    "export SFDX_DOMAIN_RETRY=300",
    "mkdir sfdx",
    "wget -qO- $URL | tar xJ -C sfdx --strip-components 1",
    "./sfdx/install",
    "export PATH=./sfdx/$(pwd):$PATH",
    "sfdx --version",
    "sfdx plugins --core",
    "sfdx force:auth:jwt:grant --clientid $CONSUMERKEY --jwtkeyfile assets/server.key --username $USERNAME --setdefaultdevhubusername -a HubOrg"
  ],
  "script": [
    "sfdx force:org:create -v HubOrg -s -f config/project-scratch-def.json -a ciorg",
    "sfdx force:org:display -u ciorg",
    "sfdx force:source:push -u ciorg",
    "sfdx force:apex:test:run -u ciorg -c -r human",
    "sfdx force:org:delete -u ciorg -p"
  ],
  "language": "ruby",
  "group": "stable",
  "dist": "trusty"
}

Not Working... (from my repo)

{
  "sudo": true,
  "os": "trusty",
  "cache": false,
  "env": "URL=https://developer.salesforce.com/media/salesforce-cli/sfdx-linux-amd64.tar.xz",
  "before_install": [
    "openssl aes-256-cbc -K $encrypted_ddb2fdebbf95_key -iv $encrypted_ddb2fdebbf95_iv -in assets/server.key.enc -out assets/server.key -d",
    "export SFDX_AUTOUPDATE_DISABLE=false",
    "export SFDX_USE_GENERIC_UNIX_KEYCHAIN=true",
    "export SFDX_DOMAIN_RETRY=300",
    "mkdir sfdx",
    "wget -qO- $URL | tar xJ -C sfdx --strip-components 1",
    "./sfdx/install",
    "export PATH=./sfdx/$(pwd):$PATH",
    "sfdx --version",
    "sfdx plugins --core",
    "sfdx force:auth:jwt:grant --clientid $CONSUMERKEY --jwtkeyfile assets/server.key --username $USERNAME --setdefaultdevhubusername -a HubOrg"
  ],
  "script": [
    "set -e",
    "sfdx force:org:create -v HubOrg -s -f config/project-scratch-def.json -a ciorg",
    "sfdx force:org:display -u ciorg",
    "sfdx force:source:push -u ciorg",
    "sfdx force:apex:test:run -u ciorg --wait 10",
    "sfdx force:org:delete -u ciorg -p"
  ],
  "language": "ruby",
  "group": "stable",
  "dist": "trusty"
}

@afawcett
Copy link
Author

Ok so this is a bit crazy... it now appears to be working... though the org create command does take a much long time to response then the npm install approach. I guess for now i can close this...

@afawcett afawcett changed the title Org creation hangs Org creation and/or run tests hangs Apr 15, 2018
@afawcett
Copy link
Author

Re-opening this as the commands respond very slowly it seems with this configuration, not ideal for CI. In contrast when the npm install route is used (see commented out bits in my config and StackExchange comments above) the commands responded as per local experience.

@afawcett afawcett reopened this Apr 15, 2018
@afawcett afawcett changed the title Org creation and/or run tests hangs Org creation and/or run test commands timeout or take much longer Apr 15, 2018
@dcarroll
Copy link
Contributor

dcarroll commented Apr 16, 2018

We have a bug to figure out why the Faye client times out. You can set the create:org command with --wait 2 to have the create finish after 2 minutes. The default timeout is 6 minutes (we are bugging that too to set to 2 min default).

There is no difference in installing the CLI for npm or using the wget and tar commands.

The current .travis.yml file is configured properly.

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

2 participants