-
Notifications
You must be signed in to change notification settings - Fork 389
Prefer modern UseDotNet task over obsolete DotNetCoreInstaller #427
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
Conversation
The `UseDotNet` task is newer and follows best practices from the dotnet SDK team better than the older `DotNetCoreInstaller` task. One significant difference between the two is that `UseDotNet` sets `DOTNET_MULTILEVEL_LOOKUP=0`, such that once you use this task once, you have to manually install *all* SDK/runtime versions that your pipeline requires. This task *may* be used more than once in order to accomplish this. This is actually a *good* thing, because it means your pipeline is more fully self-describing, and less dependent on whatever versions the agents happen to have installed at the time.
Sorry @AArnott I try to explain better, I wasn't clear enough(my english is not so good sorry again).
My idea to have a "more complex and less self-describing" CI workflow(a simple batch run on yaml) was to avoid to handle 2 different scenario and have a consistent behaviour inside CI and on local run, in this way we have also less "infra metadata"(script+yaml) to handle
I mean that we can setup a "mixed CI" with steps:
My idea is when in future we'll do some internal changes on instrumentation/tests we dev on pinned SDK but before PR we can tests if that updates works for all expected SDK simply running "local build" |
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.
LGTM
@AArnott to "test with different SDK" another idea could be add a script under
And use in local and "if need" at the end of normal pipelines or as "outerloop" leg. |
Correct.
No. Just
True. On the other hand, they will never get any of a much more bizarre set of errors that are unpredictable, if they're using an SDK version you don't support and/or have never tried. This "pinning" may cause one step (to install the SDK) on a contributor, but at that point it will always work the way you expect. It also means if you go back and service some particular version later on, it will build exactly like it did back when you originally built it. IMO that's a net win.
Yes, that sounds like a good goal.
I've tried to strike a balance between a step-by-step AZP pipeline that is informative to look at, tracks test runs and identifies unstable tests, etc., vs. a reliable way to reproduce all the validations locally with minimal maintenance as well. So I respect the goal there too and am happy to help you reach it (either with guidance or PRs). With this and my other PRs I think we're moving closer to what works well. More on that in a separate issue if you've got one or want to file one on the topic.
I think that's a reasonable proposal. I'm still doing a bit of guessing as to what you'll be doing in that script so I'd like to learn more (in a dedicated issue) about what you need to say for certain and/or offer refinements. |
@AArnott thank's for answers I'll open a separate issue when some of "open PR" will be merged(we've to merge some code PRs on intrumentation tests before try to do multiple tests, we can postpone for now). |
Prefer modern UseDotNet task over obsolete DotNetCoreInstaller
The
UseDotNet
task is newer and follows best practices from thedotnet SDK team better than the older
DotNetCoreInstaller
task.One significant difference between the two is that
UseDotNet
setsDOTNET_MULTILEVEL_LOOKUP=0
, such that once you use this task once, you have tomanually install all SDK/runtime versions that your pipeline requires.
This task may be used more than once in order to accomplish this.
This is actually a good thing, because it means your pipeline is more fully
self-describing, and less dependent on whatever versions the agents happen to
have installed at the time.
I do wonder what @MarcoRossignoli meant when he said in #425:
Since here we do set that, what does that mean for #396?