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

Weird error if fastly-serviceid parameter is empty #1135

Closed
kptdobe opened this issue Aug 27, 2019 · 5 comments · Fixed by #1137
Closed

Weird error if fastly-serviceid parameter is empty #1135

kptdobe opened this issue Aug 27, 2019 · 5 comments · Fixed by #1137
Assignees
Labels
bug Something isn't working released

Comments

@kptdobe
Copy link
Contributor

kptdobe commented Aug 27, 2019

Description
I lost plenty of time on this stupid issue. If fastly-serviceid is empty, you get the following error message:

Error while running the Publish command
preparing fastly transaction
error: Error while running the Publish command: FastlyError
    at request.then (/Users/acapt/.nvm/versions/node/v10.16.0/lib/node_modules/@adobe/helix-cli/node_modules/@adobe/fastly-native-promises/src/httpclient.js:107:17)
    at process._tickCallback (internal/process/next_tick.js:68:7)

To Reproduce
Steps to reproduce the behavior:

  1. Run hlx publish --fastly-serviceid "" (assuming you have other parameters properly set)

Expected behavior
An error message like when no parameter at all is provided:

Missing required argument: fastly-serviceid
Fastly Service ID is required.

Version:
run: $ hlx --version
4.10.0

@kptdobe kptdobe added the bug Something isn't working label Aug 27, 2019
@trieloff
Copy link
Contributor

@MarquiseRosier that might be something for you.

@tripodsan
Copy link
Contributor

@kptdobe did you still have the old HLX_FASTY_NAMEPSACE in the .env ?

@MarquiseRosier
Copy link
Contributor

I'm the params man lol

@kptdobe
Copy link
Contributor Author

kptdobe commented Aug 28, 2019

@tripodsan No. I think I was fine with the param names, I discovered the issue accidentally on CircleCI where my env variable was not transferred from one step to another thus value was empty. I was doing:

hlx publish --fastly-serviceid $TEST_SERVICE

and TEST_SERVICE was empty. In the previous step, I was setting it properly and echo worked. It is just not "exported" automatically.

It just took me a while to realise the pb was the value and not something related to my npm setup or a weird issue in the cli.

MarquiseRosier added a commit that referenced this issue Aug 30, 2019
This moves logic for checking for empty required parameters to a yargs-check.js

"fix #1135"
MarquiseRosier added a commit that referenced this issue Sep 3, 2019
This ensures that the arguments are not empty!

"fix #1135"
MarquiseRosier added a commit that referenced this issue Sep 4, 2019
This ensures that the arguments are not empty!

"fix #1135"
trieloff pushed a commit that referenced this issue Sep 4, 2019
## [5.0.2](v5.0.1...v5.0.2) (2019-09-04)

### Bug Fixes

* **cli:** fixes Fastly Error from empty string passing ([#1137](#1137)) ([3c34c41](3c34c41)), closes [#1135](#1135)
@adobe-bot
Copy link
Collaborator

🎉 This issue has been resolved in version 5.0.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working released
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants