How to switch Versioned Setting format from Kotlin to XML
Hi,
We are using Teamcity Enterprise 2018.2.4 (build 61678). I had two questions:
1. Once versioned setting is enabled, Is there a way to switch format from kotlin to xml ? When I try to make changes to settings it disables the format selection dropdown menu.
2. The reason we want to switch from Kotlin to XML is because there seems to be a bug with the Koltin DSL format, where with Kotlin some of the configuration for the Build Step aren't being checked into git.
E.g we have a Build Step with runner type Rake of which the Launching Parameters for that rake runner never seem to make their way to git when using the Kotlin based DSL.
Example of the UI and the kotlin dsl it generated for this build step. 
Kotlin DSL generated:
| step { | |
| name = "rake spec" | |
| type = "rake-runner" | |
| param("ui.rakeRunner.rake.tasks.names", "%RAKE_TASK%") | |
| } | |
| ------------------ | |
Where as , if I compare the XML from my audit logs for the same change when I try to disable any of those checkboxes shown in the image above. E.g I waned to de-select Test::Unit checkbox. I can see the XML audit logs for the same have this.
On selection:
- <runner id="RUNNER_3" name="rake spec" type="rake-runner">
- <parameters>
- <param name="teamcity.step.mode" value="default" />
- <param name="ui.rakeRunner.bunlder.exec.enabled" value="true" />
- <param name="ui.rakeRunner.config.version" value="2" />
- <param name="ui.rakeRunner.frameworks.cucumber.enabled" value="true" />
- <param name="ui.rakeRunner.frameworks.rspec.enabled" value="true" />
- <param name="ui.rakeRunner.frameworks.testunit.enabled" value="true" />
- <param name="ui.rakeRunner.rake.tasks.names" value="%RAKE_TASK%" />
- <param name="ui.rakeRunner.ruby.use.mode" value="default" />
-
</parameters>
On de-selection a checkbox: - <runner id="RUNNER_3" name="rake spec" type="rake-runner">
- <parameters>
- <param name="teamcity.step.mode" value="default" />
- <param name="ui.rakeRunner.bunlder.exec.enabled" value="true" />
- <param name="ui.rakeRunner.config.version" value="2" />
- <param name="ui.rakeRunner.frameworks.cucumber.enabled" value="true" />
- <param name="ui.rakeRunner.frameworks.rspec.enabled" value="true" />
- <param name="ui.rakeRunner.rake.tasks.names" value="%RAKE_TASK%" />
- <param name="ui.rakeRunner.ruby.use.mode" value="default" />
- </parameters>
Which tells me that there is a bug because of which these runner parameters are never generated in the Kotlin dsl format.
NOTE: Also on a sep note, the parameter configuration is mis-spelled: "ui.rakeRunner.bunlder.exec.enabled"
Would be great if you could help us show a way to either solve this bug or switch from Kotlin dsl to xml that way we can version control using the xml files (assuming they generate all such params)
Thank you
Please sign in to leave a comment.
Hi,
thanks for your report. I've been trying to test it and I can see that you can try to modify many parameters in the Rake runner but they are not being transferred to the Kotlin DSL at all. I'd like to ask you to create an issue for it in our tracker: https://youtrack.jetbrains.com/issues/TW
Regarding changing from the Kotlin DSL to XML, it can be accomplished rather easily, but it's explicitly made a bit convoluted to make sure that it's not changed accidentally. Simply disable synchronization, apply changes, then enable it again. That will let you change the formats just fine.
Hi Denis, thanks for your help and responding back.Created the issue here: https://youtrack.jetbrains.com/issue/TW-61244
I'll keep following for updates.
For 2) I tried the disable/ enable thing , and it worked.
Thank you.