Teamcity Webui commits invalid change
I recently traced a compile error to teamcity committing an invalid change. I was surpised, and looked into it. The previous commit compiled. It looks like the kotlin patch doesn't fully match up with the generated xml, so the patch can't find the expected dependency.
The change was deleting a dependency.
Autogenerated patch file:
package patches.buildTypes
import jetbrains.buildServer.configs.kotlin.v2019_2.*
import jetbrains.buildServer.configs.kotlin.v2019_2.ui.*
/*
This patch script was generated by TeamCity on settings change in UI.
To apply the patch, change the buildType with id = 'aggregate_job'
accordingly, and delete the patch script.
*/
changeBuildType(RelativeId("aggregate_job")) {
dependencies {
remove(RelativeId("dependency1")) {
snapshot {
onDependencyCancel = FailureAction.CANCEL
}
}
}
}
Error:
[ERROR] Error while generating TeamCity configs:
[ERROR] UI changes error patches/buildTypes/aggregate_job.kts: Expected dependency is not found:
snapshot(buildTypeId = "dependency1") {
synchronizeRevisions = true
runOnSameAgent = false
reuseBuilds = SUCCESSFUL
onDependencyFailure = ADD_PROBLEM
onDependencyCancel = CANCEL
}
I commented out the patch change and found this in the generated xml:
...
<depend-on sourceBuildTypeId="dependency1">
<options>
<option name="run-build-if-dependency-failed" value="RUN_ADD_PROBLEM" />
<option name="run-build-if-dependency-failed-to-start" value="CANCEL" />
<option name="take-started-build-with-same-revisions" value="true" />
<option name="take-successful-builds-only" value="true" />
</options>
</depend-on>
...
It looks like `snapshot { onDependencyCancel = FailureAction.CANCEL }` doesn't correctly describe the dependency.
Is this a bug or, something on our end?
We are on TeamCity Enterprise 2022.04.2
Please sign in to leave a comment.