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

Sandbox Creation Text Output #125

Closed
csaaved opened this issue Mar 31, 2020 · 4 comments · Fixed by #126
Closed

Sandbox Creation Text Output #125

csaaved opened this issue Mar 31, 2020 · 4 comments · Fixed by #126
Assignees
Labels
bug Something isn't working
Milestone

Comments

@csaaved
Copy link

csaaved commented Mar 31, 2020

First and foremost, thanks for the sfcc cli! I am new to salesforce and I think it's a pretty awesome tool to have.

I am working on using on Demand sandboxes and running into the following issue:

When I run the following command from the docs:

SANDBOX=sfcc-ci sandbox:create <my-realm> -s -j

I viewed my local variable for SANDBOX, and I found the following text assigned to SANDBOX:

Using realm id my-realm from dw.json of new sandbox 007 for realm my-realm triggered and ongoing. Sandbox id is XXXXX-XXXX-XXXXX, status of sandbox is new. You may use sfcc-ci sandbox:list to check the status of the sandbox. New sandbox host my-realm-007.sandbox.us01.dx.commercecloud.salesforce.com added to list of instances using alias "my-realm-007".

Is this expected? I was under the impression adding the -j flag would output JSON.

Is there some added configuration required in order to output JSON?

Thanks for any help in advance!

@tobiaslohr
Copy link
Contributor

Hi @csaaved, thanks for the kudos and for raising this! You are right, specifying output -j,--json should only write JSON to the output.

I'd therefor treat this as a bug.

One question: which version of the CLI are you using? The latest version does require the realm to be passed as -r,--realm <my-realm> flag. Omitting this flag does attempt to pull the realm from a local dw.json file in the current working directory. If you don't have (or want) that, then please pass the realm like this:

sfcc-ci sandbox:create --realm <my-realm> -s -j

In your case not passing the --realm <my-realm> flag has the command looking for a dw.json file and putting an info message out to the console regardless of the -j,--json flag.

@tobiaslohr tobiaslohr added the bug Something isn't working label Apr 1, 2020
@csaaved
Copy link
Author

csaaved commented Apr 1, 2020

@tobiaslohr

Thanks for the response!

I was running version 2.3.1. I just updated to 2.4.1.

Running the following command:
SANDBOX = $(sfcc-ci sandbox:create --realm <my-realm> -s -j)

I can see on swagger the sandbox enters the 'creating' stage.

Adding the -D shows sfcc-ci is constantly pinging salesforce during this stage to see if sandbox creation is complete.

Once sandbox enters 'started' stage, I receive the following error:

bash: SANDBOX: command not found

tobiaslohr added a commit to tobiaslohr/sfcc-ci that referenced this issue Apr 1, 2020
@tobiaslohr
Copy link
Contributor

bash: SANDBOX: command not found

I think, this is an issue with the bash script. Do you properly assign the output the command (sfcc-ci sandbox:create --realm <my-realm> -s -j) to the variable in the bash script and properly access the value afterwards?

@csaaved
Copy link
Author

csaaved commented Apr 1, 2020

@tobiaslohr
Yup! How embarrassing.

You are correct.

Thanks again!

tobiaslohr added a commit that referenced this issue Apr 2, 2020
#125 log debug instead of info message in case sandbox realm is read …
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants