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 remote hosted endpoint support #2915

Conversation

JacksonKearl
Copy link

(mainly directly copied from enterprise gateway)

Feedback on best testing mechanism appreciated. There are a bunch of GCS calls made for the various links, so my approach was to install a nock.recoder, get a trace of all of the requests, and install the mocks in various tests, in each test asserting that each of the relevant mocks was appropriately called.

Jackson Kearl added 3 commits June 24, 2019 13:22
(mainly directly copied from enterprise gateway)
@JacksonKearl JacksonKearl requested a review from jbaxleyiii June 24, 2019 20:55
@JacksonKearl JacksonKearl self-assigned this Jun 24, 2019
@JacksonKearl JacksonKearl changed the base branch from master to enterprise-merge-megabranch June 24, 2019 20:59
Copy link
Contributor

@jbaxleyiii jbaxleyiii left a comment

Choose a reason for hiding this comment

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

@JacksonKearl this is a great start! Super exciting to see this come together! Can you sync with @trevor-scheer on his current work on observability and control points that may impact this? SO excited to get this in!

mockGetCompositionConfigLink();
mockGetCompositionConfigs();
mockGetImplementingServices();
mockGetRawPartialSchema();
Copy link
Contributor

Choose a reason for hiding this comment

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

Since these are async in the actual code, I think we should make these match the call ordering and make them async here as well

Copy link
Author

@JacksonKearl JacksonKearl Jun 25, 2019

Choose a reason for hiding this comment

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

Bit confused. The installation of the mock is synchronous.

@@ -0,0 +1,114 @@
import nock from 'nock';

export const mockLocalhostSDLQuery = () =>
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we should provide a way to override the results of these requests so we can test error handling better

packages/apollo-gateway/src/index.ts Outdated Show resolved Hide resolved
export interface HostedGatewayConfig extends GatewayConfigBase {
apiKey?: string;
tag?: string;
federationVersion?: number;
Copy link
Contributor

Choose a reason for hiding this comment

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

@JacksonKearl I know that @trevor-scheer has been thinking through fallbacks and control overrides for fetching from the managed system in case of failure. I wonder if we should merge all three of these configs together into a simpler apiKey + serviceList / way to fetch services?

Can you sync with him on those ideas?

packages/apollo-gateway/src/index.ts Outdated Show resolved Hide resolved
packages/apollo-gateway/src/utilities/createSHA.ts Outdated Show resolved Hide resolved
packages/apollo-gateway/src/utilities/isNodeLike.ts Outdated Show resolved Hide resolved
@JacksonKearl JacksonKearl force-pushed the enterprise-merge/remoteHostedServiceLists branch 2 times, most recently from cf5abb1 to 3e769f1 Compare June 26, 2019 23:07
@JacksonKearl
Copy link
Author

I have no clue how to revert the merge.

This reverts commit 4629465, reversing
changes made to de238e5.
@JacksonKearl
Copy link
Author

Nvm

Copy link
Member

@abernix abernix left a comment

Choose a reason for hiding this comment

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

Mostly commentary, but overall looks pretty good!

packages/apollo-gateway/src/index.ts Outdated Show resolved Hide resolved
packages/apollo-gateway/src/index.ts Outdated Show resolved Hide resolved
packages/apollo-gateway/src/index.ts Outdated Show resolved Hide resolved
packages/apollo-gateway/src/loadServicesFromStorage.ts Outdated Show resolved Hide resolved
packages/apollo-gateway/src/loadServicesFromStorage.ts Outdated Show resolved Hide resolved
Co-Authored-By: Jesse Rosenberger <git@jro.cc>
@JacksonKearl
Copy link
Author

Merging into staging now because can't really build anything on top of these while all the components are implemented on independent branches.

@JacksonKearl JacksonKearl merged commit 1c964c0 into enterprise-merge-megabranch Jun 27, 2019
@abernix abernix deleted the enterprise-merge/remoteHostedServiceLists branch June 28, 2019 07:32
@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.

3 participants