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

switch to ex_aws library #5

Merged
merged 1 commit into from
Apr 11, 2024
Merged

switch to ex_aws library #5

merged 1 commit into from
Apr 11, 2024

Conversation

panentheos
Copy link
Collaborator

Replaces aws-elixir library with ex_aws plus a module to support Polly. The aws-elixir library has no built-in mechanism for querying ECS instance metadata, so it doesn't work when deployed. This should be a no-op, functionality wise.

Copy link

github-actions bot commented Apr 5, 2024

Coverage of commit 25a0148

Summary coverage rate:
  lines......: 6.1% (2 of 33 lines)
  functions..: 33.3% (2 of 6 functions)
  branches...: no data found

Files changed coverage rate:
                          |Lines       |Functions  |Branches    
  Filename                |Rate     Num|Rate    Num|Rate     Num
  ==============================================================
  lib/web_api.ex          | 3.1%     32|20.0%     5|    -      0

Download coverage report

Copy link
Contributor

@digitalcora digitalcora left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, I had one minor question but it should not be blocking!

)
|> ExAws.request()
else
{:ok, %{body: " "}}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Curious about the choice of "stub" value here. Can it be ""? Is there something special about the space character? (or rather, <<32>>, since this data surely wouldn't be interpreted as UTF-8 text)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried "" originally, and it caused the API to respond differently in a way that complicated the code (I think it omitted the body entirely, instead of returning an empty string). I didn't re-check that with the new library, but it seems like using a non-empty stub is a cheap way to prevent similar downstream edge cases. There's nothing special about the choice of space as the character.

@panentheos panentheos merged commit a242c4c into main Apr 11, 2024
2 checks passed
@panentheos panentheos deleted the bhw/aws branch April 11, 2024 17:04
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