Skip to content

Conversation

IanMatthewHuff
Copy link
Member

For #6265

  • Pull request represents a single change (i.e. not fixing disparate/unrelated things in a single PR)
  • Title summarizes what is changing
  • Has a news entry file (remember to thank yourself!)
  • Appropriate comments and documentation strings in the code
  • Has sufficient logging.
  • Has telemetry for enhancements.
  • Unit tests & system/integration tests are added/updated
  • Test plan is updated as appropriate
  • package-lock.json has been regenerated by running npm install (if dependencies have changed)
  • The wiki is updated with any design decisions/details.

} else if (value === closeOption) {
sendTelemetryEvent(Telemetry.SelfCertsMessageClose);
}
// Don't leave our Interactive Window open in a non-connected state
Copy link
Member Author

Choose a reason for hiding this comment

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

I can remove this if we don't like it. I still have the bug for doing a reconnect that I'll try to fit into this release. But I felt this one liner made the scenario better than it currently is. So I stuck it in with this fix.

Copy link

Choose a reason for hiding this comment

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

No sounds good to me. Better than what we have now.


In reply to: 296046769 [](ancestors = 296046769)

}
}

// For HTTPS connections respect our allowUnauthorized setting by adding in an agent to enable that on the request
Copy link
Member Author

Choose a reason for hiding this comment

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

Our services connection stuff was using the allowUnauthorized flag, but the manual password requests were not. So you couldn't connect to a self cert password machine.

let xsrfCookie: string | undefined;

const response = await fetchFunction(`${url}login?`, {
const response = await fetchFunction(`${url}login?`, this.allowUnauthorized(url, allowUnauthorized, {
Copy link

Choose a reason for hiding this comment

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

allowUnauthorized [](start = 66, length = 17)

Naming here is weird. Parameter and function have the same name?. Maybe it could be called getAllowUnauthorized or something?

Choose a reason for hiding this comment

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

The parameter is to check if its allowed right? Why not name it 'unauthorizedIsAllowed'? That seems to describe the parameter to me and the function name could stay like that.

Copy link
Member Author

@IanMatthewHuff IanMatthewHuff Jun 21, 2019

Choose a reason for hiding this comment

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

Yeah, that kinda slipped by while coding. It's not good. I'll rename

Copy link
Member Author

Choose a reason for hiding this comment

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

I went with renaming the function as the allowUnauthorized reflects a setting / bool to me, but not an action. So renamed the function to better express the action being performed.

Copy link

@rchiodo rchiodo left a comment

Choose a reason for hiding this comment

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

:shipit:

let xsrfCookie: string | undefined;

const response = await fetchFunction(`${url}login?`, {
const response = await fetchFunction(`${url}login?`, this.allowUnauthorized(url, allowUnauthorized, {

Choose a reason for hiding this comment

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

The parameter is to check if its allowed right? Why not name it 'unauthorizedIsAllowed'? That seems to describe the parameter to me and the function name could stay like that.

@IanMatthewHuff IanMatthewHuff merged commit d2d64c0 into microsoft:master Jun 21, 2019
IanMatthewHuff added a commit to IanMatthewHuff/vscode-python that referenced this pull request Jun 21, 2019
@IanMatthewHuff IanMatthewHuff deleted the dev/ianhu/certsAndPassword branch July 25, 2019 23:50
@lock lock bot locked as resolved and limited conversation to collaborators Aug 1, 2019
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