Replaced ghodss/yaml with sigs.k8s.io/yaml

This commit replaces usage of github.com/ghodss/yaml with it's forked
version maintained by SIG community. The replaced library has
low-to-none support activity unlike the latter. We believe the new
Helm branch could benefit from using the community-supported version on
a long-term run as yaml parser is a key component of Helm chart rendering
engine.

This commit locks sigs.k8s.io/yaml dependency version on 1.1.0 which
is backwards compatible with ghodss/yaml 1.0.0.

This change also resolves the outdated dependency version lock for
ghodss/yaml (currently 1.0.0) and makes it possible to port changes from
https://github.com/helm/helm/pull/6010 to dev-v3.

Signed-off-by: Oleg Sidorov <oleg.sidorov@booking.com>
pull/6016/head
Oleg Sidorov 6 years ago
parent fdcd09c9ce
commit ec440d446d

@ -112,3 +112,7 @@
[[constraint]] [[constraint]]
name = "github.com/spf13/cobra" name = "github.com/spf13/cobra"
version = "0.0.4" version = "0.0.4"
[[constraint]]
name = "sigs.k8s.io/yaml"
version = "1.1.0"

@ -23,9 +23,9 @@ import (
"os" "os"
"github.com/Masterminds/semver" "github.com/Masterminds/semver"
"github.com/ghodss/yaml"
"github.com/pkg/errors" "github.com/pkg/errors"
"github.com/spf13/cobra" "github.com/spf13/cobra"
"sigs.k8s.io/yaml"
"helm.sh/helm/cmd/helm/require" "helm.sh/helm/cmd/helm/require"
"helm.sh/helm/pkg/getter" "helm.sh/helm/pkg/getter"

@ -21,7 +21,7 @@ import (
"text/template" "text/template"
"time" "time"
"github.com/ghodss/yaml" "sigs.k8s.io/yaml"
"helm.sh/helm/pkg/chartutil" "helm.sh/helm/pkg/chartutil"
"helm.sh/helm/pkg/release" "helm.sh/helm/pkg/release"

@ -17,7 +17,7 @@ limitations under the License.
package action package action
import ( import (
"github.com/ghodss/yaml" "sigs.k8s.io/yaml"
"helm.sh/helm/pkg/chartutil" "helm.sh/helm/pkg/chartutil"
) )

@ -31,8 +31,8 @@ import (
"time" "time"
"github.com/Masterminds/sprig" "github.com/Masterminds/sprig"
"github.com/ghodss/yaml"
"github.com/pkg/errors" "github.com/pkg/errors"
"sigs.k8s.io/yaml"
"helm.sh/helm/pkg/chart" "helm.sh/helm/pkg/chart"
"helm.sh/helm/pkg/chartutil" "helm.sh/helm/pkg/chartutil"

@ -1,11 +1,11 @@
package action package action
import ( import (
"fmt"
"encoding/json" "encoding/json"
"fmt"
"github.com/ghodss/yaml"
"github.com/gosuri/uitable" "github.com/gosuri/uitable"
"sigs.k8s.io/yaml"
) )
// OutputFormat is a type for capturing supported output formats // OutputFormat is a type for capturing supported output formats
@ -70,4 +70,4 @@ func ParseOutputFormat(s string) (out OutputFormat, err error) {
out, err = "", ErrInvalidFormatType out, err = "", ErrInvalidFormatType
} }
return return
} }

@ -20,7 +20,7 @@ import (
"fmt" "fmt"
"strings" "strings"
"github.com/ghodss/yaml" "sigs.k8s.io/yaml"
"helm.sh/helm/pkg/chart" "helm.sh/helm/pkg/chart"
"helm.sh/helm/pkg/chart/loader" "helm.sh/helm/pkg/chart/loader"

@ -22,8 +22,8 @@ import (
"path/filepath" "path/filepath"
"strings" "strings"
"github.com/ghodss/yaml"
"github.com/pkg/errors" "github.com/pkg/errors"
"sigs.k8s.io/yaml"
"helm.sh/helm/pkg/chart" "helm.sh/helm/pkg/chart"
) )

@ -21,8 +21,8 @@ import (
"os" "os"
"path/filepath" "path/filepath"
"github.com/ghodss/yaml"
"github.com/pkg/errors" "github.com/pkg/errors"
"sigs.k8s.io/yaml"
"helm.sh/helm/pkg/chart" "helm.sh/helm/pkg/chart"
) )

@ -23,8 +23,8 @@ import (
"path/filepath" "path/filepath"
"strings" "strings"
"github.com/ghodss/yaml"
"github.com/pkg/errors" "github.com/pkg/errors"
"sigs.k8s.io/yaml"
"helm.sh/helm/pkg/chart" "helm.sh/helm/pkg/chart"
"helm.sh/helm/pkg/chart/loader" "helm.sh/helm/pkg/chart/loader"

@ -21,9 +21,9 @@ import (
"fmt" "fmt"
"strings" "strings"
"github.com/ghodss/yaml"
"github.com/pkg/errors" "github.com/pkg/errors"
"github.com/xeipuuv/gojsonschema" "github.com/xeipuuv/gojsonschema"
"sigs.k8s.io/yaml"
"helm.sh/helm/pkg/chart" "helm.sh/helm/pkg/chart"
) )

@ -24,8 +24,8 @@ import (
"os" "os"
"path/filepath" "path/filepath"
"github.com/ghodss/yaml"
"github.com/pkg/errors" "github.com/pkg/errors"
"sigs.k8s.io/yaml"
"helm.sh/helm/pkg/chart" "helm.sh/helm/pkg/chart"
) )

@ -22,8 +22,8 @@ import (
"io/ioutil" "io/ioutil"
"strings" "strings"
"github.com/ghodss/yaml"
"github.com/pkg/errors" "github.com/pkg/errors"
"sigs.k8s.io/yaml"
"helm.sh/helm/pkg/chart" "helm.sh/helm/pkg/chart"
) )

@ -27,8 +27,8 @@ import (
"sync" "sync"
"github.com/Masterminds/semver" "github.com/Masterminds/semver"
"github.com/ghodss/yaml"
"github.com/pkg/errors" "github.com/pkg/errors"
"sigs.k8s.io/yaml"
"helm.sh/helm/pkg/chart" "helm.sh/helm/pkg/chart"
"helm.sh/helm/pkg/chart/loader" "helm.sh/helm/pkg/chart/loader"

@ -20,8 +20,8 @@ import (
"os" "os"
"path/filepath" "path/filepath"
"github.com/ghodss/yaml"
"github.com/pkg/errors" "github.com/pkg/errors"
"sigs.k8s.io/yaml"
"helm.sh/helm/pkg/chart/loader" "helm.sh/helm/pkg/chart/loader"
"helm.sh/helm/pkg/chartutil" "helm.sh/helm/pkg/chartutil"

@ -23,7 +23,7 @@ import (
"runtime" "runtime"
"strings" "strings"
"github.com/ghodss/yaml" "sigs.k8s.io/yaml"
helm_env "helm.sh/helm/pkg/cli" helm_env "helm.sh/helm/pkg/cli"
) )

@ -25,11 +25,11 @@ import (
"path/filepath" "path/filepath"
"strings" "strings"
"github.com/ghodss/yaml"
"github.com/pkg/errors" "github.com/pkg/errors"
"golang.org/x/crypto/openpgp" "golang.org/x/crypto/openpgp"
"golang.org/x/crypto/openpgp/clearsign" "golang.org/x/crypto/openpgp/clearsign"
"golang.org/x/crypto/openpgp/packet" "golang.org/x/crypto/openpgp/packet"
"sigs.k8s.io/yaml"
hapi "helm.sh/helm/pkg/chart" hapi "helm.sh/helm/pkg/chart"
"helm.sh/helm/pkg/chart/loader" "helm.sh/helm/pkg/chart/loader"

@ -20,9 +20,9 @@ import (
"strings" "strings"
"time" "time"
"github.com/ghodss/yaml"
"github.com/pkg/errors" "github.com/pkg/errors"
v1 "k8s.io/api/core/v1" v1 "k8s.io/api/core/v1"
"sigs.k8s.io/yaml"
"helm.sh/helm/pkg/hooks" "helm.sh/helm/pkg/hooks"
"helm.sh/helm/pkg/release" "helm.sh/helm/pkg/release"

@ -22,8 +22,8 @@ import (
"strconv" "strconv"
"strings" "strings"
"github.com/ghodss/yaml"
"github.com/pkg/errors" "github.com/pkg/errors"
"sigs.k8s.io/yaml"
"helm.sh/helm/pkg/chartutil" "helm.sh/helm/pkg/chartutil"
"helm.sh/helm/pkg/hooks" "helm.sh/helm/pkg/hooks"

@ -20,7 +20,7 @@ import (
"reflect" "reflect"
"testing" "testing"
"github.com/ghodss/yaml" "sigs.k8s.io/yaml"
"helm.sh/helm/pkg/chartutil" "helm.sh/helm/pkg/chartutil"
"helm.sh/helm/pkg/release" "helm.sh/helm/pkg/release"

@ -24,8 +24,8 @@ import (
"path/filepath" "path/filepath"
"strings" "strings"
"github.com/ghodss/yaml"
"github.com/pkg/errors" "github.com/pkg/errors"
"sigs.k8s.io/yaml"
"helm.sh/helm/pkg/chart/loader" "helm.sh/helm/pkg/chart/loader"
"helm.sh/helm/pkg/getter" "helm.sh/helm/pkg/getter"

@ -28,8 +28,8 @@ import (
"time" "time"
"github.com/Masterminds/semver" "github.com/Masterminds/semver"
"github.com/ghodss/yaml"
"github.com/pkg/errors" "github.com/pkg/errors"
"sigs.k8s.io/yaml"
"helm.sh/helm/pkg/chart" "helm.sh/helm/pkg/chart"
"helm.sh/helm/pkg/chart/loader" "helm.sh/helm/pkg/chart/loader"

@ -22,8 +22,8 @@ import (
"os" "os"
"time" "time"
"github.com/ghodss/yaml"
"github.com/pkg/errors" "github.com/pkg/errors"
"sigs.k8s.io/yaml"
) )
// ErrRepoOutOfDate indicates that the repository file is out of date, but // ErrRepoOutOfDate indicates that the repository file is out of date, but

@ -22,7 +22,7 @@ import (
"os" "os"
"path/filepath" "path/filepath"
"github.com/ghodss/yaml" "sigs.k8s.io/yaml"
"helm.sh/helm/pkg/helmpath" "helm.sh/helm/pkg/helmpath"
"helm.sh/helm/pkg/repo" "helm.sh/helm/pkg/repo"

@ -22,7 +22,7 @@ import (
"path/filepath" "path/filepath"
"testing" "testing"
"github.com/ghodss/yaml" "sigs.k8s.io/yaml"
"helm.sh/helm/pkg/repo" "helm.sh/helm/pkg/repo"
) )

@ -21,8 +21,8 @@ import (
"strconv" "strconv"
"strings" "strings"
"github.com/ghodss/yaml"
"github.com/pkg/errors" "github.com/pkg/errors"
"sigs.k8s.io/yaml"
) )
// ErrNotList indicates that a non-list was treated as a list. // ErrNotList indicates that a non-list was treated as a list.

@ -18,7 +18,7 @@ package strvals
import ( import (
"testing" "testing"
"github.com/ghodss/yaml" "sigs.k8s.io/yaml"
) )
func TestSetIndex(t *testing.T) { func TestSetIndex(t *testing.T) {

Loading…
Cancel
Save