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

Issue #103: Migrate from aws-sdk-go to aws-sdk-go-v2 #104

Merged

Conversation

onno-vos-dev
Copy link
Member

@onno-vos-dev onno-vos-dev commented Mar 8, 2024

Goal here has been to minimize the diff in aws-elixir and aws-erlang to a bare minimum.

Some minor diffs were unavoidable and deemed acceptable

  • Fix SuccessStatusCode to always be 200 if not provided by AWS in the API
    • Before SuccessStatusCode was set to undefined/nil. This was unhandled and would've caused errors.
  • Fix aws-erlang/issues/148 to allow send_body_as_binary & receive_body_as_binary to be sent in as options
    • The default remains the same, but certain APIs may require a change of the default depending on the in- or output
  • Drop abbreviation from metadata. It is no longer available in aws-sdk-go-v2 and unused in aws-elixir
  • Slight formatting changes on aws-erlang docs as the new docs contain a lot more newlines and hence cause more noise
  • Uri Paths may have changed. This should not impact the clients. It was likely broken in the aws-sdk-go
  • QueryMap may have changed but should not impact the client. It was likely broken in the aws-sdk-go
  • Docs have changed (massively) since almost all documentation has been updated
  • Update aws-elixir pipeline to use the new aws-sdk-go-v2 for it's nightly builds
  • Update aws-erlang pipeline to use the new aws-sdk-go-v2 for it's nightly builds

This has been quite an effort and I just wanna say thank you to Amin, Gustavo and Philip for their contribution, reviews and ideas! 🙇 ❤️ I added each of you as Co-Authors to the commit so you'll get your contribution in the stats! ❤️

Goal here has been to minimize the diff in aws-elixir and aws-erlang to a bare minimum.

Some minor diffs were unavoidable and deemed acceptable
* Fix SuccessStatusCode to always be 200 if not provided by AWS in the API
  * Before SuccessStatusCode was set to undefined/nil. This was unhandled and would've caused errors.
* Fix aws-erlang/issues/148 to allow send_body_as_binary & receive_body_as_binary to be sent in as options
  * The default remains the same, but certain APIs may require a change of the default depending on the in- or output
* Drop abbreviation from metadata. It is no longer available in aws-sdk-go-v2 and unused in aws-elixir
* Slight formatting changes on aws-erlang docs as the new docs contain a lot more newlines and hence cause more noise
* Uri Paths may have changed. This should not impact the clients. It was likely broken in the aws-sdk-go
* QueryMap may have changed but should not impact the client. It was likely broken in the aws-sdk-go
* Docs have changed (massively) since almost all documentation has been updated

Co-authored-by: Amin Arria <[email protected]>
Co-authored-by: Gustavo Mora González <[email protected]>
Co-authored-by: Philip Sampaio <[email protected]>
@onno-vos-dev onno-vos-dev force-pushed the issue-103-migrate-from-aws-sdk-go-to-aws-sdk-go-v2 branch from 5b08f03 to 81947e6 Compare March 8, 2024 16:14
@jadeallenx
Copy link
Contributor

This is very cool. Thank you for all of your efforts

@onno-vos-dev
Copy link
Member Author

aws-elixir diff:

aws-elixir-diff.patch

This would be the diff in aws-elixir when ignoring all doc-strings.

Using the following git grep we can exclude some of the expected diffs and we're left with 251 lines difference:

git diff | grep "^-\|^+" | grep -v "200\|nil\|lib/aws/generated\|abbreviation\|signing_name\|target_prefix\|url_path\|^-[[:space:]]*\"\|^+[[:space:]]*\"\|^-$\|^+$" | wc -l
251

Looking at that actual diff we end up with:
aws-elixir-actual-diff.patch

Here we see mostly some new/removed functions in control_tower | entity_resolution | neptunedata | q_business | s3. Ignoring those and repeating the above git diff, we're left with 39 lines changed 🎉 Quite impressive considering the specs have changed as massively as they did 👍


aws-erlang diff:

aws-erlang-diff.patch

This would be the diff in aws-erlang when ignoring all doc-strings.

Using the following git grep we can exclude some of the expected diffs and we're left with 212 lines difference:

git diff | grep -v "src/aws_\|%%\|SuccessStatusCode\|Path = \|send_body_as_binary\|receive_body_as_binary\|Options0\|Options2\|proplists_take\|proplists:get_value\|proplists:delete\|^+$\|^-$\|QueryMap\|Client#{" | grep '^[+-]' | wc -l
212

Looking at that actual diff we end up with:
aws-erlang-actual-diff.patch

Here we see mostly some new/removed functions in control_tower | entity_resolution | neptunedata | q_business | s3. Ignoring those and repeating the above git diff, we're left with 46 lines changed 🎉 Quite impressive considering the specs have changed as massively as they did 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants