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: restore allow setting engine: false to ignore env var #2850

Merged
merged 3 commits into from
Jun 21, 2019

Conversation

cheapsteak
Copy link
Member

Followup to fix unintended side effect of #2685 that David discovered where setting engine: false would no longer ignore the ENGINE_API_KEY environment variable

@@ -87,7 +87,8 @@ function getEngineApiKey(engine: Config['engine']): string | undefined {

function getEngineServiceId(engine: Config['engine']): string | undefined {
const engineApiKey = getEngineApiKey(engine);
if (engineApiKey) {

if (engine !== false && engineApiKey) {
Copy link
Member

Choose a reason for hiding this comment

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

Seems like this logic should be in getEngineApiKey?

Copy link
Member Author

Choose a reason for hiding this comment

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

indeed, fixed

@cheapsteak cheapsteak force-pushed the chang/fix/restore-engine-false-no-env branch 3 times, most recently from 2e60f4f to c91f835 Compare June 14, 2019 20:20
Copy link
Member

@glasser glasser left a comment

Choose a reason for hiding this comment

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

oops, missed that this was blocked on me

CHANGELOG.md Outdated
@@ -10,6 +10,7 @@
- `apollo-federation`: Deduplicate variable definitions for subqueries [PR #2840](https://github.com/apollographql/apollo-server/pull/2840)
- `apollo-federation`: Preserve docstrings in SDL of federated services. [PR #2830](https://github.com/apollographql/apollo-server/pull/2830)
- `apollo-engine-reporting`: Set `forbiddenOperation` and `registeredOperation` later in the request lifecycle [PR #2828](https://github.com/apollographql/apollo-server/pull/2828)
- `apollo-server-core`: Bug fix: Setting `engine: false` should ignore `ENGINE_API_KEY` in environment variable [PR #2850](https://github.com/apollographql/apollo-server/pull/2850)
Copy link
Member

Choose a reason for hiding this comment

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

although the changelog should note that this was a regression introduced in 2.6.0

Copy link
Member Author

Choose a reason for hiding this comment

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

ah, good idea, will add!

@cheapsteak cheapsteak force-pushed the chang/fix/restore-engine-false-no-env branch from c046802 to 639476a Compare June 21, 2019 19:05
@cheapsteak cheapsteak merged commit 06df626 into master Jun 21, 2019
@abernix abernix deleted the chang/fix/restore-engine-false-no-env branch June 25, 2019 10:16
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 22, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants