From 0d6fb160344e68b3e9a926a78d2f6c2f5a53f42f Mon Sep 17 00:00:00 2001 From: Googlom <36107508+Googlom@users.noreply.github.com> Date: Thu, 23 Nov 2023 13:42:02 +0500 Subject: [PATCH] add deprecation warning (#4691) Co-authored-by: Gulom Alimov --- cmd/checkIfStepActive.go | 3 +++ cmd/getDefaults.go | 3 +++ 2 files changed, 6 insertions(+) diff --git a/cmd/checkIfStepActive.go b/cmd/checkIfStepActive.go index 473984fa14..ae39623f89 100644 --- a/cmd/checkIfStepActive.go +++ b/cmd/checkIfStepActive.go @@ -92,6 +92,9 @@ func checkIfStepActive(utils piperutils.FileUtils) error { runSteps = runConfigV1.RunSteps runStages = runConfigV1.RunStages } else { + log.Entry().Warning("This step is using deprecated format of stage conditions which will be removed in Jan 2024. " + + "To avoid pipeline breakage, please call checkIfStepActive command with --useV1 flag.", + ) runConfig := &config.RunConfig{StageConfigFile: stageConfigFile} err = runConfig.InitRunConfig(projectConfig, nil, nil, nil, nil, doublestar.Glob, checkStepActiveOptions.openFile) if err != nil { diff --git a/cmd/getDefaults.go b/cmd/getDefaults.go index 98b2bd998a..c69ddd056e 100644 --- a/cmd/getDefaults.go +++ b/cmd/getDefaults.go @@ -81,6 +81,9 @@ func getDefaults() ([]map[string]string, error) { var yamlContent string if !defaultsOptions.useV1 { + log.Entry().Warning("This step is using deprecated format of stage conditions which will be removed in Jan 2024. " + + "To avoid pipeline breakage, please call getDefaults command with --useV1 flag.", + ) var c config.Config c.ReadConfig(fc)