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

XML Parsing mismatch in ListStorageLensConfiguration #2801

Closed
2 of 3 tasks
ViBiOh opened this issue Sep 23, 2024 · 2 comments
Closed
2 of 3 tasks

XML Parsing mismatch in ListStorageLensConfiguration #2801

ViBiOh opened this issue Sep 23, 2024 · 2 comments
Assignees
Labels
bug This issue is a bug. duplicate This issue is a duplicate. p3 This is a minor priority issue service-api This issue is due to a problem in a service API, not the SDK implementation.

Comments

@ViBiOh
Copy link

ViBiOh commented Sep 23, 2024

Acknowledgements

Describe the bug

The mapping of s3control.ListStorageLensConfigurations is not aligned with the response from the API.

Regression Issue

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

Expected Behavior

When I request s3control.ListStorageLensConfigurations I get the results in StorageLensConfigurationList.

Current Behavior

When I request s3control.ListStorageLensConfigurations, StorageLensConfigurationList is always empty.

Payload response looks like this

<ListStorageLensConfigurationResult xmlns="http://awss3control.amazonaws.com/doc/2018-08-20/">
  <StorageLensConfiguration>
    <StorageLensArn>arn:aws:s3:eu-west-3:XXXX:storage-lens/vibioh-test</StorageLensArn>
    <Id>vibioh-test</Id>
    <HomeRegion>eu-west-3</HomeRegion>
    <IsEnabled>true</IsEnabled>
  </StorageLensConfiguration>
</ListStorageLensConfigurationResult>

Reproduction Steps

package main

import (
	"context"
	"fmt"
	"log"

	"github.com/aws/aws-sdk-go-v2/aws"
	"github.com/aws/aws-sdk-go-v2/config"
	"github.com/aws/aws-sdk-go-v2/service/s3control"
	"github.com/aws/smithy-go/logging"
)

func main() {
	cfg, err := config.LoadDefaultConfig(
		context.Background(),
		config.WithRegion("YOUR_REGION_HERE"),
		config.WithSharedConfigProfile("YOUR_PROFILE_HERE"),
		config.WithLogger(logging.LoggerFunc(func(_ logging.Classification, format string, v ...interface{}) {
			fmt.Printf(format, v...)
		})),
		config.WithClientLogMode(aws.ClientLogMode(aws.LogRequestWithBody|aws.LogResponseWithBody)),
	)
	if err != nil {
		log.Fatalf("unable to load SDK config: %s", err)
	}

	client := s3control.NewFromConfig(cfg)
	payload, err := client.ListStorageLensConfigurations(
		context.Background(), &s3control.ListStorageLensConfigurationsInput{
			AccountId: aws.String("YOUR_AWS_ACCOUNT"),
		},
	)
	if err != nil {
		panic(err)
	}

	fmt.Printf("\n%s\n", payload.StorageLensConfigurationList)
}

Possible Solution

Remove the extra List from here (but it's codegen so I don't know where to change the exact config)

Additional Information/Context

No response

AWS Go SDK V2 Module Versions Used

require (
	github.com/aws/aws-sdk-go-v2 v1.31.0
	github.com/aws/aws-sdk-go-v2/config v1.27.36
	github.com/aws/aws-sdk-go-v2/service/s3control v1.48.0
	github.com/aws/smithy-go v1.21.0
)

Compiler and Version used

go1.23

Operating System and version

macOS 14.6.1 (23G93)

@ViBiOh ViBiOh added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Sep 23, 2024
@ViBiOh ViBiOh changed the title (short issue description) XML Parsing mismatch in ListStorageLensConfiguration Sep 23, 2024
@RanVaknin
Copy link
Contributor

RanVaknin commented Sep 26, 2024

Hi @ViBiOh ,

Thanks for reaching out. This was already reported a long while ago in #2863. We have reached out to the service team internally about and there was no ETA on a fix. I have reached out again to see if I can get someone to take another look at this.

I'm going to close this issue and ask that you check the original tracking issue for further updates. Please upvote and comment on it to make sure you being impacted is visible.

Thanks,
Ran~

@RanVaknin RanVaknin self-assigned this Sep 26, 2024
@RanVaknin RanVaknin added service-api This issue is due to a problem in a service API, not the SDK implementation. p3 This is a minor priority issue duplicate This issue is a duplicate. and removed needs-triage This issue or PR still needs to be triaged. labels Sep 26, 2024
@RanVaknin RanVaknin closed this as not planned Won't fix, can't repro, duplicate, stale Sep 26, 2024
Copy link

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
bug This issue is a bug. duplicate This issue is a duplicate. p3 This is a minor priority issue 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

2 participants