这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@tirumaraiselvan
Copy link
Contributor

@tirumaraiselvan tirumaraiselvan commented Nov 13, 2019

Description

Adds X-Forwarded-Host and X-Forwarded-User-Agent headers to the remote schema requests.

Affected components

  • Server

Related Issues

#2572

Solution and Design

Server checklist

Catalog upgrade

Does this PR change Hasura Catalog version?

  • No

Metadata

Does this PR add a new Metadata feature?

  • No

GraphQL

  • No new GraphQL schema is generated

Breaking changes

  • No Breaking changes

Steps to test and verify

Limitations, known bugs & workarounds

This PR does not forward other headers like X-Forwarded-For which is more complicated.

@netlify
Copy link

netlify bot commented Nov 13, 2019

Deploy preview for hasura-docs ready!

Built with commit 37f6791

https://deploy-preview-3347--hasura-docs.netlify.com

@hasura-bot
Copy link
Contributor

Review app for commit 08e7ed0 deployed to Heroku: https://hge-ci-pull-3347.herokuapp.com
Docker image for server: hasura/graphql-engine:pull3347-08e7ed07

lexi-lambda
lexi-lambda previously approved these changes Nov 13, 2019
lexi-lambda
lexi-lambda previously approved these changes Nov 13, 2019
@lexi-lambda
Copy link
Contributor

@tirumaraiselvan The tests you just pushed seem to be failing.

@tirumaraiselvan
Copy link
Contributor Author

Bit of a conundrum. The server in CI seems to be running in localhost:8081.

@tirumaraiselvan
Copy link
Contributor Author

@lexi-lambda I am thinking of dropping the test for X-Forwarded-Host as it is dynamic ( but I will keep X-Forwarded-User-Agent) ?

@lexi-lambda
Copy link
Contributor

Ah, yeah, the tests in CI spin up two instances of graphql-engine in parallel. There must be a way to access the current host and port we’re running the tests against from inside the test suite code, so we should use that for the expected value of X-Forwarded-Host.

@tirumaraiselvan
Copy link
Contributor Author

tirumaraiselvan commented Nov 13, 2019

We can get the host:port in pytest but the expected value will then somehow will have to be fed to the graphql_server.py (which so far was independent server). Worth the fight?

@lexi-lambda
Copy link
Contributor

Ah, I see, right of course. I think it’s probably worth doing—graphql-server.py will need to check to see if the host is either of the expected GraphQL servers, so it should probably be fed a list of URLs the same way the core test suite is.

@hasura-bot
Copy link
Contributor

Review app for commit b787bbe deployed to Heroku: https://hge-ci-pull-3347.herokuapp.com
Docker image for server: hasura/graphql-engine:pull3347-b787bbec

@hasura-bot
Copy link
Contributor

Review app for commit 1d70c47 deployed to Heroku: https://hge-ci-pull-3347.herokuapp.com
Docker image for server: hasura/graphql-engine:pull3347-1d70c479

@tirumaraiselvan
Copy link
Contributor Author

Wow awkwardly stumbled on fixing this till I realized that there was only one pytest session but parallelized internally.

@hasura-bot
Copy link
Contributor

Review app for commit 37f6791 deployed to Heroku: https://hge-ci-pull-3347.herokuapp.com
Docker image for server: hasura/graphql-engine:pull3347-37f6791e

@lexi-lambda lexi-lambda merged commit ffeda35 into hasura:master Nov 13, 2019
@hasura-bot
Copy link
Contributor

Review app https://hge-ci-pull-3347.herokuapp.com is deleted

polRk pushed a commit to polRk/graphql-engine that referenced this pull request Feb 12, 2020
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.

3 participants