TFBuild.IsRunningOnVSTS is confusing when using own build agent
- Dominant language
- C#
- Stars
- 4.2k
- Forks
- 778
- Avg merge
- 3h 37m
- Merged PRs (30d)
- 21
Description
### What You Are Seeing?
I have a VSTS build agent, which is triggering a cake build on GitHub commits.
I tried using the `TFBuild.IsRunningOnVSTS` to check if this was a build running on VSTS, as I am also using AppVeyor.
### What is Expected?
I would have expected `TFBuild.IsRunningOnVSTS` to return `true`. It returned `false`.
This seems to be per design as seen in the [`TFBuildProvider`](https://github.com/cake-build/cake/blob/d8f7fe179bdf41fa9d2dbc426a3bd6fbcef7dcfc/src/Cake.Common/Build/TFBuild/TFBuildProvider.cs#L45)
### What version of Cake are you using?
Latest
I discussed this briefly with @patriksvensson on Gitter and we kind of agreed that the `IsRunningOnVSTS` and `IsRunningOnTFS` properties could be a bit misleading.
@patriksvensson suggested a possible rename:
`IsRunningOnVSTS` -> `IsRunningOnSharedAgent`
`IsRunningOnTFS` -> `IsRunningOnOwnAgent`
To me this would be much more clear as VSTS can both run shared and own agents.
@agc93 you seem to be the original author of this feature, what do you think about this?
Contributor guide
Research direction
Start with src/Cake.Common/Build/TFBuild/TFBuildProvider.cs, the implementation named in the issue, and inspect how the two properties are exposed and referenced. Resolve the proposed distinction between shared and own agents, then update the affected API consistently and verify that the resulting names match the expected VSTS/TFS behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- build-system
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100