Add deprecation warnings for Mod commands

* print errors and warnings to stderr
* fix tests
* Update description
* update sample workspace profile content
* Changelog for v0.22.0
This commit is contained in:
Puskar Basu
2024-03-06 16:43:17 +05:30
committed by GitHub
parent b4f15ebfd4
commit 410fe9ef6f
13 changed files with 136 additions and 99 deletions

View File

@@ -137,6 +137,11 @@ func runScheduledTasks(ctx context.Context, cmd *cobra.Command, args []string, e
return nil
}
// display deprecation warning for check, mod and dashboard commands
if task.IsCheckCmd(cmd) || task.IsDashboardCmd(cmd) || task.IsModCmd(cmd) {
displayPpDeprecationWarning()
}
taskUpdateCtx, cancelFn := context.WithCancel(ctx)
tasksCancelFn = cancelFn
@@ -464,3 +469,7 @@ func displayDeprecationWarnings(errorsAndWarnings *error_helpers.ErrorAndWarning
fmt.Println()
}
}
func displayPpDeprecationWarning() {
fmt.Fprintf(color.Error, "\n%s Steampipe mods and dashboards have been moved to %s. This command %s in a future version. Migration guide - https://powerpipe.io/blog/migrating-from-steampipe \n", color.YellowString("Deprecation warning:"), constants.Bold("Powerpipe"), constants.Bold("will be removed"))
}