Skip to content

Commit

Permalink
code-generator: bump code-generator to the latest commit that has fix…
Browse files Browse the repository at this point in the history
…es to make it work with Crossplane again

Signed-off-by: Muvaffak Onus <me@muvaf.com>
(cherry picked from commit 0d2ea7e)
  • Loading branch information
muvaf authored and Aaron Eaton committed Dec 8, 2021
1 parent b36ee6a commit c7e3a7e
Show file tree
Hide file tree
Showing 9 changed files with 265 additions and 8 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ PROJECT_REPO := github.com/crossplane/$(PROJECT_NAME)

PLATFORMS ?= linux_amd64 linux_arm64

CODE_GENERATOR_COMMIT ?= 966e9a9ac6dfb4bbc2d3ded1972ce2b706391d44
GENERATED_SERVICES="apigatewayv2,cloudfront,cloudwatchlogs,dynamodb,efs,glue,kafka,kms,lambda,mq,rds,secretsmanager,servicediscovery,sfn,transfer"
CODE_GENERATOR_COMMIT ?= 285d87b66b62fbfb859986ddf74c9f9b6ae743fb
GENERATED_SERVICES="apigatewayv2,cloudfront,cloudwatchlogs,dynamodb,ec2,efs,glue,kafka,kms,lambda,mq,rds,secretsmanager,servicediscovery,sfn,transfer"

# kind-related versions
KIND_VERSION ?= v0.11.1
Expand Down
2 changes: 2 additions & 0 deletions apis/ec2/v1alpha1/generator-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ ignore:
- VpnConnection
- VpnGateway
- Volume
shape_names:
- Instance
field_paths:
- CreateVpcPeeringConnectionInput.DryRun
- DeleteVpcPeeringConnectionInput.DryRun
Expand Down
5 changes: 5 additions & 0 deletions apis/generate.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,14 @@ limitations under the License.
// Generate crossplane-runtime methodsets (resource.Claim, etc)
//go:generate go run -tags generate github.com/crossplane/crossplane-tools/cmd/angryjet generate-methodsets --header-file=../hack/boilerplate.go.txt ./...

// TODO(muvaf): Remove the last mockgen usage in Addon resource and move to
// current convention with tests.
//go:generate go run github.com/golang/mock/mockgen --build_flags=--mod=mod -package eksiface -copyright_file ../hack/boilerplate.go.txt -destination ../pkg/clients/eks/fake/eksiface/fake.go github.com/aws/aws-sdk-go/service/eks/eksiface EKSAPI

package apis

import (
_ "github.com/golang/mock/mockgen" //nolint:typecheck
_ "sigs.k8s.io/controller-tools/cmd/controller-gen" //nolint:typecheck

_ "github.com/crossplane/crossplane-tools/cmd/angryjet" //nolint:typecheck
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module github.com/crossplane/provider-aws
go 1.16

require (
github.com/aws/aws-sdk-go v1.37.4
github.com/aws/aws-sdk-go v1.37.10
github.com/aws/aws-sdk-go-v2 v1.11.0
github.com/aws/aws-sdk-go-v2/config v1.10.0
github.com/aws/aws-sdk-go-v2/credentials v1.6.0
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@ github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmV
github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8=
github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY=
github.com/aws/aws-sdk-go v1.15.78/go.mod h1:E3/ieXAlvM0XWO57iftYVDLLvQ824smPP3ATZkfNZeM=
github.com/aws/aws-sdk-go v1.37.4 h1:tWxrpMK/oRSXVnjUzhGeCWLR00fW0WF4V4sycYPPrJ8=
github.com/aws/aws-sdk-go v1.37.4/go.mod h1:hcU610XS61/+aQV88ixoOzUoG7v3b31pl2zKMmprdro=
github.com/aws/aws-sdk-go v1.37.10 h1:LRwl+97B4D69Z7tz+eRUxJ1C7baBaIYhgrn5eLtua+Q=
github.com/aws/aws-sdk-go v1.37.10/go.mod h1:hcU610XS61/+aQV88ixoOzUoG7v3b31pl2zKMmprdro=
github.com/aws/aws-sdk-go-v2 v1.11.0 h1:HxyD62DyNhCfiFGUHqJ/xITD6rAjJ7Dm/2nLxLmO4Ag=
github.com/aws/aws-sdk-go-v2 v1.11.0/go.mod h1:SQfA+m2ltnu1cA0soUkj4dRSsmITiVQUJvBIZjzfPyQ=
github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.0.0 h1:yVUAwvJC/0WNPbyl0nA3j1L6CW1CN8wBubCRqtG7JLI=
Expand Down
2 changes: 1 addition & 1 deletion hack/boilerplate.go.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright 2020 The Crossplane Authors.
Copyright 2021 The Crossplane Authors.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
250 changes: 250 additions & 0 deletions pkg/clients/eks/fake/eksiface/fake.go

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

2 changes: 1 addition & 1 deletion pkg/controller/cloudfront/distribution/lateinit.go
Original file line number Diff line number Diff line change
Expand Up @@ -578,7 +578,7 @@ func lateInitOrigin(in *svcapitypes.Origin, from *svcsdk.Origin) {
in.S3OriginConfig = &svcapitypes.S3OriginConfig{}
}

in.S3OriginConfig.OriginAccessIDentity = awsclients.LateInitializeStringPtr(in.S3OriginConfig.OriginAccessIDentity, from.S3OriginConfig.OriginAccessIdentity)
in.S3OriginConfig.OriginAccessIdentity = awsclients.LateInitializeStringPtr(in.S3OriginConfig.OriginAccessIdentity, from.S3OriginConfig.OriginAccessIdentity)
}
}

Expand Down
2 changes: 1 addition & 1 deletion pkg/controller/cloudfront/distribution/lateinit_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -542,7 +542,7 @@ func TestLateInitialize(t *testing.T) {
OriginShieldRegion: awsclients.String("us-east-1"),
},
S3OriginConfig: &svcapitypes.S3OriginConfig{
OriginAccessIDentity: awsclients.String("cool-guy"),
OriginAccessIdentity: awsclients.String("cool-guy"),
},
}},
},
Expand Down

0 comments on commit c7e3a7e

Please sign in to comment.