Skip to content

Commit

Permalink
Fix REST-XML Codegen Bug, Move metrics to User-Agent header, Update S…
Browse files Browse the repository at this point in the history
…DKVersion to refer to goModuleVersion (#1257)

* Fix deserialization of enum types marked with payload trait
* Add serviceId and module version to user-agent header
* Updated middleware to temporarily direct client metadata to user-agent
* internal/repotools: Support specifying alternative package location for go_module_metadata.go
* Regenerated Clients
* Add Changelog Annotation
* aws: Updated SDKVersion to refer to goModuleVersion constant.
* Make go1.16 available in Travis Java builds
  • Loading branch information
skmcgrail authored May 13, 2021
1 parent e1633ef commit 0ec7bfe
Show file tree
Hide file tree
Showing 882 changed files with 21,672 additions and 449 deletions.
296 changes: 296 additions & 0 deletions .changelog/18150a40a0194a33bf9aa70debf31b18.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,296 @@
{
"id": "18150a40-a019-4a33-bf9a-a70debf31b18",
"type": "feature",
"collapse": true,
"description": "Constant has been added to modules to enable runtime version inspection for reporting.",
"modules": [
".",
"config",
"credentials",
"example/service/s3/listObjects",
"example/service/s3/usingPrivateLink",
"feature/cloudfront/sign",
"feature/dynamodb/attributevalue",
"feature/dynamodb/expression",
"feature/dynamodbstreams/attributevalue",
"feature/ec2/imds",
"feature/rds/auth",
"feature/s3/manager",
"internal/protocoltest/awsrestjson",
"internal/protocoltest/ec2query",
"internal/protocoltest/jsonrpc",
"internal/protocoltest/jsonrpc10",
"internal/protocoltest/query",
"internal/protocoltest/restxml",
"internal/protocoltest/restxmlwithnamespace",
"internal/repotools",
"internal/repotools/changes",
"service/accessanalyzer",
"service/acm",
"service/acmpca",
"service/alexaforbusiness",
"service/amp",
"service/amplify",
"service/amplifybackend",
"service/apigateway",
"service/apigatewaymanagementapi",
"service/apigatewayv2",
"service/appconfig",
"service/appflow",
"service/appintegrations",
"service/applicationautoscaling",
"service/applicationdiscoveryservice",
"service/applicationinsights",
"service/appmesh",
"service/appstream",
"service/appsync",
"service/athena",
"service/auditmanager",
"service/autoscaling",
"service/autoscalingplans",
"service/backup",
"service/batch",
"service/braket",
"service/budgets",
"service/chime",
"service/cloud9",
"service/clouddirectory",
"service/cloudformation",
"service/cloudfront",
"service/cloudhsm",
"service/cloudhsmv2",
"service/cloudsearch",
"service/cloudsearchdomain",
"service/cloudtrail",
"service/cloudwatch",
"service/cloudwatchevents",
"service/cloudwatchlogs",
"service/codeartifact",
"service/codebuild",
"service/codecommit",
"service/codedeploy",
"service/codeguruprofiler",
"service/codegurureviewer",
"service/codepipeline",
"service/codestar",
"service/codestarconnections",
"service/codestarnotifications",
"service/cognitoidentity",
"service/cognitoidentityprovider",
"service/cognitosync",
"service/comprehend",
"service/comprehendmedical",
"service/computeoptimizer",
"service/configservice",
"service/connect",
"service/connectcontactlens",
"service/connectparticipant",
"service/costandusagereportservice",
"service/costexplorer",
"service/customerprofiles",
"service/databasemigrationservice",
"service/databrew",
"service/dataexchange",
"service/datapipeline",
"service/datasync",
"service/dax",
"service/detective",
"service/devicefarm",
"service/devopsguru",
"service/directconnect",
"service/directoryservice",
"service/dlm",
"service/docdb",
"service/dynamodb",
"service/dynamodbstreams",
"service/ebs",
"service/ec2",
"service/ec2instanceconnect",
"service/ecr",
"service/ecrpublic",
"service/ecs",
"service/efs",
"service/eks",
"service/elasticache",
"service/elasticbeanstalk",
"service/elasticinference",
"service/elasticloadbalancing",
"service/elasticloadbalancingv2",
"service/elasticsearchservice",
"service/elastictranscoder",
"service/emr",
"service/emrcontainers",
"service/eventbridge",
"service/firehose",
"service/fis",
"service/fms",
"service/forecast",
"service/forecastquery",
"service/frauddetector",
"service/fsx",
"service/gamelift",
"service/glacier",
"service/globalaccelerator",
"service/glue",
"service/greengrass",
"service/greengrassv2",
"service/groundstation",
"service/guardduty",
"service/health",
"service/healthlake",
"service/honeycode",
"service/iam",
"service/identitystore",
"service/imagebuilder",
"service/inspector",
"service/internal/accept-encoding",
"service/internal/benchmark",
"service/internal/integrationtest",
"service/internal/presigned-url",
"service/internal/s3shared",
"service/iot",
"service/iot1clickdevicesservice",
"service/iot1clickprojects",
"service/iotanalytics",
"service/iotdataplane",
"service/iotdeviceadvisor",
"service/iotevents",
"service/ioteventsdata",
"service/iotfleethub",
"service/iotjobsdataplane",
"service/iotsecuretunneling",
"service/iotsitewise",
"service/iotthingsgraph",
"service/iotwireless",
"service/ivs",
"service/kafka",
"service/kendra",
"service/kinesis",
"service/kinesisanalytics",
"service/kinesisanalyticsv2",
"service/kinesisvideo",
"service/kinesisvideoarchivedmedia",
"service/kinesisvideomedia",
"service/kinesisvideosignaling",
"service/kms",
"service/lakeformation",
"service/lambda",
"service/lexmodelbuildingservice",
"service/lexmodelsv2",
"service/lexruntimeservice",
"service/lexruntimev2",
"service/licensemanager",
"service/lightsail",
"service/location",
"service/lookoutequipment",
"service/lookoutmetrics",
"service/lookoutvision",
"service/machinelearning",
"service/macie",
"service/macie2",
"service/managedblockchain",
"service/marketplacecatalog",
"service/marketplacecommerceanalytics",
"service/marketplaceentitlementservice",
"service/marketplacemetering",
"service/mediaconnect",
"service/mediaconvert",
"service/medialive",
"service/mediapackage",
"service/mediapackagevod",
"service/mediastore",
"service/mediastoredata",
"service/mediatailor",
"service/mgn",
"service/migrationhub",
"service/migrationhubconfig",
"service/mobile",
"service/mq",
"service/mturk",
"service/mwaa",
"service/neptune",
"service/networkfirewall",
"service/networkmanager",
"service/nimble",
"service/opsworks",
"service/opsworkscm",
"service/organizations",
"service/outposts",
"service/personalize",
"service/personalizeevents",
"service/personalizeruntime",
"service/pi",
"service/pinpoint",
"service/pinpointemail",
"service/pinpointsmsvoice",
"service/polly",
"service/pricing",
"service/qldb",
"service/qldbsession",
"service/quicksight",
"service/ram",
"service/rds",
"service/rdsdata",
"service/redshift",
"service/redshiftdata",
"service/rekognition",
"service/resourcegroups",
"service/resourcegroupstaggingapi",
"service/robomaker",
"service/route53",
"service/route53domains",
"service/route53resolver",
"service/s3",
"service/s3/internal/configtesting",
"service/s3control",
"service/s3outposts",
"service/sagemaker",
"service/sagemakera2iruntime",
"service/sagemakeredge",
"service/sagemakerfeaturestoreruntime",
"service/sagemakerruntime",
"service/savingsplans",
"service/schemas",
"service/secretsmanager",
"service/securityhub",
"service/serverlessapplicationrepository",
"service/servicecatalog",
"service/servicecatalogappregistry",
"service/servicediscovery",
"service/servicequotas",
"service/ses",
"service/sesv2",
"service/sfn",
"service/shield",
"service/signer",
"service/sms",
"service/snowball",
"service/sns",
"service/sqs",
"service/ssm",
"service/sso",
"service/ssoadmin",
"service/ssooidc",
"service/storagegateway",
"service/sts",
"service/support",
"service/swf",
"service/synthetics",
"service/textract",
"service/timestreamquery",
"service/timestreamwrite",
"service/transcribe",
"service/transfer",
"service/translate",
"service/waf",
"service/wafregional",
"service/wafv2",
"service/wellarchitected",
"service/workdocs",
"service/worklink",
"service/workmail",
"service/workmailmessageflow",
"service/workspaces",
"service/xray"
]
}
8 changes: 8 additions & 0 deletions .changelog/679a53c14cfe4943867d8e23cc85abb9.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"id": "679a53c1-4cfe-4943-867d-8e23cc85abb9",
"type": "feature",
"description": "`AddSDKAgentKey` and `AddSDKAgentKeyValue` in `aws/middleware` package have been updated to direct metadata to `User-Agent` HTTP header.",
"modules": [
"."
]
}
10 changes: 10 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,11 @@ matrix:
env:
- JAVA_TOOL_OPTIONS="-Xmx1g"
before_script:
- sudo apt-get -y install golang
- go get golang.org/dl/go1.16.4
- $(go env GOPATH)/bin/go1.16.4 download
- export PATH=$HOME/sdk/go1.16.4/bin:$PATH
- export GOROOT=$HOME/sdk/go1.16.4
- rm -rf /tmp/smithy-go
- git clone https://github.com/aws/smithy-go /tmp/smithy-go
- pushd /tmp/smithy-go/codegen
Expand All @@ -61,6 +66,11 @@ matrix:
env:
- JAVA_TOOL_OPTIONS="-Xmx1g"
before_script:
- sudo apt-get -y install golang
- go get golang.org/dl/go1.16.4
- $(go env GOPATH)/bin/go1.16.4 download
- export PATH=$HOME/sdk/go1.16.4/bin:$PATH
- export GOROOT=$HOME/sdk/go1.16.4
- rm -rf /tmp/smithy-go
- git clone https://github.com/aws/smithy-go /tmp/smithy-go
- pushd /tmp/smithy-go/codegen
Expand Down
6 changes: 6 additions & 0 deletions aws/go_module_metadata.go

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

23 changes: 23 additions & 0 deletions aws/middleware/osname.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
// +build go1.16

package middleware

import "runtime"

func getNormalizedOSName() (os string) {
switch runtime.GOOS {
case "android":
os = "android"
case "linux":
os = "linux"
case "windows":
os = "windows"
case "darwin":
os = "macos"
case "ios":
os = "ios"
default:
os = "other"
}
return os
}
23 changes: 23 additions & 0 deletions aws/middleware/osname_go115.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
// +build !go1.16

package middleware

import "runtime"

func getNormalizedOSName() (os string) {
switch runtime.GOOS {
case "android":
os = "android"
case "linux":
os = "linux"
case "windows":
os = "windows"
case "darwin":
// Due to Apple M1 we can't distinguish between macOS and iOS when GOOS/GOARCH is darwin/amd64
// For now declare this as "other" until we have a better detection mechanism.
fallthrough
default:
os = "other"
}
return os
}
Loading

0 comments on commit 0ec7bfe

Please sign in to comment.