Skip to content

Provide environment variables overriding routing decision for tasks #13738

Description

@JanProvaznik

Summary

when reviewing #13660 it occured to me customers may want an escape hatch to use multithreaded mode with an unchangeable task that relies on static variables

Background and Motivation

There are 3 places a task can run in multithreaded mode: in process taskhost, out of process taskhost that remains after build (sidecar), out of process taskhost that dies after build (transient)

  • Ease of testing existing tests do complicated setups to get the correct taskhost
  • routing tasks that you don't control but are confident they're MT-safe to get pref benefit

Proposed Feature

provide environment variables that override routing decision by engine:
(there is precedent with env var MSBUILDFORCEALLTASKSOUTOFPROC)

MSBUILDFORCETASKSINPROCHOSTLIST="Fullname.T1,Fullnamespace.T2"
MSBUILDFORCETASKSTRANSIENTHOSTLIST="Fullname.T1,Fullnamespace.T2"
MSBUILDFORCETASKSSIDECARHOSTLIST="Fullname.T1,Fullnamespace.T2"

Alternative Designs

No response

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Area: MultithreadedArea: TasksIssues impacting the tasks shipped in Microsoft.Build.Tasks.Core.dll.

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions