Ensuring passing context across fission (#2555)

Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>
This commit is contained in:
Sanket Sudake
2022-09-26 16:05:45 +05:30
committed by GitHub
parent a8a81ef5be
commit 3fa0f4bde3
43 changed files with 301 additions and 300 deletions
+1 -1
View File
@@ -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
}
+1 -1
View File
@@ -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)
}
+1 -1
View File
@@ -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")