actions: [ISSUE]: Gittools Azure DevOps task 3.0.4 unable to retrieve gitversion output variables value or set version

Prerequisites

  • I have written a descriptive issue title
  • I have searched issues to ensure it has not already been reported

GitVersion package

AzureDevops task

What are you seeing?

Platform: Azure DevOps Task GitTools: 3.0.4 GitVersion: 5.12.0

Unable to output the value for GitVersion.SemVer, GitVersion.NugetVersion and etc in the next subsequent Azure Devops tasks.

This is working in GitTools 3.0.3 and below

What is expected?

The next subsequent Azure DevOps Task should be able to retrieve the GitVersion output values after running gitversion/setup & gitversion/execute tasks.

Steps to Reproduce

  1. Use Azure DevOps task gitversion/setup@3 or gitversion/setup@3.0.4, use input, version spec “5.x”

  2. Use Azure DevOps task gitversion/execute@3 or gitversion/execute@3.0.4

  3. Next, use bash task to output $(Gitversion.SemVer)and note the output.

Output log or link to your CI build (if appropriate).


About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Reactions: 21
  • Comments: 27 (10 by maintainers)

Commits related to this issue

Most upvoted comments

Could someone elaborate on the original change? In the PR it just says that “it’s duplicating the actions behavior”. What does that mean in practical terms? What is instead expected to happen?

And now as build pipelines are going “boom, boom, boom” all over the world, why hasn’t the “3.0.4” version been withdrawn while working on a fix? We’re all now implementing workarounds, whether its specifying “@3.0.3” in our YAML pipelines or selecting “2.*” in our classic pipelines (yeah, those still exist…).

please replace $(GitVersion.AssemblySemVer) with $(GitVersion_AssemblySemVer)

killing of v3.0.4 would allow to restore Azure DevOps service (and possibly others) in no time, is this something we can discuss to mitigate the issue @arturcic @davidkeaveny ?

Yeah, changing the output variable names broke my builds this morning as well - those variables are the entire reason I use the task, so changing how they’re accessed is always going to be a major breaking change. I updated my templates to use the _ and everything is working, but that was quite a bit of lost time for people this morning.

This issue is related to the change implemented in v3.0.4; there are some further comments there.

version v3.1.1 is out, please have a new try

OK, I will add back additional duplicated variables, with the dot syntax, but that will be removed in v4. The reason for removing is to be consistent with the GitVersion tool

Measure twice times before cutting once.

I don’t think this is a valuable remark, does not help with the motivation of any open source projects, especially for those that are not paid for. I would prefer to have the support on maintaining or at least testing the project and not this kind of remarks.

I haven’t retried a run yet, but have an other comment: If we have to start changing the way we reference these “$(GitVersion.xxx)” pipeline variables (from a dot to an underscore), then this is definitely not a minor issue any more. Then it’s still a breaking change, needing a major version bump of the tool version. Or am I missing something? Is there an updated readme that explains this change?

What’s the link between these tools, really? Are you @arturcic a maintainer of “dotnet-gitversion” as well?

Yes, but this repository has also support for GitReleaseManager which is part of our OSS organization, but I don’t actively maintain that tool. The reason v4 is not yet release is because there were several fixes that were related to this repo and not the GitVersion itself and they ended up in the v3 release. v4 drops support for GitVersion 5.12 as well as 6.0 as those versions use deprecated version of dotnet.

It’s still hard for me to come up with a proper versioning policy as there are several things I need to play with - GitVersion.Tool, GitReleaseManager.Tool version, as well as the nodejs version and AzureDevops agents version. That’s why I created that versions.md file where kind of a mapping between all these dependencies is created.

OK, I will add back additional duplicated variables, with the dot syntax, but that will be removed in v4. The reason for removing is to be consistent with the GitVersion tool

Measure twice times before cutting once.

I don’t think this is a valuable remark, does not help with the motivation of any open source projects, especially for those that are not paid for. I would prefer to have the support on maintaining or at least testing the project and not this kind of remarks.

You really have my support and support of many other people. You can bet, we are thankful for it. What I want to morally support you even more is, to carefully plan the design of breaking changes. I think it’s understandable how unpleasant it is to see thousands of pipelines breaking, because of a minor change.

I don’t exactly mind doing it differently - in a major version, that is - I just need to understand what benefit it yields, for myself or ultimately for the tool authors, for that matter. Some more elaborate explanation would still be appreciated.

Agree with that. will try to communicate better

Let’s all be friends. We all appreciate the effort @arturcic and others are putting into this and other open source projects, unpaid as it is. I think this time, we got caught “a bit” off guard, by what was only labelled as a patch release, even.

It’s not easy to maintain such super-important tools, as shown in this immortal comic: xkcd dependency

That said, what I personally saw as the most “annoying” with this change, if you like - still trying to be friends - is that I didn’t quite grasp the why. And I guess I still haven’t fully. Through some of the comments and the original PR, and the changes made in the last PR, I’ve sort of deduced that the tool should stop outputting those dot-based pipeline variables we’ve come to love throughout the years.

I don’t exactly mind doing it differently - in a major version, that is - I just need to understand what benefit it yields, for myself or ultimately for the tool authors, for that matter. Some more elaborate explanation would still be appreciated.

Thanks @arturcic . I did a quick search and did not find information about adopted versioning strategy, but if it is semver, then changing public contract falls and a major change, i.e. 3 -> 4. Since most people reference tasks as Task@N, introducing breaking change with new major version would not have caused this cascade of broken CIs.

It should not have been a breaking change, it’s a regression, and it should be a minor