-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
NuGetCommandV2 fails gracefully when used on ubuntu 24 without mono #20801
base: master
Are you sure you want to change the base?
Conversation
"loc.messages.Warning_UnsupportedServiceConnectionAuth": "The service connection does not use a supported authentication method. Please use a service connection with personal access token based auth." | ||
"loc.messages.Warning_UnsupportedServiceConnectionAuth": "The service connection does not use a supported authentication method. Please use a service connection with personal access token based auth.", | ||
"loc.messages.LIB_WhichNotFound_Linux": "Unable to locate executable file: '%s'. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.", | ||
"loc.messages.Error_IncompatibleUbuntuVersion": "Detected using an Ubuntu24 or newer agent without mono. This is incompatible with NuGetCommand@2. Please follow the directions here [link] for how to pin your agent to an older version of Ubuntu or install mono on your agent." |
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.
The first version to break is 22.04, not 24
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.
Changed this!
"loc.messages.Warning_UnsupportedServiceConnectionAuth": "The service connection does not use a supported authentication method. Please use a service connection with personal access token based auth." | ||
"loc.messages.Warning_UnsupportedServiceConnectionAuth": "The service connection does not use a supported authentication method. Please use a service connection with personal access token based auth.", | ||
"loc.messages.LIB_WhichNotFound_Linux": "Unable to locate executable file: '%s'. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.", | ||
"loc.messages.Error_IncompatibleUbuntuVersion": "Detected using an Ubuntu24 or newer agent without mono. This is incompatible with NuGetCommand@2. Please follow the directions here [link] for how to pin your agent to an older version of Ubuntu or install mono on your agent." |
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.
One of the benefits of using a kb link is we can change it to say whatever we want, so don't refer to the contents of the document in the message. Just say something like "See [link] for more information"
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.
Changed this!
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.
A couple minor suggestions still
"loc.messages.Warning_UnsupportedServiceConnectionAuth": "The service connection does not use a supported authentication method. Please use a service connection with personal access token based auth." | ||
"loc.messages.Warning_UnsupportedServiceConnectionAuth": "The service connection does not use a supported authentication method. Please use a service connection with personal access token based auth.", | ||
"loc.messages.LIB_WhichNotFound_Linux": "Unable to locate executable file: '%s'. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.", | ||
"loc.messages.Error_IncompatibleUbuntuVersion": "Detected agent uses Ubuntu 22.04 or newer and could not find mono. See [link] for more information." |
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 we could be a little more direct that not only did we detect the condition, but that it is causing a failure. Consider "The task has failed because you are using Ubuntu 22.04 without mono. See [link] for more information."
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.
Changed this!
const distribution = _parseLinuxDistribution(lbsContents); | ||
if (distribution === 'Ubuntu') { | ||
const version = parseFloat(_parseUbuntuVersion(lbsContents)); | ||
if (version >= 22.04) { |
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 was mistaken I apologize. I'm not sure where I got 22.04 from. 24.04 should be the proper cutoff (though as long as we check for mono as well, it shouldn't be a big deal)
Task name: NuGetCommandV2
Description: NuGetCommandV2 fails gracefully when used on ubuntu 24 without mono
Documentation changes required: (Y/N) Y - Documentation explaining ubuntu 24 is incompatible without mono and different options users can do instead
Added unit tests: (Y/N) N
Attached related issue: (Y/N) Y - Work Item #2244271
Checklist: