-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Support VSO package manager registry #2507
Conversation
Tests are broken. |
@bestander I just pushed a fix for the failed test cases. But it seems some of the cases timeout due to network issues. Is this a know issue?
These test cases passed on Travis.CI |
BTW, can we do a retry on the failed environments? |
@lyweiwei, yeah I think 3 retries could be reasonable. |
Yeah, I think the logic is reasonable. |
bump @bestander @lyweiwei what's the path forward for vsts support? |
@zumwald, this PR is quite good, it just needs a test and a rebase. |
I just pushed a new iteration
|
@bestander The PR passed the test this time :) sorry for the delay. |
@@ -2,18 +2,25 @@ | |||
|
|||
import url from 'url'; | |||
|
|||
const SUFFIX_VISUALSTUDIO = '.pkgs.visualstudio.com'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I missed that detail earlier.
It looks hard to scale a maintain a solution where every registry has to be hardcoded in Yarn.
Can this setting be moved to .yarnrc for each registry to configure?
@@ -10,7 +10,7 @@ import * as fs from '../src/util/fs.js'; | |||
import * as constants from '../src/constants.js'; | |||
import inquirer from 'inquirer'; | |||
|
|||
jasmine.DEFAULT_TIMEOUT_INTERVAL = 60000; | |||
jasmine.DEFAULT_TIMEOUT_INTERVAL = 100000; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does it mean that requests get slower after this change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also can you add a test here for the supported case?
const alwaysAuth = this.getScopedOption(registry.replace(/^https?:/, ''), 'always-auth') | ||
|| this.getOption('always-auth') | ||
|| removePrefix(requestUrl, registry)[0] === '@'; | ||
const alwaysAuth = this.getRegistryOrGlobalOption(registry, 'always-auth'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bestander does it make sense to force adding auth key to resoled url?
I faced similar problem some months ago with our artifactory.
@lyweiwei Can you remove the VSTS specific constant here and still make Yarn work against VSO branch? Or did you find a different work around? |
@lyweiwei @bestander I tried picking continuing this in #3231. Would very much appreciate a review! 🙂 |
… feeds (#3231) * Fix issue 2505 * Fix flow check * Fix test errors * Load custom package host suffix from .yarnrc * Update tests with new customHostPrefix parameter * Use customHostSuffix parameter to determine if request is to registry
This one got replaced with #3231 |
This is for a pre-review for the fix of #2505,
Will add test cases if the maintainer team agrees the basic idea.
Root cause
As described in #2505, for VSO package manager registries the package tarball's URL is not prefixed with the registry URL.
Fix
When downloading tarball, calculate the auth method with the original package nam instead of the tarball URL, if the URL is resolved from an NPM registry).