-
Notifications
You must be signed in to change notification settings - Fork 74
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
wskdeploy failing to read configuration file from user home directory for 386 version #1014
Comments
Thanks James... and it looks easy to slot in that fallback function on error
|
and I believe while we are at it, we should emit a warning if we drop into looking for a "fallback" method and add Verbose/Trace to indicate where we ended up finding the value we will attempt to use (and the value itself) |
Looks like the We might want to follow that approach instead. |
@jthomas Yeah was grepping around, will look at as well.. the lib. (i.e., https://github.com/mitchellh/go-homedir) it appears to be a single file under MIT license which if we switch to we would need to note. |
@jthomas @pritidesai be aware we believe that the long-term fix (i.e., use a robust library like the one you found) within go-client is the correct fix and that would cause us then to clean up wskdeploy to not have ANY fallback methods. That is, we would only use the ReadProps from go-client exclusively (once it impl. a platform-aware solution) where as today we use a hybrid of the (failing) go-client and rely upon the utils/misc.go code you found For now, we have a PR to do a quick fix. Priti volunteered to open issues address this in go-client and then leveraged afterwards in wskdeploy. |
Looks like James Dubee added this lib. and "Expand()" to the CLI as part of the Go formatting PR: apache/openwhisk-cli@c615efb |
I've checked the new version and it works - thanks for the quick turnaround. |
@pritidesai @jthomas Thanks James for bringing this issue to us and also pointing us to the quick fix. |
The 386 release of the tool fails to retrieve the user's home directory from the system. This causes it to expect the
wskprops
file in the current directory rather than the user's home directory.example
Run a
docker run -it ubuntu
container and retrieve the latest release archive of the tool from the release page.Using a simple manifest run the 386 & amd64 versions of the tool with the
-v
flag and check the differentCfgFile
property values.cause
The cause is due to
user.Current
method not being available for 386.Here's a test file to show the issue...
solution
I've found an existing workaround in another project - that we might want to add:
https://github.com/schachmat/ingo/blob/4b355b487cca8ac509823a2b410a1d9c79fb214c/in.go#L35-L41
This can be used when
user.Current()
returns an error.The text was updated successfully, but these errors were encountered: