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

refactor: use hc-install for TF downloads + constraints #4494

Merged
merged 34 commits into from
Jun 16, 2024
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
051535b
WIP: Use `hc-install` for default downloading - still currently old m…
james0209 Apr 30, 2024
5bc8d18
Lowercase logs
james0209 Apr 30, 2024
c32ccae
Little `golines` fix
james0209 Apr 30, 2024
06a0c5c
Merge branch 'main' into use-hc-install
jamengual Apr 30, 2024
1ae96b6
Use `*version.Version` instead of string as arg to `Install` so we do…
james0209 Apr 30, 2024
cf7e829
Update comment based on local testing of hc-install
james0209 Apr 30, 2024
3ee7692
Add some testing of separate functions
james0209 Apr 30, 2024
e8faad4
Expand regex test
james0209 Apr 30, 2024
871d79c
Move custom download URL logic to it's own func
james0209 May 1, 2024
2982a03
Merge branch 'main' into use-hc-install
james0209 May 1, 2024
eb56d06
Add extra log message for extracted version
james0209 May 1, 2024
c16562d
Merge branch 'main' into use-hc-install
james0209 May 1, 2024
f669220
Small refactor so "dest" and "execPath" usage is a bit more combined
james0209 May 1, 2024
03fe193
Merge branch 'main' into use-hc-install
james0209 May 3, 2024
39443b3
Use my fork branch of hc-install which allows use of a custom URL for…
james0209 May 4, 2024
6b780df
Merge branch 'main' into use-hc-install
james0209 May 4, 2024
fe55d29
Simplify testing
james0209 May 4, 2024
37dc3c4
GetFile no longer used
james0209 May 4, 2024
e3e54ee
Remove unused test func
james0209 May 4, 2024
981d3ec
Move off of my fork now PR has been merged
james0209 May 8, 2024
0134d66
Merge branch 'main' into use-hc-install
james0209 May 8, 2024
2f858e0
Merge branch 'main' into use-hc-install
james0209 May 9, 2024
36fe1ab
Merge branch 'main' into use-hc-install
james0209 May 9, 2024
7c56bd7
Merge branch 'main' into use-hc-install
james0209 May 9, 2024
f43838d
Merge branch 'main' into use-hc-install
james0209 May 10, 2024
2e9b044
Merge branch 'main' into use-hc-install
james0209 May 11, 2024
287f859
Merge branch 'main' into use-hc-install
james0209 May 23, 2024
db66816
Merge branch 'main' into use-hc-install
james0209 May 25, 2024
af091b6
Test main branch to make sure new upstream changes work okay
james0209 May 29, 2024
e42d4a4
Merge branch 'main' into use-hc-install
james0209 Jun 12, 2024
49ce10a
Merge branch 'main' into use-hc-install
jamengual Jun 12, 2024
1753090
Merge branch 'main' into use-hc-install
james0209 Jun 13, 2024
0ce27d6
Merge branch 'main' into use-hc-install
james0209 Jun 15, 2024
9841851
Merge branch 'main' into use-hc-install
james0209 Jun 16, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 5 additions & 10 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ require (
github.com/hashicorp/go-multierror v1.1.1
github.com/hashicorp/go-version v1.6.0
github.com/hashicorp/golang-lru/v2 v2.0.7
github.com/hashicorp/hc-install v0.6.4
github.com/hashicorp/terraform-config-inspect v0.0.0-20231204233900-a34142ec2a72
github.com/kr/pretty v0.3.1
github.com/mcdafydd/go-azuredevops v0.12.1
Expand All @@ -42,7 +43,6 @@ require (
github.com/stretchr/testify v1.9.0
github.com/uber-go/tally/v4 v4.1.10
github.com/urfave/negroni/v3 v3.1.0
github.com/warrensbox/terraform-switcher v0.1.1-0.20240413181427-4d66b260d90c
github.com/xanzy/go-gitlab v0.102.0
go.etcd.io/bbolt v1.3.9
go.uber.org/zap v1.27.0
Expand All @@ -68,17 +68,19 @@ require github.com/twmb/murmur3 v1.1.8 // indirect
require (
github.com/Masterminds/goutils v1.1.1 // indirect
github.com/Masterminds/semver/v3 v3.2.1 // indirect
github.com/ProtonMail/go-crypto v1.1.0-alpha.2 // indirect
github.com/alicebob/gopher-json v0.0.0-20200520072559-a9ecdc9d1d3a // indirect
github.com/apparentlymart/go-textseg/v13 v13.0.0 // indirect
github.com/apparentlymart/go-textseg/v15 v15.0.0 // indirect
github.com/aymerick/douceur v0.2.0 // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d // indirect
github.com/cespare/xxhash/v2 v2.2.0 // indirect
github.com/cloudflare/circl v1.3.7 // indirect
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
github.com/davidmz/go-pageant v1.0.2 // indirect
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f // indirect
github.com/fatih/color v1.15.0 // indirect
github.com/fatih/color v1.16.0 // indirect
github.com/fsnotify/fsnotify v1.7.0 // indirect
github.com/gabriel-vasile/mimetype v1.4.3 // indirect
github.com/go-fed/httpsig v1.1.0 // indirect
Expand All @@ -87,10 +89,6 @@ require (
github.com/google/go-cmp v0.6.0 // indirect
github.com/google/go-github/v60 v60.0.0 // indirect
github.com/google/go-querystring v1.1.0 // indirect
github.com/gookit/color v1.5.4 // indirect
github.com/gookit/goutil v0.6.15 // indirect
github.com/gookit/gsr v0.1.0 // indirect
github.com/gookit/slog v0.5.5 // indirect
github.com/gorilla/css v1.0.0 // indirect
github.com/hashicorp/errwrap v1.1.0 // indirect
github.com/hashicorp/go-cleanhttp v0.5.2 // indirect
Expand Down Expand Up @@ -126,17 +124,14 @@ require (
github.com/spf13/cast v1.6.0 // indirect
github.com/subosito/gotenv v1.6.0 // indirect
github.com/ulikunitz/xz v0.5.11 // indirect
github.com/valyala/bytebufferpool v1.0.0 // indirect
github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e // indirect
github.com/yuin/gopher-lua v1.1.1 // indirect
github.com/zclconf/go-cty v1.13.2 // indirect
go.uber.org/multierr v1.11.0 // indirect
golang.org/x/crypto v0.22.0 // indirect
golang.org/x/exp v0.0.0-20231006140011-7918f672742d // indirect
golang.org/x/mod v0.13.0 // indirect
golang.org/x/mod v0.16.0 // indirect
golang.org/x/net v0.23.0 // indirect
golang.org/x/oauth2 v0.15.0 // indirect
golang.org/x/sync v0.5.0 // indirect
golang.org/x/sys v0.19.0 // indirect
golang.org/x/time v0.5.0 // indirect
golang.org/x/tools v0.14.0 // indirect
Expand Down
58 changes: 40 additions & 18 deletions go.sum

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions server/controllers/events/events_controller_e2e_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,10 @@ func (m *NoopTFDownloader) GetAny(_, _ string) error {
return nil
}

func (m *NoopTFDownloader) Install(_, _ string) (string, error) {
return "", nil
}

type LocalConftestCache struct {
}

Expand Down
50 changes: 50 additions & 0 deletions server/core/terraform/mocks/mock_downloader.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

46 changes: 0 additions & 46 deletions server/core/terraform/mocks/mock_terraform_client.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading