Skip to content

Azure Devops Error: Could not build the configuration instance because following exception occurred #3607

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

Closed
NetTecture opened this issue Jun 22, 2023 · 3 comments
Labels

Comments

@NetTecture
Copy link

Describe the bug
As above. Unless you are the developer of this software, this is an absolutely not helpful error message.

The rest of the line reads:
'Property 'tag' not found on type 'GitVersion.Configuration.BranchConfiguration'.' Please ensure that the /overrideconfig parameters are correct and the configuration file is in the correct format.

Expected Behavior

A sensible error message. As it stands now, I am not even told what the branch is. EVERY single branch I have defined in branches has a 'tag:' which means that this error is not helpfull at all. There is also no stack trace,

Actual Behavior

I work on getting gitversion going on some older codebase. Updated to the current 6.0 branch and - well - trying to get it working.

Possible Fix

Sensible error message with enough context.

Right now it tells me in the history on azure devops:

INFO [06/22/23 14:38:15:92] Begin: Normalizing git directory for branch 'refs/heads/rel/0.6-preview'
INFO [06/22/23 14:38:15:95] One remote found (origin -> 'https://[email protected]/nettecture/Sandbox/_git/GitVersion').
INFO [06/22/23 14:38:15:95] Skipping fetching, if GitVersion does not calculate your version as expected you might need to allow fetching or use dynamic repositories
INFO [06/22/23 14:38:15:96] Creating local branch rel/0.6-preview
INFO [06/22/23 14:38:15:99] Creating local branch from remote tracking 'refs/remotes/origin/develop'.
INFO [06/22/23 14:38:16:00] Creating local branch from remote tracking 'refs/remotes/origin/main'.
INFO [06/22/23 14:38:16:00] Creating local branch from remote tracking 'refs/remotes/origin/release/0.2'.
INFO [06/22/23 14:38:16:01] Creating local branch from remote tracking 'refs/remotes/origin/release/0.3-preview'.
INFO [06/22/23 14:38:16:01] Creating local branch from remote tracking 'refs/remotes/origin/release/0.4-preview'.
INFO [06/22/23 14:38:16:01] Creating local branch from remote tracking 'refs/remotes/origin/release/0.5-preview'.
INFO [06/22/23 14:38:16:02] HEAD points at branch 'refs/heads/rel/0.6-preview'.
INFO [06/22/23 14:38:16:02] End: Normalizing git directory for branch 'refs/heads/rel/0.6-preview' (Took: 99.11ms)
INFO [06/22/23 14:38:16:02] Begin: Loading version variables from disk cache
INFO [06/22/23 14:38:16:02] Cache file D:\a\1\Repository.git\gitversion_cache\ED28791E812F9B2565AB5F44CAD4BBA0B09B3CFA.yml not found.
INFO [06/22/23 14:38:16:02] End: Loading version variables from disk cache (Took: 0.54ms)
INFO [06/22/23 14:38:16:03] Using latest commit on specified branch
WARN [06/22/23 14:38:16:21] An error occurred:

That is nice, but it does not tell me what branch configuration it has tried to use. An error message should be helpful - telling the tag alone is not when every branch has that tag defined.

Steps to Reproduce

I have NO idea how to NOT reproduce it.

Installation runs with dotnet tool install GitVersion.Tool --tool-path D:\a_temp --version 6.0.0-beta.2

which is the current beta.

The following is my gitversion.yml:

next-version: 0.0.0
assembly-versioning-scheme: MajorMinorPatch
assembly-file-versioning-scheme: MajorMinorPatch
mode: ContinuousDelivery
tag-prefix: '[vV]'
continuous-delivery-fallback-tag: ci
major-version-bump-message: '+semver:\s?(breaking|major)'
minor-version-bump-message: '+semver:\s?(feature|minor)'
patch-version-bump-message: '+semver:\s?(fix|patch)'
no-bump-message: '+semver:\s?(none|skip)'
legacy-semver-padding: 4
build-metadata-padding: 4
commits-since-version-source-padding: 4
tag-pre-release-weight: 60000
commit-message-incrementing: Enabled
branches:
develop:
mode: ContinuousDeployment
tag: 'ci'
increment: None
prevent-increment-of-merged-branch-version: false
track-merge-target: true
regex: ^dev(elop)?(ment)?$
source-branches: []
tracks-release-branches: true
is-release-branch: false
is-mainline: false
pre-release-weight: 0
main:
tag: 'dev'
increment: Patch
prevent-increment-of-merged-branch-version: true
track-merge-target: true
regex: ^main$
source-branches:
- develop
- feature
tracks-release-branches: false
is-release-branch: false
is-mainline: true
pre-release-weight: 55000
release:
tag: useBranchName
increment: None
prevent-increment-of-merged-branch-version: true
track-merge-target: false
regex: ^rel(ease)?[/-]
source-branches:
- develop
- main
- support
- release
tracks-release-branches: false
is-release-branch: true
is-mainline: false
pre-release-weight: 30000
feature:
tag: useBranchName
increment: Inherit
prevent-increment-of-merged-branch-version: false
track-merge-target: false
regex: ^(ftr|features)?[/-]
source-branches:
- develop
- main
- release
- feature
- support
- hotfix
tracks-release-branches: false
is-release-branch: false
is-mainline: false
pre-release-weight: 30000
pull-request:
tag: 'pr'
increment: Inherit
prevent-increment-of-merged-branch-version: false
tag-number-pattern: '/-'
track-merge-target: false
regex: ^(req|pull-requests|pr)[/-]
source-branches:
- develop
- main
- release
- feature
- support
- hotfix
tracks-release-branches: false
is-release-branch: false
is-mainline: false
pre-release-weight: 30000
hotfix:
tag: 'fix'
increment: Patch
prevent-increment-of-merged-branch-version: false
track-merge-target: false
regex: ^fix|hotfix(es)?[/-]
source-branches:
- develop
- main
- support
tracks-release-branches: false
is-release-branch: false
is-mainline: false
pre-release-weight: 30000
support:
tag: 'bug'
increment: Patch
prevent-increment-of-merged-branch-version: true
track-merge-target: false
regex: ^bug[/-]
source-branches:
- main
tracks-release-branches: false
is-release-branch: false
is-mainline: true
pre-release-weight: 55000
ignore:
sha: []
commit-date-format: yyyy-MM-dd
merge-message-formats: {}
update-build-number: true

and when I make a build in for /rel/0.6-preview - here we go. As we do for all other pull requests I try out.

Context

Ah, not being able to use gitversion at all. I seem to be absolutely unable to work around it. At all. Means all builds fail.

Your Environment

Ah, not relevant. I literally use a git dump folder structure and it happens so early nothing happens anyway.

6.0 beta 2, OS no idea (windows latest azure build agent). Project is irrelevant ()not a real project anyway). As I said - I have no idea NOT to get this issue.

I expct this is a bad configuration file, but the error message really does not help debugging at all.

@NetTecture NetTecture added the bug label Jun 22, 2023
@arturcic
Copy link
Member

I see you are using the 6.0.0 beta 2 version, in that version there is included this change #3315

In the upcoming 6.0.0 beta 3 version we partially reverted the change in
#3481

In your case I'd recommend to check the first PR and adapt you GitVersion.yml file accordingly

@NetTecture
Copy link
Author

@arturcic Interesting - did not fix it, but that is likely an oversight from me. I definitely was not aware of that change somehow.

Has it been implemented inconstistent?

Could not build the configuration instance because following exception occurred: 'Property 'continuous-delivery-fallback-label' not found on type 'GitVersion.Configuration.GitVersionConfiguration'.' Please ensure that the /overrideconfig parameters are correct and the configuration file is in the correct format.

Is there a list of all the parameter names as they are currently? Because this one at least does not like the label change.

And yes, I also tried the old version:

Could not build the configuration instance because following exception occurred: 'Property 'continuous-delivery-fallback-tag' not found on type 'GitVersion.Configuration.GitVersionConfiguration'.' Please ensure that the /overrideconfig parameters are correct and the configuration file is in the correct format.

both not working.

@NetTecture
Copy link
Author

Ok, I think ih ave them. Went through repeated errors deleting all the padding stuff and some others that came up and now it works - not giving me anything sensible, but that is another story.

The error message still should be fixed - some CURRENT documentation link would be good.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants