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

Hotfix - Unsupported Protocol Scheme in VSRM Collectors. #34

Closed
wants to merge 2 commits into from
Closed

Hotfix - Unsupported Protocol Scheme in VSRM Collectors. #34

wants to merge 2 commits into from

Conversation

stobias123
Copy link

@stobias123 stobias123 commented Feb 19, 2021

…was getting 404.

Resolves #31

did some digging and found a couple things here..

This issue

RESTY 2021/02/19 17:04:08 ERROR Get "//%2foooo%2F_apis%2Frelease%2Freleases%3Fapi-version=5.1&isDeleted=false&$expand=94&minCreatedTime=2021-02-19T16%253A34%253A07Z&$top=100&queryOrder=descending/barrrrr/_apis/release/releases?api-version=5.1&isDeleted=false&$expand=94&minCreatedTime=2021-02-19T16%3A34%3A07Z&$top=100&queryOrder=descending": unsupported protocol scheme "", Attempt 2

Is caused by the vsrmclient instantiation... restClient.HostUrl is being set, but it should be restClientVsrm.HostUrl.

We're getting protocol error b/c the hosturl is never set for our vsrm client, meaning there's no http/https.

After fixing the above I found that in the case where I have a vanity url for my org (foobar.visualstudio.com), I still needed to hit the VSTRM endpoint directly to get release data. Removing the if statement on L117 resolves both issues.

@stobias123 stobias123 changed the title even with a custom domain, the VSRM url remains the same, previously … Hotfix - Unsupported Protocol Scheme in VSRM Collectors. Feb 19, 2021
@mblaschke
Copy link
Member

@stobias123
isn't the bug in another line?

		c.restClientVsrm = resty.New()
		if c.HostUrl != nil {
			c.restClient.SetHostURL(*c.HostUrl)
		} else {
			c.restClientVsrm.SetHostURL(fmt.Sprintf("https://vsrm.dev.azure.com/%v/", *c.organization))
		}

i was using c.restClient. instead of c.restClientVsrm. 🙈

@mblaschke mblaschke closed this in 1e39cea May 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

unsupported protocol scheme collect releases
2 participants