-
Notifications
You must be signed in to change notification settings - Fork 397
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
Avoid plugin in serverless activations [ get | result ] #1270
Avoid plugin in serverless activations [ get | result ] #1270
Conversation
Tests still to come
Tests not converted yet
Fixed some bugs found once tests were really effective
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 I did have one questions inline, but LGTM!
activation := list[0] | ||
id = activation.ActivationID | ||
if !quietFlag && (logsFlag || resultFlag) { | ||
makeBanner(c.Out, activation) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wonder if these banners should be printed to stderr?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe the purpose of the banners is to avoid letting the logs or results from different activations merge together. I believe they were added recently (in aio
) for that purpose and I've simply retained them here. In order for them to do that job I think they need to go to the same output stream as the logs and results themselves (so that they are inline). That suggests keeping them on stdout.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
* Add support for typescript in the nodejs runtime (#1225) * Eliminate plugin usage for sls fn invoke (#1226) * Add doctl serverless trigger support (for scheduled functions) (#1232) * Add support for triggers * Add lastRun field to trigger list output * Hide commands we won't be supporting in EA day 1 * Bump deployer version to pick up bug fix * Fix error handling in services related to triggers Many calls were not checking for errors. * Switch to latest API Change both the triggers command (native to doctl) and the deployer version (which affects the semantics of deploy/undeploy). * Pick up latest deployer (triggers bug fix) * Remove support for prototype API and clean up code * Fix unit tests * Fix misleading comment * Remove added complexity due to successive change * Add filtering by function when listing triggers * Fix omitted code in DeleteTrigger * Guard triggers get/list with status check Otherwise, the credentials read fails with a cryptic error instead of an informative one when you are not connected to a namespace. * Eliminate plugin usage in 'doctl sls fn list' This completes the elimination of plugin usage in doctl sls fn and the functions.go source file. * Hidden flags enabling connection to dev clusters * Fix unit test (date handling is timezone specific) * Eliminate call to auth/current via the plugin * Commit changed test (screwed it up last time) * Remove accidental re-introduction of --beta flag I believe this happened in merge conflict resolution during the recent rebase. * Bump min nim version to incorporate small bug fix Affects what happens when a failure occurs in the middle of deleting functions and triggers together. * Avoid plugin in serverless activations [ get | result ] (#1270) * WIP for converting activations to direct OW flows * Finish recoding 'activations get' in native doctl Tests still to come * Convert the support for sls actv result Tests not converted yet * Generate latet mocks * Fix some comments * Use more realistic timestampes * Revise tests for new paths. Still no output check * Tests are now doing meaningful output comparison Fixed some bugs found once tests were really effective * Updates activation list command to use the whisk client instead of the nim plugin * Adds name filter to activations list * moved getActivationStatus to utils * re-generates mocks * made changes from PR review and updated the unit tests * Updates test * default to json output when the full flag is set * list command takes a function name not activation name * Updates the apache-go-client library and updates the tests to reflect the changes * Makes updates from PR review Co-authored-by: Andrew Starr-Bochicchio <[email protected]> Co-authored-by: Davi DeBarros <[email protected]> Co-authored-by: Davi DeBarros <[email protected]>
* Add support for typescript in the nodejs runtime (#1225) * Eliminate plugin usage for sls fn invoke (#1226) * Add doctl serverless trigger support (for scheduled functions) (#1232) * Add support for triggers * Add lastRun field to trigger list output * Hide commands we won't be supporting in EA day 1 * Bump deployer version to pick up bug fix * Fix error handling in services related to triggers Many calls were not checking for errors. * Switch to latest API Change both the triggers command (native to doctl) and the deployer version (which affects the semantics of deploy/undeploy). * Pick up latest deployer (triggers bug fix) * Remove support for prototype API and clean up code * Fix unit tests * Fix misleading comment * Remove added complexity due to successive change * Add filtering by function when listing triggers * Fix omitted code in DeleteTrigger * Guard triggers get/list with status check Otherwise, the credentials read fails with a cryptic error instead of an informative one when you are not connected to a namespace. * Eliminate plugin usage in 'doctl sls fn list' This completes the elimination of plugin usage in doctl sls fn and the functions.go source file. * Hidden flags enabling connection to dev clusters * Fix unit test (date handling is timezone specific) * Eliminate call to auth/current via the plugin * Commit changed test (screwed it up last time) * Remove accidental re-introduction of --beta flag I believe this happened in merge conflict resolution during the recent rebase. * Bump min nim version to incorporate small bug fix Affects what happens when a failure occurs in the middle of deleting functions and triggers together. * Avoid plugin in serverless activations [ get | result ] (#1270) * WIP for converting activations to direct OW flows * Finish recoding 'activations get' in native doctl Tests still to come * Convert the support for sls actv result Tests not converted yet * Generate latet mocks * Fix some comments * Use more realistic timestampes * Revise tests for new paths. Still no output check * Tests are now doing meaningful output comparison Fixed some bugs found once tests were really effective * Updates activation list command to use the whisk client instead of the nim plugin * Adds name filter to activations list * moved getActivationStatus to utils * re-generates mocks * made changes from PR review and updated the unit tests * Updates test * default to json output when the full flag is set * list command takes a function name not activation name * Updates the apache-go-client library and updates the tests to reflect the changes * Makes updates from PR review * Adds native implementation for sls activations logs * Adds comment * Hides limit flag, adds a new channel to return errors to the users, fixes bug with package filtering, and fixes the order we display logs * Updates the tests * uses MarkHidden func instead of direct value change * Makes changes suggested in the PR, fixes logic for filtering packages, removes both the timeout and only keeps the ticker * Removed waitgroup to simplify the poll logic * export GetActivationFunctionName function * fixed error from merge Co-authored-by: Joshua Auerbach <[email protected]> Co-authored-by: Andrew Starr-Bochicchio <[email protected]>
This change alters the logic for
doctl sls actv get
anddoctl sls actv result
to use the OpenWhisk API directly rather than using the plugin. Thelist
andlogs
commands are still using the plugin (to be addressed in a future PR).