Skip to content

Commit 965a3fc

Browse files
authored
Remove dependency on ghodss/yaml (#2032)
## Changes I noticed that #1957 took a dep on this library even though we no longer need it. This change removes the dep and cleans up other (unused) uses of the library. We originally relied on this library to deserialize bundle configuration and JSON payloads to non-bundle CLI commands. Relevant commits: * The YAML flag was added to support apps (very early), and is not longer used: e408b70 * First use for bundle configuration loading: e47fa61 * Switch bundle configuration loading to use `libs/dyn`: 87dd46a ## Tests The build works without the dependency.
1 parent 6b4b908 commit 965a3fc

File tree

6 files changed

+2
-55
lines changed

6 files changed

+2
-55
lines changed

NOTICE

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -73,10 +73,6 @@ fatih/color - https://github.com/fatih/color
7373
Copyright (c) 2013 Fatih Arslan
7474
License - https://github.com/fatih/color/blob/main/LICENSE.md
7575

76-
ghodss/yaml - https://github.com/ghodss/yaml
77-
Copyright (c) 2014 Sam Ghods
78-
License - https://github.com/ghodss/yaml/blob/master/LICENSE
79-
8076
Masterminds/semver - https://github.com/Masterminds/semver
8177
Copyright (C) 2014-2019, Matt Butcher and Matt Farina
8278
License - https://github.com/Masterminds/semver/blob/master/LICENSE.txt

bundle/internal/schema/main_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ import (
1515
"github.com/databricks/cli/libs/dyn/merge"
1616
"github.com/databricks/cli/libs/dyn/yamlloader"
1717
"github.com/databricks/cli/libs/jsonschema"
18-
"github.com/ghodss/yaml"
1918
"github.com/stretchr/testify/assert"
19+
"gopkg.in/yaml.v3"
2020
)
2121

2222
func copyFile(src, dst string) error {

bundle/internal/schema/parser.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,9 @@ import (
99
"reflect"
1010
"strings"
1111

12-
"github.com/ghodss/yaml"
13-
1412
"github.com/databricks/cli/libs/dyn/yamlloader"
1513
"github.com/databricks/cli/libs/jsonschema"
14+
"gopkg.in/yaml.v3"
1615
)
1716

1817
type Components struct {

go.mod

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ require (
99
github.com/briandowns/spinner v1.23.1 // Apache 2.0
1010
github.com/databricks/databricks-sdk-go v0.54.0 // Apache 2.0
1111
github.com/fatih/color v1.18.0 // MIT
12-
github.com/ghodss/yaml v1.0.0 // MIT + NOTICE
1312
github.com/google/uuid v1.6.0 // BSD-3-Clause
1413
github.com/hashicorp/go-version v1.7.0 // MPL 2.0
1514
github.com/hashicorp/hc-install v0.9.0 // MPL 2.0
@@ -70,5 +69,4 @@ require (
7069
google.golang.org/genproto/googleapis/rpc v0.0.0-20240521202816-d264139d666e // indirect
7170
google.golang.org/grpc v1.64.1 // indirect
7271
google.golang.org/protobuf v1.34.1 // indirect
73-
gopkg.in/yaml.v2 v2.4.0 // indirect
7472
)

go.sum

Lines changed: 0 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

libs/flags/yaml_flag.go

Lines changed: 0 additions & 42 deletions
This file was deleted.

0 commit comments

Comments
 (0)