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 Codebase from govendor to Go Modules #5773

Closed
bflad opened this issue Sep 4, 2018 · 3 comments
Closed

Migrate Codebase from govendor to Go Modules #5773

bflad opened this issue Sep 4, 2018 · 3 comments
Assignees
Labels
dependencies Used to indicate dependency changes. provider Pertains to the provider itself, rather than any interaction with AWS.
Milestone

Comments

@bflad
Copy link
Contributor

bflad commented Sep 4, 2018

Description

Go 1.11 has introduced Go modules, which looks like the official solution for dependency management going forward. Since we now require Go 1.11 for development and testing, we can migrate off govendor (which has served us well) onto go mod.

The planned process is:

  • Work with upstream libraries to get properly tagged releases where possible
  • Update dependencies via govendor to tagged releases (e.g. govendor fetch github.com/mitchellh/hashstructure/[email protected])
  • Ensure those dependencies are included in a provider release with no reported issues
  • Cutover to Go modules
    • Initialize via go mod init
    • Verify all dependency versions match between vendor/vendor.json and go.mod
    • Remove vendor directory
    • Update GNUmakefile and .travis.yml to remove references to govendor

References

@bflad bflad added dependencies Used to indicate dependency changes. provider Pertains to the provider itself, rather than any interaction with AWS. labels Sep 4, 2018
@bflad bflad self-assigned this Sep 4, 2018
bflad added a commit that referenced this issue Sep 4, 2018
Reference: #5773

* Updated via: `govendor fetch github.com/mitchellh/hashstructure/[email protected]`

```
$ make test TEST=./aws
==> Checking that code complies with gofmt requirements...
go test ./aws -timeout=30s -parallel=4
ok  	github.com/terraform-providers/terraform-provider-aws/aws	2.537s
```
bflad added a commit that referenced this issue Sep 4, 2018
Reference: #5773

* Updated via: `govendor fetch github.com/jen20/awspolicyequivalence/[email protected]`

```
$ make test TEST=./aws
==> Checking that code complies with gofmt requirements...
go test ./aws -timeout=30s -parallel=4
ok  	github.com/terraform-providers/terraform-provider-aws/aws	2.451s
```

```
--- PASS: TestAccAWSKmsKey_policy (39.10s)
--- PASS: TestAccAWSS3BucketPolicy_basic (33.32s)
--- PASS: TestAccAWSS3BucketPolicy_policyUpdate (46.38s)
--- PASS: TestAccAwsSecretsManagerSecret_policy (12.56s)
--- PASS: TestAccAWSSNSTopic_policy (9.78s)
--- PASS: TestAccAWSSQSQueuePolicy_basic (15.60s)
--- PASS: TestAccAWSSQSQueuePolicy_import (14.27s)
--- PASS: TestAccAWSSQSQueue_policy (16.14s)
```
bflad added a commit that referenced this issue Sep 5, 2018
Reference: #5773

* Updated via `govendor fetch github.com/hashicorp/logutils/[email protected]`
bflad added a commit that referenced this issue Sep 5, 2018
Reference: #5773

* Updated via: `govendor fetch github.com/hashicorp/go-safetemp/[email protected]`
bflad added a commit that referenced this issue Sep 5, 2018
Reference: #5773

* Updated via: `govendor fetch github.com/mitchellh/go-homedir/[email protected]`
bflad added a commit that referenced this issue Sep 5, 2018
…v1.0.0

Reference: #5773

* Updated via:

```govendor fetch github.com/mitchellh/copystructure/[email protected]
govendor fetch github.com/mitchellh/reflectwalk/[email protected]
```
bflad added a commit that referenced this issue Sep 5, 2018
Reference: #5773

* Updated via: `govendor fetch github.com/apparentlymart/go-cidr/[email protected]`

```
$ make test TEST=./aws
==> Checking that code complies with gofmt requirements...
go test ./aws -timeout=30s -parallel=4
ok  	github.com/terraform-providers/terraform-provider-aws/aws	2.503s
```
bflad added a commit that referenced this issue Sep 5, 2018
Reference: #5773

* Updated via: `govendor fetch github.com/apparentlymart/go-textseg/[email protected]`
bflad added a commit that referenced this issue Sep 5, 2018
Reference: #5773

* Updated via: `govendor fetch github.com/armon/go-radix/[email protected]`

```
$ make test TEST=./aws
==> Checking that code complies with gofmt requirements...
go test ./aws -timeout=30s -parallel=4
ok  	github.com/terraform-providers/terraform-provider-aws/aws	2.578s
```
bflad added a commit that referenced this issue Sep 5, 2018
Reference: #5773

* Updated via: `govendor fetch github.com/bgentry/speakeasy/[email protected]`
bflad added a commit that referenced this issue Sep 5, 2018
Reference: #5773

* Updated via:

```
govendor fetch github.com/hashicorp/errwrap/[email protected]
govendor fetch github.com/hashicorp/go-multierror/[email protected]
```
bflad added a commit that referenced this issue Sep 5, 2018
Reference: #5773

* Updated via: `govendor fetch github.com/mattn/go-isatty/[email protected]`
bflad added a commit that referenced this issue Sep 5, 2018
Reference: #5773

* Updated via: `govendor fetch github.com/ulikunitz/xz/[email protected]`
bflad added a commit that referenced this issue Sep 5, 2018
Reference: #5773

* Updated via: `govendor fetch github.com/agext/levenshtein/[email protected]`
@bflad
Copy link
Contributor Author

bflad commented Sep 11, 2018

FYI for anyone coming across this issue, we are likely in a holding pattern until we are ready to update HCL dependencies.

@bflad
Copy link
Contributor Author

bflad commented Jan 24, 2019

This was completed last week. 🎉

#7165

@ghost
Copy link

ghost commented Apr 1, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks!

@ghost ghost locked and limited conversation to collaborators Apr 1, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
dependencies Used to indicate dependency changes. provider Pertains to the provider itself, rather than any interaction with AWS.
Projects
None yet
Development

No branches or pull requests

1 participant