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

Fix aws connector automatic endpoint discovery #1370

Merged
merged 2 commits into from
Jan 27, 2021
Merged

Conversation

doodlesbykumbi
Copy link
Contributor

@doodlesbykumbi doodlesbykumbi commented Jan 26, 2021

What does this PR do?

What's changed? Why were these changes made?

There were 2 bugs.

  1. We modified only req.URL{Scheme, Host} with the new endpoint, we missed req.Host.
  2. We were modifying the endpoint after signing the request.

2 did not show up until 1 was resolved. This is likely because the request signing doesn't
take req.URL{Scheme, Host} into account.

How should the reviewer approach this PR, especially if manual tests are required?

N/A

Are there relevant screenshots you can add to the PR description?

N/A.

What ticket does this PR close?

Resolves #1369

Checklists

Change log

  • The CHANGELOG has been updated, or
  • This PR does not include user-facing changes and doesn't require a CHANGELOG update

Test coverage

  • This PR includes new unit and integration tests to go with the code changes, or
  • The changes in this PR do not require tests

Documentation

  • This PR does not require updating any documentation, or
  • Docs (e.g. READMEs) were updated in this PR, and/or there is a follow-on issue to update docs

(For releases only) Manual tests

There were 2 bugs.
1. We modified only req.URL{Scheme, Host} with the new endpoint, we missed req.Host.
2. We were modifying the endpoint after signing the request.

2 did not show up until 1 was resolved. This is likely because the request signing doesn't
take req.URL{Scheme, Host} into account.
@doodlesbykumbi doodlesbykumbi requested a review from a team as a code owner January 26, 2021 23:37
diverdane
diverdane previously approved these changes Jan 27, 2021
Copy link
Contributor

@diverdane diverdane left a comment

Choose a reason for hiding this comment

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

This looks good, thanks for fixing this!
Approved, but just wanted to double-check whether this would be considered a user-facing bug and would therefore warrant a CHANGLOG entry?

@doodlesbykumbi
Copy link
Contributor Author

@diverdane Thanks, CHANGELOG entry added

CHANGELOG.md Outdated Show resolved Hide resolved
CHANGELOG.md Outdated Show resolved Hide resolved
CHANGELOG.md Outdated Show resolved Hide resolved
CHANGELOG.md Outdated Show resolved Hide resolved
Copy link
Contributor

@diverdane diverdane left a comment

Choose a reason for hiding this comment

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

LGTM!

CHANGELOG.md Show resolved Hide resolved
@codeclimate
Copy link

codeclimate bot commented Jan 27, 2021

Code Climate has analyzed commit b54d2d9 and detected 1 issue on this pull request.

Here's the issue category breakdown:

Category Count
Style 1

The test coverage on the diff in this pull request is 100.0% (50% is the threshold).

This pull request will bring the total coverage in the repository to 53.0% (0.0% change).

View more on Code Climate.

@izgeri
Copy link
Contributor

izgeri commented Jan 27, 2021

@doodlesbykumbi this may be out of scope for this PR, but I think I saw you mention a mock AWS server that we might be able to use for AWS integration tests. should we file an issue in this project to implement that? it would have been nice to have some integration tests for this connector.

@doodlesbykumbi
Copy link
Contributor Author

@izgeri I have an issue for that #1371. I'll tackle it at some point this week

@doodlesbykumbi doodlesbykumbi merged commit f5ad509 into master Jan 27, 2021
@doodlesbykumbi doodlesbykumbi deleted the fix-aws-endpoint branch January 27, 2021 14:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

host header not set correctly in automatic endpoint discovery for aws connector
3 participants