-
Notifications
You must be signed in to change notification settings - Fork 95
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
Avoid breaking existing consumers who use startPort >= 40000 #86
Conversation
Randomize selection order of tested ports
fix(docs): follow repo url change for travis ci badge
Updated to also address #84. By default, |
LGTM Thank you for working on this PR. |
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.
Looks good and seems to fix both issues encountered in Ember CLI.
I see some strange behavior for |
I think that's because the |
OK, yeah the interval should be open, not closed. Will update now. |
Ping @eriktrom. Sorry to bother you, but is there any chance to get this PR merged soon? Lots of downstream repositories are relying on this feature to work correctly. |
+1. With 877 dependant packages and 4 685 655 weekly downloads, this as-patch breaking change that prevents port choice is breaking so many systems right now and shouldn't stay broken for so long. |
Downgrading to 1.0.21 explicitly is a temporary fix. Our outage was a bit too long to wait for the PR. |
@BarthesSimpson - thanks - i will take a closer look tonight, tomorrow and follow up. For today, i rolled back to v1.0.21 (as v1.0.23) |
@BarthesSimpson - I feel like we should consider an option that does not directly modify the main repo -- maybe another export I'm very hesitant to release another version that is not a semver major bump unless we can guarantee that changes are strictly additive. Thoughts? |
The only issue here is that, for example, lets say you start 2 test servers inside ember cli - if we pass b/c of matrix of use cases upstream are very high, this single example should help explain my concern. fixing for ember-cli is one thing, for firebase, circleci and other tools that depend on the current behavior 'as is' -- i think we make a new method or (if the code was cleaner) an extension poiint, but new method more likely in this case |
Sure - I'll take another look this weekend and see if I can find a good approach for adding a |
@BarthesSimpson - see #91 for thoughts on releasing changes to portfinder moving forward - mostly that we should only do so if we do a semver major release, reducing exposure to how this library has been used by different consumers over the past many years. If we go that route, we can consider adding deprecation warning to v1.x that would not take effect until v3.x - although someone would need to take the lead on this as I'm involved in the depths of a few other topics right now - just fyi - open a meta ticket if you want to start a discussion outside this thread regarding such things I'm going to close this issue and link to it from a clean issue, so we don't spam |
@BarthesSimpson - #92 is a meta issue on a semver major that I would feel comfortable releasing these changes to. Re-opening, with 2.x tag. |
FYI: if interest remains in merging this (w/ the randomization feature via @BarthesSimpson original work) see #105 and vote. I'm taking a quick pulse of the traction it would garner if made possible to you and others. |
closing to cleanup issue list, comments or questions still welcome, if needed consolidated via #99 |
This would fix the issue identified in #85. If there is an existing consumer who uses
getPort
with astartPort
greater than 40000, instead of throwing an Error this will log a warning to the console and bump thestopPort
up to 65535 (i.e. behave the same as beforeexports.highestPort
was reduced to 40000).An error is still thrown if the
stopPort
is lower than thestopPort
when both of these values are below 40000.