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

Extract creation of HTTP and WS clients for registration to proper factories #409

Merged
merged 2 commits into from Nov 29, 2018

Conversation

cdupuis
Copy link
Member

@cdupuis cdupuis commented Nov 29, 2018

With this change, HTTP and WS client can be configured correctly to work
in all sorts of network situations, like tunnelling proxies.

With this change, HTTP and WS client can be configured correctly to work
in all sorts of network situations, like tunnelling proxies.
@cdupuis cdupuis added changelog:changed Add this issue or pull request to changed changelog section auto-merge:on-approve Auto-merge on review approvals labels Nov 29, 2018
@cdupuis cdupuis changed the title Extract creation of HTTP and WS clients to proper factories Extract creation of HTTP and WS clients for registration to proper factories Nov 29, 2018
Copy link
Contributor

@ddgenome ddgenome left a comment

Choose a reason for hiding this comment

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

LGASONAICYWTATFFTM (Looks good. All suggestions optional. Not approving in case you want to address them. Feel free to merge.)

import * as parseUtils from "./lib/project/util/parseUtils";
import * as projectUtils from "./lib/project/util/projectUtils";
import * as secured from "./lib/secured";
import * as astUtils from "./lib/tree/ast/astUtils";
Copy link
Contributor

Choose a reason for hiding this comment

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

Why move all these? And if you are going to break the alphabetical order, why not put them all at the top or bottom?

method: HttpMethod.Post,
headers: { Authorization: authorization },
options: {
timeout: configuration.ws.timeout || 10000,
Copy link
Contributor

Choose a reason for hiding this comment

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

Shouldn't this default be provided by the configuration defaults?

const retryOptions: WrapOptions = {
...DefaultRetryOptions,
...DefaultRetryOptions as WrapOptions,
...opts,
};
logger.log("silly", `${description} with retry options '%j'`, retryOptions);
Copy link
Contributor

Choose a reason for hiding this comment

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

Should this be inside a opts.log conditional?

@atomist-bot atomist-bot merged commit 38153b5 into master Nov 29, 2018
@atomist-bot
Copy link
Contributor

Pull request auto merged by Atomist.

  • 1 approved review by @ddgenome
  • 2 successful checks

[atomist:generated] [auto-merge:on-approve]

@atomist-bot atomist-bot deleted the http-client-config branch November 29, 2018 17:52
atomist-bot added a commit that referenced this pull request Nov 29, 2018
[atomist:generated]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto-merge:on-approve Auto-merge on review approvals changelog:changed Add this issue or pull request to changed changelog section
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants