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

Add "X-Exodus-Query" header #338

Merged
merged 1 commit into from
Apr 9, 2022
Merged

Conversation

dichn
Copy link
Collaborator

@dichn dichn commented Apr 7, 2022

Because of the traffic shift and traffic will be routed to different
lambda versions (in different regions), integration tests may run again
an old version lambda.

The "X-Exodus-Query" header is primarily used in a request, to provide
the version of exodus-lambda, "X-Exodus-Version" in response.

For traffic shift:
https://aws.amazon.com/blogs/compute/implementing-safe-aws-lambda-deployments-with-aws-codedeploy/

@dichn
Copy link
Collaborator Author

dichn commented Apr 7, 2022

re-push for fixing a typo in commit message (no code change)

Copy link
Member

@rohanpm rohanpm left a comment

Choose a reason for hiding this comment

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

I think the commit message is misleading:

Could the commit message please stick with the known facts? You don't have to put forward a theory as to why we might be hitting an old version of the lambda sometimes.

I would have written something like "Our tests sometimes seem to hit an old version of our lambda, for unclear reasons. Let's make it possible to query the currently deployed lambda version so we can at least reliably detect when this happens."

@@ -33,6 +33,12 @@ def handler(self, event, context):
{"key": "Digest", "value": f"id-sha-256={sum_b64}"}
]

if "headers" in request and "x-exodus-query" in request["headers"]:
self.logger.error("x-exodus-query exist")
Copy link
Member

Choose a reason for hiding this comment

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

Please drop this as it's not an error. You could keep a debug() if you really need it.

@dichn
Copy link
Collaborator Author

dichn commented Apr 8, 2022

  1. commit message updated
  2. remove useless log

rohanpm
rohanpm previously approved these changes Apr 8, 2022
Our tests sometimes seem to hit an old version of our lambda, for
unclear reasons. Let's make it possible to query the currently deployed
lambda version so we can at least reliably detect when this happens.

The "X-Exodus-Query" header is primarily used in a request, to provide
the version of exodus-lambda, "X-Exodus-Version" in response.
@dichn
Copy link
Collaborator Author

dichn commented Apr 8, 2022

re-push after the rebase of #337

@dichn dichn requested a review from rohanpm April 8, 2022 05:48
@dichn dichn merged commit c56bd53 into release-engineering:master Apr 9, 2022
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.

None yet

3 participants