Build settings not loaded from VCS after applying backup

Hi there,

i'm currently writing a script to start a new TeamCity 2020.1 server instance via Docker (for Windows).
Before starting up the server inside the container, a "backup" gets applied via maintainDB. The "backup" contains the basic server configuration and our projects.

Our projects are configured via Kotlin DSL files in the source repositories. So in the "backup" mentioned above, the projects are configured to use a specified VCS root and versioned settings.

So the plan is, that the new server instance should work without further configuration. It should pull the latest changes from the VCS root and should start a build. This basically works as excepted. There is just a little problem with the "Versioned Settings":


After starting up a new server instance and starting the first build, the following warning is displayed in the build log:

15:14:31Finalize build settings
15:14:31 Retrieve settings, revision: 6b2a6979adba
15:14:31 Settings VCS root details
15:14:31 Load settings from VCS
15:15:46 Generate settings, format: kotlin
15:15:54 Load project model
15:15:54 Read build settings from revision 6b2a6979adba
15:15:54 Last changes in TeamCity settings were not committed to VCS, use current settings from TeamCity server

As far as is understand, the server uses the last build settings included in the backup. The Kotlin DSL file, included in the source repository, is not used.
However, there are no TeamCity settings, that could be commited to the VCS.

The "Current Status" section in Project settings > Versioned Settings says:

Cannot find previous revision of project: [ProjectName], skip updating settings to revision 6b2a6979adba. Please commit current project settings into VCS first.

After using the "Commit current project settings..." button, the status says:

TeamCity change in 'ProjectName' project: commit current project settings, collecting changed files...
Change 'TeamCity change in 'ProjectName' project: commit current project settings' wasn't committed, repository is up-to-date

No changes were commited to the VCS and all upcoming builds are working as expected (build settings included in the source repository are applied):

15:33:55Finalize build settings
15:33:55 Retrieve settings, revision: 6b2a6979adba
15:33:55 Load project model
15:33:55 Read build settings from revision 6b2a6979adba
15:33:55 Build settings from VCS were successfully loaded

Does anyone known how to avoid this (is this expected behaviour or a bug)?
Thanks!

Please sign in to leave a comment.