-
Notifications
You must be signed in to change notification settings - Fork 205
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Plumb context.Context for the plugins I wanted to add tracing to the plugins before working on the migration (which will do being extreme plugin shenanigans so we'll need the extra logs there). This is a first pass to add context.Context to all functions that lead to the plugins. Signed-off-by: Carolyn Van Slyck <[email protected]> * Fix integration test use of namespace The test wasn't setting namespace and was creating data in the global namespace. Signed-off-by: Carolyn Van Slyck <[email protected]> * Add plugin adapter for secrets Signed-off-by: Carolyn Van Slyck <[email protected]> * Instrument plugin execution This has lots of semi-related fixes for everything required to get a plugin instrumented. * Add support for creating secondary tracers with a different service name set when interacting with the plugins. In Jaeger, you will see a span tree for "porter", and now another span tree for each plugin that it interacts with, e.g. "mongodb", or "azure.storage.blob". * Support grpc in the storage plugin. Not sure yet if we are keeping net/rpc. Only grpc plugins can be instrumented, net/rpc doesn't have a mechanism for propogating the context. * Change storage protocol to include context.Context, and to use concrete types instead of interface{} when sending filters, sorts, etc. * Run all plugins through the hashicorp/go-plugin framework. I was running internal plugins in-process which meant that I didn't notice when we broke external storage plugins. It also was more work to instrument a new separate service name when I had to do it both for external and internal plugins. This makes the code paths the same regardless of who wrote the plugin. * Improve error handling when serving internal plugins. All errors must be logged with hclog, and we must not write to stdout/err as that causes the connection to the plugin to fail. * Dump logs from the plugins into a span as a fallback mechanism to collect info from an uninstrumented plugin. * Set porter into "plugin mode" and have porter log with hclog Signed-off-by: Carolyn Van Slyck <[email protected]> * Standardize Close function I've made the following changes to make our Close functions consistent: * Rename Teardown to Close. * Do not pass a context.Context, use context.Background() instead. * Make sure if we are passed an interface, that we try to call close. Signed-off-by: Carolyn Van Slyck <[email protected]> * Make context.Context the first parameter Signed-off-by: Carolyn Van Slyck <[email protected]> * Review feedback Signed-off-by: Carolyn Van Slyck <[email protected]> * Review feedback Signed-off-by: Carolyn Van Slyck <[email protected]> * tik tok Signed-off-by: Carolyn Van Slyck <[email protected]> * Update pkg/storage/plugins/mongodb_docker/store.go Signed-off-by: Carolyn Van Slyck <[email protected]> Co-authored-by: Yingrong Zhao <[email protected]> * Fix tests after merging with release/v1 Signed-off-by: Carolyn Van Slyck <[email protected]> Co-authored-by: Yingrong Zhao <[email protected]>
- Loading branch information
Showing
196 changed files
with
5,658 additions
and
2,151 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,6 @@ import ( | |
"fmt" | ||
|
||
"get.porter.sh/porter/pkg/exec" | ||
|
||
"github.com/spf13/cobra" | ||
) | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.