ibm-functions / shell Goto Github PK
View Code? Open in Web Editor NEWAn Electron-based development tool for IBM Cloud Functions and Composer.
License: Apache License 2.0
An Electron-based development tool for IBM Cloud Functions and Composer.
License: Apache License 2.0
let f = x => x
invoke f -p secret $SECRET
where $SECRET
is picked up from the environment
"This activation is probably from the CLI, and so has no timeline tree to render
Internal Error" is confusing - plus internal error.
When invoking a long-running composer sequence (~20 sec), I get the error
Unknown Error From API: socket hang up
in both thefsh
CLI and the Electron shell. A later inspection of the activation logs shows that the top-level action and all subactions completed successfully. I can retrieve the result of the top-level action in the Electron shell.
Please let me know how I can provide more information if needed.
i'd like to save my history to a file, is there support for this yet?
also history -h
would be nice.
@cfjedimaster commented on Mon Oct 09 2017
I'm testing stuff at an airport with slow wifi and there is significant lag going from one thing to another. With no loading indicators, it appears as if things are broken. I'd add loading indicators pretty much everywhere.
When typing into the shell, I get filename completion options below where I am typing the command. If I click on one of the filenames, it completes as expected but the filename options below the typing area do not disappear. The options remain in place even if I hit enter multiple times.
This only happens when I click on one of the options.
The shell does a good job of handling inline functions:
It basically just shows a code snippet. But it would be nice if I could somehow annotate my code and have that show up instead. If I want the code I can still get it via the links at the bottom, but I'd much rather have a short name instead of a code snippet.
motivating use case: bash command completion.
see this issue apache/openwhisk#2886
I absolutely love the detailed reports in fsh table, however, it looks to only report on the last 5 things with activity. If my thing is not on that list, I'm screwed. Also, I may not care about the actual table per se, just the activity grid for app/action X.
So I'd like to see something like: fsh table X
Table doesn't really make sense in this context, but basically, give me a report just for X, I don't care about other items.
@cfjedimaster commented on Tue Oct 10 2017
This is probably a bit picky, but I figured I'd post it to see what other's thought. Look at the amount of space used for the header here:
Maybe it should be slimmed down a bit? I don't plan on doing "stuff" in the shell, but I know some folks will, so having more space to enter commands and such may be nice.
@rabbah commented on Tue Oct 10 2017
The footer seems to have expanded also in recent releases.
when i'm creating a bunch of actions quickly, each one will open the side car which then i imediately dismiss to regain full scree for the terminal --- would it make sense to add a checkbox or some toggle that allows me to disable the sidecar?
but creating the same app from the shell will label it app
Where is the help for commands supported by the shell? Running help loads up info on some things, but what about commands like ls, cat, clear, etc?
Also - where is the help about the shell environment in general. For example, I just found that pwd works. It shows my local directory from where I ran fsh. But ls is a list of resources. So... in some ways the file sys commands are remote, and sometimes they are local.
the shell enters GC of Death when creating actions from existing local zip files. symptom:
fsh action update foo foo.zip
followed by a hang of the shell that can only be resolved by force-quitting (kill -9) the shell.
If a users namespace is not us-south does app init auto provision compose redis in the same geo?
@ioana-blue commented on Wed Oct 11 2017
I had this happen twice, so it seems like a consistent bug. I list activations, click on the second one, I get the result you can see in the print screen. That's a fragment of the logs (actually probably all the logs for that activation). Also, fsh shell
goes to lala land and never comes back.
@ioana-blue commented on Wed Oct 11 2017
This print screen may help debug.
@ioana-blue commented on Wed Oct 11 2017
the ibm cloud token above may be a red herring. one pattern that I identified and might help debug: the action was a web action that returned something unexpected like {body: undefined}
due to a bug in calling openwhisk sdk (it looks like a corner case that may be hard to reproduce). I had the same issue twice in a row. from the same fsh shell
session I was able to visualize other activations just fine.
it might be nice to avoid the mouse sometimes, and to be able to tab through a clickable context and hit enter to select
it's a better use of white space in some cases (screen shots)
and avoid the problem of changing the width of the terminal when rapidly creating actions.
maybe there's a fast switch mode to move the side car from right to bottom.
related to #21.
@cfjedimaster commented on Mon Oct 09 2017
When looking at the trace view of an activation, the initial input should be shown as well. Probably as a mouse over on the Entry node.
when the side car is open, the left side uses a compact mode which drops the context and drops some of the white space between commands. can we made that an option without the side car also?
The link for macOS in the README.md has this URL https://ibm.box.com/shared/static/men880t5v21usgfw3895u4gcdaiu6kmr.dmg and when I click on that link, I get
> let a.http = {}
https://.../a.http
ok
> let a = {}
ok
but a is still web accessible - should a re-let lose the web annotation this case (i think yes).
It would be really nice to be able to resize the editor view for code, as well as have a dedicated close button for editor view code. Or maybe a collapse button that can be toggled
@cfjedimaster commented on Tue Oct 17 2017
When typing fsh
in the CLI, the table command isn't documented.
@cfjedimaster commented on Tue Oct 17 2017
It isn't in the graphical help either.
i switched to a new namespace where i had not fsh app init
previously.
attempted to run a composition was told there was no redis instance.
so i ran fsh app init --url
to set the url, and inspect it was set with fsh app config
.
then attempted to run again, but received the same error message.
inspected the setting with fsh app config
there was no url set.
retried this time adding --reset
and all worked as expected.
to remove the web action annotation, have to use the more explicit action command otherwise.
@cfjedimaster commented on Mon Oct 09 2017
I've got an app with a 'regular' action, an inline action, and another 'regular' action. I can see the output from the two regular ones, but not my inline action.
if you use the request to
combinator in the shell, it generates some artifacts which i suggest hiding from the action list (and add action list -a to unhide).
when you create a web action
$ let f.http = {}
https://.../f.http
ok
drop the .http
extension on the url that's shown.
if you start entering a command and then hit ctrl+l
the console is cleared but the text you entered is gone.
After running /bluemix login
, without specifying --user and --org, the error message
Please specify --user and --org and --space, as all three are required for logging in to Bluemix
gets cut off if the window is too narrow or the editor for a function is open, because it reformat to take up multiple lines. This also applies to commands that are typed in
Also, as a feature request, the workspace name in the top right maybe could have a GUI for logins/switching workspaces.
Sometimes when I look at the call tree, I click on an action and get this message This activation is probably from the CLI, and so has no timeline tree to render
. After that, I'm unable to enter any more commands in the shell (I can type a command but the "enter" key doesn't seem to work). I have to restart the shell to fix
listing action in a single column is convenient when working with lots of actions and looking for one by name (ls -l
? of course -l may be confused with --limit from the wsk
cli.)
@cfjedimaster commented on Tue Oct 10 2017
Typing fsh
and the help screen does not mention webbify. Also, if you fsh webbify
, check out the result:
"Please select an action, either via "webbify ", or by opening it in the sidecar"
That sounds like maybe it was meant for UI, not the CLI.
@cfjedimaster commented on Tue Oct 10 2017
Also note it isn't in the graphical help.
Running fsh in a Windows Git Bash environment does not work.
Tested version: 1.3.353
Output:
$ fsh
/c/Program Files/nodejs/node_modules/@ibm-functions/shell/bin/fsh: line 43: /c/Program Files/nodejs/node_modules/@ibm-functions/shell/bin/../dist/IBM Cloud Functions Shell-mingw64_nt-10.0-x64/IBM Cloud Functions Shell: No such file or directory
Cause: In @ibm-functions/shell/bin/fsh script the PLATFORM variable has the value of "mingw64_nt-10.0" and the platform detection does not recognize it properly.
My fix (using example from https://stackoverflow.com/a/17072017/8731727):
Replace
elif [ "${PLATFORM}" == "win32" ]; then
BIN="$DIR/../dist/IBM Cloud Functions Shell-${PLATFORM}-x64/IBM Cloud Functions Shell.exe"
with
elif [ "${PLATFORM}" == "win32" ] || [ "$(expr substr $(uname -s) 1 10)" == "MINGW32_NT" ] || [ "$(expr substr $(uname -s) 1 10)" == "MINGW64_NT" ]; then
BIN="$DIR/../dist/IBM Cloud Functions Shell-win32-x64/IBM Cloud Functions Shell.exe"
the wsk
CLI offers a -v
verbose mode to show the REST API calls it makes for CRUD operations, to invoke an action, etc. It may be useful to add the same for the shell.
working with actions, the api is the same as actions, but the schema is slightly different.
invoke an action is the same.
the dry run will be helpful for those who interface to openwhisk and functions through the rest api.
let f = x => x
now there's no command to shake that context off the shell path except for deleting the function f
... this was inconvenient for capturing a screenshot in my case.
should there be a context clearing command?
currently reports:
Error creating the service instance: The value for key: [metadata] was null. Object required.
i have an action where the shell's raw response is:
{
"name": "unicode",
"publish": false,
"annotations": [{
"key": "exec",
"value": "nodejs:6"
}, {
"key": "web-export",
"value": true
}, {
"key": "raw-http",
"value": false
}, {
"key": "final",
"value": true
}],
"version": "0.0.2",
"exec": {
"kind": "nodejs:6",
"code": "function main(args) {\n var str = args.delimiter + \" ☃ \" + args.delimiter;\n console.log(str);\n return { body: str };\n}\n",
"binary": false
},
"parameters": [],
"limits": {
"timeout": 60000,
"memory": 256,
"logs": 10
},
"namespace": "guesr_demos"
}
and there's an error on the console and the code does not render:
Cannot read property 'value' of undefined TypeError: Cannot read property 'value' of undefined TypeError: Cannot read property 'value' of undefined
at maybeAddWebBadge (file:///Users/rabbah/.node/lib/node_modules/@ibm-functions/shell/dist/IBM%2…Functions%20Shell.app/Contents/Resources/app.asar/content/js/ui.js:931:159)
at Object.self.showEntity (file:///Users/rabbah/.node/lib/node_modules/@ibm-functions/shell/dist/IBM%2…Functions%20Shell.app/Contents/Resources/app.asar/content/js/ui.js:1102:25)
at render (/Users/rabbah/.node/lib/node_modules/@ibm-functions/shell/dist/IBM Cloud Functions Shell-darwin-x64/IBM Cloud Functions Shell.app/Contents/Resources/app.asar/content/js/repl.js:263:32)
at response (/Users/rabbah/.node/lib/node_modules/@ibm-functions/shell/dist/IBM Cloud Functions Shell-darwin-x64/IBM Cloud Functions Shell.app/Contents/Resources/app.asar/content/js/repl.js:287:5)
at resolve (/Users/rabbah/.node/lib/node_modules/@ibm-functions/shell/dist/IBM Cloud Functions Shell-darwin-x64/IBM Cloud Functions Shell.app/Contents/Resources/app.asar/content/js/repl.js:603:104)
at cmdPromise.then.then.response (/Users/rabbah/.node/lib/node_modules/@ibm-functions/shell/dist/IBM Cloud Functions Shell-darwin-x64/IBM Cloud Functions Shell.app/Contents/Resources/app.asar/content/js/repl.js:602:32)
at process._tickCallback (internal/process/next_tick.js:103:7) TypeError: Cannot read property 'value' of undefined
at maybeAddWebBadge (ui.js:931)
at Object.self.showEntity (ui.js:1102)
at render (/Users/rabbah/.node/lib/node_modules/@ibm-functions/shell/dist/IBM Cloud Functions Shell-darwin-x64…:263)
at response (/Users/rabbah/.node/lib/node_modules/@ibm-functions/shell/dist/IBM Cloud Functions Shell-darwin-x64…:287)
at resolve (/Users/rabbah/.node/lib/node_modules/@ibm-functions/shell/dist/IBM Cloud Functions Shell-darwin-x64…:603)
at cmdPromise.then.then.response (/Users/rabbah/.node/lib/node_modules/@ibm-functions/shell/dist/IBM Cloud Functions Shell-darwin-x64…:602)
at process._tickCallback (internal/process/next_tick.js:103)
it would be nice if bluemix login didn't require me to enter my org and space and instead if i don't provide any, the plugin should list my available org/spaces accessible for whisk.
then i can just select one (and if there's only one, then perhaps auto select it).
further, it seems that if i enter the wrong command:
[/bluemix] login
arg_without_options is not defined. Enter help to see your options.
this should perhaps skip the prefix.
and i omit the --user
option, do not prompt me for my password.
lastly, i would prefer if the login was simply: login myid
.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.