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

connect service ContactFlow.IsDefault serialized incorrectly #2909

Closed
2 of 3 tasks
ewbankkit opened this issue Nov 22, 2024 · 3 comments
Closed
2 of 3 tasks

connect service ContactFlow.IsDefault serialized incorrectly #2909

ewbankkit opened this issue Nov 22, 2024 · 3 comments
Assignees
Labels
breaking-change Issue requires a breaking change to remediate. bug This issue is a bug. p0 This issue is the highest priority pending-release This issue will be fixed by an approved PR that hasn't been released yet. service-api This issue is due to a problem in a service API, not the SDK implementation.

Comments

@ewbankkit
Copy link

Acknowledgements

Describe the bug

The field IsDefault (added in [email protected], Release 2024-11-18) in the connect service's ContactFlow struct has Go type bool:

type ContactFlow struct {
// The Amazon Resource Name (ARN) of the flow.
Arn *string
// The JSON string that represents the content of the flow. For an example, see [Example flow in Amazon Connect Flow language].
//
// Length Constraints: Minimum length of 1. Maximum length of 256000.
//
// [Example flow in Amazon Connect Flow language]: https://docs.aws.amazon.com/connect/latest/APIReference/flow-language-example.html
Content *string
// The description of the flow.
Description *string
// Indicates the checksum value of the flow content.
FlowContentSha256 *string
// The identifier of the flow.
Id *string
// Amazon Connect includes a set of default flows that have already been
// published. It uses them to power your contact center.
IsDefault bool
// The region in which the contact flow was last modified
LastModifiedRegion *string
// The time at which the contact flow was last modified.
LastModifiedTime *time.Time
// The name of the flow.
Name *string
// The type of flow.
State ContactFlowState
// The status of the contact flow.
Status ContactFlowStatus
// The tags used to organize, track, or control access for this resource. For
// example, { "Tags": {"key1":"value1", "key2":"value2"} }.
Tags map[string]string
// The type of the flow. For descriptions of the available types, see [Choose a flow type] in the
// Amazon Connect Administrator Guide.
//
// [Choose a flow type]: https://docs.aws.amazon.com/connect/latest/adminguide/create-contact-flow.html#contact-flow-types
Type ContactFlowType
// The identifier of the flow version.
Version *int64
// The description of the flow version.
VersionDescription *string
noSmithyDocumentSerde
}
.
The upstream service is incorrectly serializing this field as a string

  http.response.body=
  | {
  |   "ContactFlow" : {
  |     "Arn" : "arn:aws:connect:us-west-2:123456789012:instance/5d367605-5d5b-4d98-a442-fe88e573aaaa/contact-flow/2f3b8896-ee32-48d5-981b-e287673e8f4f",
  |     "Id" : "2f3b8896-ee32-48d5-981b-e287673e8f4f",
  |     "IsDefault" : "false",
  |     "Name" : "resource-test-terraform-7075749418873109470",
  |     "Type" : "CONTACT_FLOW",
  |     "State" : "ACTIVE",
  |     "Status" : "PUBLISHED",
  |     "LastModifiedRegion" : "us-west-2",
  |     "LastModifiedTime" : 1.73229019499E9,
  |     "FlowContentSha256" : "9b5906e4b563c7d71dadd8f911d8c88db02ccd38a92edd17b55f92e302c6afaf",
  |     "Description" : "Created",
  |     "Content" : "    {\n\t\t\"Version\": \"2019-10-30\",\n\t\t\"StartAction\": \"12345678-1234-1234-1234-123456789012\",\n\t\t\"Actions\": [\n\t\t\t{\n\t\t\t\t\"Identifier\": \"12345678-1234-1234-1234-123456789012\",\n\t\t\t\t\"Type\": \"MessageParticipant\",\n\t\t\t\t\"Transitions\": {\n\t\t\t\t\t\"NextAction\": \"abcdef-abcd-abcd-abcd-abcdefghijkl\",\n\t\t\t\t\t\"Errors\": [],\n\t\t\t\t\t\"Conditions\": []\n\t\t\t\t},\n\t\t\t\t\"Parameters\": {\n\t\t\t\t\t\"Text\": \"Created\"\n\t\t\t\t}\n\t\t\t},\n\t\t\t{\n\t\t\t\t\"Identifier\": \"abcdef-abcd-abcd-abcd-abcdefghijkl\",\n\t\t\t\t\"Type\": \"DisconnectParticipant\",\n\t\t\t\t\"Transitions\": {},\n\t\t\t\t\"Parameters\": {}\n\t\t\t}\n\t\t]\n    }\n",
  |     "Tags" : {
  |       "Method" : "Created",
  |       "Name" : "Test Contact Flow"
  |     }
  |   }
  | }

, causing runtime errors:

deserialization failed, failed to decode response body with invalid JSON, expected Boolean to be of type *bool, got string instead

See hashicorp/terraform-provider-aws#40267.

Regression Issue

  • Select this option if this issue appears to be a regression.

Expected Behavior

The DescribeContactFlow API call should succeed with the correct value for IsDefault returned.

Current Behavior

Runtime deserialization error.

Reproduction Steps

	input := &connect.DescribeContactFlowInput{
		ContactFlowId: aws.String(contactFlowID),
		InstanceId:    aws.String(instanceID),
	}

	output, err := conn.DescribeContactFlow(ctx, input)

Possible Solution

No response

Additional Information/Context

No response

AWS Go SDK V2 Module Versions Used

% grep connect go.mod
	github.com/aws/aws-sdk-go-v2/service/codeconnections v1.5.6
	github.com/aws/aws-sdk-go-v2/service/codestarconnections v1.29.6
	github.com/aws/aws-sdk-go-v2/service/connect v1.116.0
	github.com/aws/aws-sdk-go-v2/service/connectcases v1.21.6
	github.com/aws/aws-sdk-go-v2/service/directconnect v1.29.6
	github.com/aws/aws-sdk-go-v2/service/kafkaconnect v1.21.6
	github.com/aws/aws-sdk-go-v2/service/mediaconnect v1.35.6
	github.com/aws/aws-sdk-go-v2/service/pcaconnectorad v1.9.6

Compiler and Version used

go 1.23.2

Operating System and version

macos

@ewbankkit ewbankkit added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Nov 22, 2024
@ewbankkit ewbankkit changed the title connect service ContactFlow. IsDefault serialized incorrectly connect service ContactFlow.IsDefault serialized incorrectly Nov 22, 2024
@RanVaknin RanVaknin self-assigned this Nov 22, 2024
@RanVaknin
Copy link
Contributor

Hi @ewbankkit ,

Thanks again for the speedy report. I have engaged with the Connect team and they are working on a way to mitigate this ASAP.

All the best,
Ran~

@RanVaknin RanVaknin added service-api This issue is due to a problem in a service API, not the SDK implementation. p0 This issue is the highest priority breaking-change Issue requires a breaking change to remediate. pending-release This issue will be fixed by an approved PR that hasn't been released yet. and removed needs-triage This issue or PR still needs to be triaged. labels Nov 22, 2024
@wty-Bryant
Copy link
Contributor

wty-Bryant commented Dec 3, 2024

Hi @ewbankkit,
just let you know that service team has fixed this deserialization issue now. IsDefault is an internal property for now and was accidentally released, so the fix is just to un-release that change

Copy link

github-actions bot commented Dec 3, 2024

This issue is now closed. Comments on closed issues are hard for our team to see.
If you need more assistance, please open a new issue that references this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking-change Issue requires a breaking change to remediate. bug This issue is a bug. p0 This issue is the highest priority pending-release This issue will be fixed by an approved PR that hasn't been released yet. service-api This issue is due to a problem in a service API, not the SDK implementation.
Projects
None yet
Development

No branches or pull requests

3 participants