Ensuring passing context across fission (#2555)
Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>
This commit is contained in:
@@ -45,6 +45,6 @@ func (opts *CheckSubCommand) do(input cli.Input) error {
|
||||
FissionClient: opts.Client(),
|
||||
})
|
||||
|
||||
healthcheck.RunChecks(hc)
|
||||
healthcheck.RunChecks(input.Context(), hc)
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -37,7 +37,7 @@ func List(input cli.Input) error {
|
||||
func (opts *ListSubCommand) do(input cli.Input) error {
|
||||
w := tabwriter.NewWriter(os.Stdout, 0, 0, 1, ' ', 0)
|
||||
fmt.Fprintln(w, "NAME\tVERSION\tPATH")
|
||||
for _, p := range plugin.FindAll() {
|
||||
for _, p := range plugin.FindAll(input.Context()) {
|
||||
fmt.Fprintf(w, "%v\t%v\t%v\n", p.Name, p.Version, p.Path)
|
||||
}
|
||||
w.Flush()
|
||||
|
||||
@@ -34,7 +34,7 @@ func NewFissionVersion(client client.Interface) Resource {
|
||||
}
|
||||
|
||||
func (res FissionVersion) Dump(ctx context.Context, dumpDir string) {
|
||||
ver := util.GetVersion(res.client)
|
||||
ver := util.GetVersion(ctx, res.client)
|
||||
file := filepath.Clean(fmt.Sprintf("%v/%v", dumpDir, "fission-version.txt"))
|
||||
writeToFile(file, ver)
|
||||
}
|
||||
|
||||
@@ -36,7 +36,7 @@ func Version(input cli.Input) error {
|
||||
}
|
||||
|
||||
func (opts *VersionSubCommand) do(input cli.Input) error {
|
||||
ver := util.GetVersion(opts.Client())
|
||||
ver := util.GetVersion(input.Context(), opts.Client())
|
||||
bs, err := yaml.Marshal(ver)
|
||||
if err != nil {
|
||||
return errors.Wrap(err, "error formatting versions")
|
||||
|
||||
Reference in New Issue
Block a user