Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate goformation under pkg/ as a local package and remove location re-write #8219

Merged
merged 2 commits into from
Feb 16, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
2 changes: 1 addition & 1 deletion .github/workflows/link-checker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,4 @@ jobs:
- name: Link Checker
uses: lycheeverse/lychee-action@f613c4a64e50d792e0b31ec34bbcbba12263c6a6 #v2.3.0
with:
args: --exclude-all-private --exclude-mail --exclude-file .github/workflows/exclude-file.txt --exclude-path goformation --verbose --no-progress './**/*.md' './**/*.html'
args: --exclude-all-private --exclude-mail --exclude-file .github/workflows/exclude-file.txt --exclude-path pkg/goformation --verbose --no-progress './**/*.md' './**/*.html'
28 changes: 1 addition & 27 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,32 +21,6 @@ run:

# output configuration options
output:
# The formats used to render issues.
# Formats:
# - `colored-line-number`
# - `line-number`
# - `json`
# - `colored-tab`
# - `tab`
# - `html`
# - `checkstyle`
# - `code-climate`
# - `junit-xml`
# - `junit-xml-extended`
# - `github-actions`
# - `teamcity`
# - `sarif`
# Output path can be either `stdout`, `stderr` or path to the file to write to.
#
# For the CLI flag (`--out-format`), multiple formats can be specified by separating them by comma.
# The output can be specified for each of them by separating format name and path by colon symbol.
# Example: "--out-format=checkstyle:report.xml,json:stdout,colored-line-number"
# The CLI flag (`--out-format`) override the configuration file.
#
# Default:
# formats:
# - format: colored-line-number
# path: stdout
formats:
- format: tab

Expand Down Expand Up @@ -144,7 +118,7 @@ issues:
- ^vendor$
- ^build$
- ^pkg\/eks\/mocks$
- ^goformation$
- ^pkg\/goformation*

# Which files to exclude: they will be analyzed, but issues from them won't be reported.
# There is no need to include all autogenerated files,
Expand Down
15 changes: 7 additions & 8 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ require (
github.com/aws/aws-sdk-go-v2/service/sts v1.33.5
github.com/aws/smithy-go v1.22.2
github.com/awslabs/amazon-eks-ami/nodeadm v0.0.0-20240508073157-fbfa1bc129f5
github.com/awslabs/goformation/v4 v4.15.5
github.com/benjamintf1/unmarshalledmatchers v1.0.0
github.com/blang/semver v3.5.1+incompatible
github.com/bxcodec/faker v2.0.1+incompatible
Expand All @@ -51,12 +50,15 @@ require (
github.com/kubicorn/kubicorn v0.0.0-20180829191017-06f6bce92acc
github.com/lithammer/dedent v1.1.0
github.com/maxbrunsfeld/counterfeiter/v6 v6.8.1
github.com/onsi/ginkgo v1.16.4
github.com/onsi/ginkgo/v2 v2.22.2
github.com/onsi/gomega v1.36.2
github.com/orcaman/concurrent-map v1.0.0
github.com/otiai10/copy v1.14.0
github.com/pelletier/go-toml v1.9.5
github.com/pkg/errors v0.9.1
github.com/sanathkr/go-yaml v0.0.0-20170819195128-ed9d249f429b
github.com/sanathkr/yaml v0.0.0-20170819201035-0056894fa522
github.com/sethvargo/go-password v0.2.0
github.com/spf13/afero v1.12.0
github.com/spf13/cobra v1.8.1
Expand All @@ -68,10 +70,12 @@ require (
github.com/vburenin/ifacemaker v1.2.1
github.com/vektra/mockery/v2 v2.52.2
github.com/weaveworks/schemer v0.0.0-20230525114451-47139fe25848
github.com/xeipuuv/gojsonschema v1.2.0
github.com/xgfone/netaddr v0.5.1
golang.org/x/crypto v0.33.0
golang.org/x/oauth2 v0.25.0
golang.org/x/sync v0.11.0
golang.org/x/text v0.22.0
golang.org/x/tools v0.30.0
gopkg.in/yaml.v2 v2.4.0
helm.sh/helm/v3 v3.17.0
Expand Down Expand Up @@ -312,6 +316,7 @@ require (
github.com/nishanths/exhaustive v0.12.0 // indirect
github.com/nishanths/predeclared v0.2.2 // indirect
github.com/nunnatsa/ginkgolinter v0.18.4 // indirect
github.com/nxadm/tail v1.4.8 // indirect
github.com/olekukonko/tablewriter v0.0.5 // indirect
github.com/oliveagle/jsonpath v0.0.0-20180606110733-2e52cf6e6852 // indirect
github.com/opencontainers/go-digest v1.0.0 // indirect
Expand Down Expand Up @@ -342,8 +347,6 @@ require (
github.com/sagikazarmark/locafero v0.7.0 // indirect
github.com/sagikazarmark/slog-shim v0.1.0 // indirect
github.com/sahilm/fuzzy v0.1.0 // indirect
github.com/sanathkr/go-yaml v0.0.0-20170819195128-ed9d249f429b // indirect
github.com/sanathkr/yaml v0.0.0-20170819201035-0056894fa522 // indirect
github.com/sanposhiho/wastedassign/v2 v2.1.0 // indirect
github.com/santhosh-tekuri/jsonschema/v6 v6.0.1 // indirect
github.com/sashamelentyev/interfacebloat v1.1.0 // indirect
Expand Down Expand Up @@ -382,7 +385,6 @@ require (
github.com/x448/float16 v0.8.4 // indirect
github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb // indirect
github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect
github.com/xeipuuv/gojsonschema v1.2.0 // indirect
github.com/xen0n/gosmopolitan v1.2.2 // indirect
github.com/xlab/treeprint v1.2.0 // indirect
github.com/yagipy/maintidx v1.0.0 // indirect
Expand All @@ -404,7 +406,6 @@ require (
golang.org/x/net v0.35.0 // indirect
golang.org/x/sys v0.30.0 // indirect
golang.org/x/term v0.29.0 // indirect
golang.org/x/text v0.22.0 // indirect
golang.org/x/time v0.8.0 // indirect
google.golang.org/api v0.215.0 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20241223144023-3abc09e42ca8 // indirect
Expand All @@ -414,6 +415,7 @@ require (
gopkg.in/gcfg.v1 v1.2.3 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/ini.v1 v1.67.0 // indirect
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 // indirect
gopkg.in/warnings.v0 v0.1.2 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
honnef.co/go/tools v0.6.0 // indirect
Expand Down Expand Up @@ -467,6 +469,3 @@ replace (
k8s.io/sample-cli-plugin => k8s.io/sample-cli-plugin v0.32.1
k8s.io/sample-controller => k8s.io/sample-controller v0.32.1
)

// Use a local fork of goformation
replace github.com/awslabs/goformation/v4 => ./goformation
25 changes: 0 additions & 25 deletions goformation/go.mod

This file was deleted.

80 changes: 0 additions & 80 deletions goformation/go.sum

This file was deleted.

10 changes: 5 additions & 5 deletions pkg/actions/nodegroup/upgrade.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ import (
"github.com/kris-nova/logger"
"github.com/pkg/errors"

"github.com/awslabs/goformation/v4"
"github.com/awslabs/goformation/v4/cloudformation"
gfnec2 "github.com/awslabs/goformation/v4/cloudformation/ec2"
gfneks "github.com/awslabs/goformation/v4/cloudformation/eks"
gfnt "github.com/awslabs/goformation/v4/cloudformation/types"
"github.com/weaveworks/eksctl/pkg/goformation"
"github.com/weaveworks/eksctl/pkg/goformation/cloudformation"
gfnec2 "github.com/weaveworks/eksctl/pkg/goformation/cloudformation/ec2"
gfneks "github.com/weaveworks/eksctl/pkg/goformation/cloudformation/eks"
gfnt "github.com/weaveworks/eksctl/pkg/goformation/cloudformation/types"

"github.com/weaveworks/eksctl/pkg/ami"
api "github.com/weaveworks/eksctl/pkg/apis/eksctl.io/v1alpha5"
Expand Down
2 changes: 1 addition & 1 deletion pkg/automode/cluster_role_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (

"github.com/kris-nova/logger"

"github.com/awslabs/goformation/v4"
"github.com/weaveworks/eksctl/pkg/goformation"

api "github.com/weaveworks/eksctl/pkg/apis/eksctl.io/v1alpha5"
"github.com/weaveworks/eksctl/pkg/awsapi"
Expand Down
4 changes: 2 additions & 2 deletions pkg/cfn/builder/access_entry.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package builder

import (
gfneks "github.com/awslabs/goformation/v4/cloudformation/eks"
gfnt "github.com/awslabs/goformation/v4/cloudformation/types"
gfneks "github.com/weaveworks/eksctl/pkg/goformation/cloudformation/eks"
gfnt "github.com/weaveworks/eksctl/pkg/goformation/cloudformation/types"

api "github.com/weaveworks/eksctl/pkg/apis/eksctl.io/v1alpha5"
)
Expand Down
6 changes: 3 additions & 3 deletions pkg/cfn/builder/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import (
"fmt"
"reflect"

gfn "github.com/awslabs/goformation/v4/cloudformation"
gfncfn "github.com/awslabs/goformation/v4/cloudformation/cloudformation"
gfnt "github.com/awslabs/goformation/v4/cloudformation/types"
gfn "github.com/weaveworks/eksctl/pkg/goformation/cloudformation"
gfncfn "github.com/weaveworks/eksctl/pkg/goformation/cloudformation/cloudformation"
gfnt "github.com/weaveworks/eksctl/pkg/goformation/cloudformation/types"

"github.com/aws/aws-sdk-go-v2/service/cloudformation/types"

Expand Down
6 changes: 3 additions & 3 deletions pkg/cfn/builder/auto_mode.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ import (

api "github.com/weaveworks/eksctl/pkg/apis/eksctl.io/v1alpha5"

"github.com/awslabs/goformation/v4"
gfn "github.com/awslabs/goformation/v4/cloudformation"
gfnt "github.com/awslabs/goformation/v4/cloudformation/types"
"github.com/weaveworks/eksctl/pkg/goformation"
gfn "github.com/weaveworks/eksctl/pkg/goformation/cloudformation"
gfnt "github.com/weaveworks/eksctl/pkg/goformation/cloudformation/types"

cfntypes "github.com/aws/aws-sdk-go-v2/service/cloudformation/types"
)
Expand Down
4 changes: 2 additions & 2 deletions pkg/cfn/builder/block_device_mapping.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package builder

import (
gfnec2 "github.com/awslabs/goformation/v4/cloudformation/ec2"
gfnt "github.com/awslabs/goformation/v4/cloudformation/types"
gfnec2 "github.com/weaveworks/eksctl/pkg/goformation/cloudformation/ec2"
gfnt "github.com/weaveworks/eksctl/pkg/goformation/cloudformation/types"

api "github.com/weaveworks/eksctl/pkg/apis/eksctl.io/v1alpha5"
)
Expand Down
2 changes: 1 addition & 1 deletion pkg/cfn/builder/builder_suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (

. "github.com/onsi/gomega"

gfnt "github.com/awslabs/goformation/v4/cloudformation/types"
gfnt "github.com/weaveworks/eksctl/pkg/goformation/cloudformation/types"

api "github.com/weaveworks/eksctl/pkg/apis/eksctl.io/v1alpha5"
"github.com/weaveworks/eksctl/pkg/testutils"
Expand Down
4 changes: 2 additions & 2 deletions pkg/cfn/builder/cloudwatch_logging.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package builder

import (
gfneks "github.com/awslabs/goformation/v4/cloudformation/eks"
gfnt "github.com/awslabs/goformation/v4/cloudformation/types"
gfneks "github.com/weaveworks/eksctl/pkg/goformation/cloudformation/eks"
gfnt "github.com/weaveworks/eksctl/pkg/goformation/cloudformation/types"

api "github.com/weaveworks/eksctl/pkg/apis/eksctl.io/v1alpha5"
)
Expand Down
10 changes: 5 additions & 5 deletions pkg/cfn/builder/cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ import (

"github.com/tidwall/gjson"

gfn "github.com/awslabs/goformation/v4/cloudformation"
gfncfn "github.com/awslabs/goformation/v4/cloudformation/cloudformation"
gfnec2 "github.com/awslabs/goformation/v4/cloudformation/ec2"
gfneks "github.com/awslabs/goformation/v4/cloudformation/eks"
gfnt "github.com/awslabs/goformation/v4/cloudformation/types"
gfn "github.com/weaveworks/eksctl/pkg/goformation/cloudformation"
gfncfn "github.com/weaveworks/eksctl/pkg/goformation/cloudformation/cloudformation"
gfnec2 "github.com/weaveworks/eksctl/pkg/goformation/cloudformation/ec2"
gfneks "github.com/weaveworks/eksctl/pkg/goformation/cloudformation/eks"
gfnt "github.com/weaveworks/eksctl/pkg/goformation/cloudformation/types"

api "github.com/weaveworks/eksctl/pkg/apis/eksctl.io/v1alpha5"
"github.com/weaveworks/eksctl/pkg/awsapi"
Expand Down
2 changes: 1 addition & 1 deletion pkg/cfn/builder/export_test.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package builder

import (
gfn "github.com/awslabs/goformation/v4/cloudformation"
gfn "github.com/weaveworks/eksctl/pkg/goformation/cloudformation"
)

func NewRS() *resourceSet {
Expand Down
4 changes: 2 additions & 2 deletions pkg/cfn/builder/fargate.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package builder
import (
"fmt"

gfniam "github.com/awslabs/goformation/v4/cloudformation/iam"
gfnt "github.com/awslabs/goformation/v4/cloudformation/types"
gfniam "github.com/weaveworks/eksctl/pkg/goformation/cloudformation/iam"
gfnt "github.com/weaveworks/eksctl/pkg/goformation/cloudformation/types"

"github.com/aws/aws-sdk-go-v2/aws/arn"
"github.com/aws/aws-sdk-go-v2/service/cloudformation/types"
Expand Down
6 changes: 3 additions & 3 deletions pkg/cfn/builder/iam.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ import (
"github.com/aws/aws-sdk-go-v2/service/cloudformation/types"
"github.com/kris-nova/logger"

gfniam "github.com/awslabs/goformation/v4/cloudformation/iam"
gfnrolesanywhere "github.com/awslabs/goformation/v4/cloudformation/rolesanywhere"
gfnt "github.com/awslabs/goformation/v4/cloudformation/types"
gfniam "github.com/weaveworks/eksctl/pkg/goformation/cloudformation/iam"
gfnrolesanywhere "github.com/weaveworks/eksctl/pkg/goformation/cloudformation/rolesanywhere"
gfnt "github.com/weaveworks/eksctl/pkg/goformation/cloudformation/types"

api "github.com/weaveworks/eksctl/pkg/apis/eksctl.io/v1alpha5"
"github.com/weaveworks/eksctl/pkg/cfn/outputs"
Expand Down
Loading
Loading