Skip to content
This repository has been archived by the owner on Oct 2, 2021. It is now read-only.

Now we log the browser and the protocol version when attempting to li… #338

Merged
merged 2 commits into from
Jun 29, 2018

Conversation

rakatyal
Copy link
Contributor

…st targets

private async _getTargets(address: string, port: number): Promise<ITarget[]> {

// Get the browser and the protocol version
await this._getVersionData(address, port);
Copy link
Member

Choose a reason for hiding this comment

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

Can you have it only do this if /json/list fails? Or do you need this info all the time?

Copy link
Contributor

Choose a reason for hiding this comment

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

What is your concern with doing this every time?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think this info will be helpful to us in all the cases irrespective of whether /list calls fails or not. Do you have any concerns?

Copy link
Member

Choose a reason for hiding this comment

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

It's just doing extra work which will take a little time. How will it help when /list doesn't fail, you get the version info later too right?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes but we don't get that info whenever there is a timeout which could be due to any other reasons as well and we do see a lot of customers having those.

Copy link
Contributor

Choose a reason for hiding this comment

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

@roblourens What if we don't await this task, and we just do it in "background"? That way we are only spending CPU resources, and we are not making the user wait for this.

Copy link
Member

Choose a reason for hiding this comment

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

Yes but we don't get that info whenever there is a timeout which could be due to any other reasons as well and we do see a lot of customers having those.

A timeout for /json/list? But you would be getting it from /version when /json/list fails.

But yeah, it would be ok if you don't await it. And make sure it doesn't break anything if the runtime doesn't support /json/list/version. Right now it looks like it will fail if that endpoint doesn't exist.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I made it not to await and handled the fail scenario to just log the error message.

@auchenberg
Copy link
Contributor

What's the scenario and use-case driving this?

@rakatyal
Copy link
Contributor Author

rakatyal commented Jun 29, 2018

@auchenberg: It originated due to a request from the Edge team to help diagnose an issue. They are investigating failures where we sometimes do not hit the /json/list endpoint and the debug adapter times out due to it. They wanted to see if in those scenarios, we are able to hit the /json/version endpoint.

We thought of adding this just for testing but then we realized that it may be useful data (to see the impact of this bug for customers and also to get the browser and the protocol version) in the product as well and we decided to make this change. Do you have any concerns over this?

@roblourens roblourens merged commit 95817eb into microsoft:master Jun 29, 2018
@roblourens roblourens added this to the July 2018 milestone Jun 29, 2018
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.

None yet

4 participants