Skip to content
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

imageId for managed image has capitalized resource group name #129

Open
matt-richardson opened this issue Apr 2, 2021 · 1 comment
Open

Comments

@matt-richardson
Copy link
Contributor

Description

I'm trying to automate the update of cloud images, using the code here.

I've found that when I set the imageId to the url of the azure resource (eg /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/TeamCity-Build-Agents/providers/Microsoft.Compute/images/teamcity-agent-windows-1909-with-docker-v0.0.31), the UI gets confused.

Looking into it, the values in that dropdown have a capitalized group name - TEAMCITY-BUILD-AGENTS instead of TeamCity-Build-Agents.

<select name="imageId" class="longField ignoreModified" data-bind="options: sourceImages, optionsText: 'text', optionsValue: 'id', optionsCaption: '<Select>', value: image().imageId">
<option value="">&lt;Select&gt;</option>
...
<option value="/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/TEAMCITY-BUILD-AGENTS/providers/Microsoft.Compute/images/teamcity-agent-windows-1909-with-docker-v0.0.30">teamcity-agent-windows-1909-with-docker-v0.0.30</option>
<option value="/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/TEAMCITY-BUILD-AGENTS/providers/Microsoft.Compute/images/teamcity-agent-windows-1909-with-docker-v0.0.31">teamcity-agent-windows-1909-with-docker-v0.0.31</option>
</select>

Ideally, these shouldn't be capitalised - they should be the exact resource id as used by azure.

Environment

  • TeamCity version: 2020.2.3 (build 86002)
  • Azure plugin version: 0.9.5 (which is weird, as the latest one on this repo is 0.8.0)

Diagnostic logs

I dont think these are necessary - let me know if you want them.

To investigate the problems it worth look at the teamcity-agent.log agent log file and teamcity-clouds.log server log file. You could file an issue in the TeamCity tracker and privately attach these file for investigation by TeamCity team.

matt-richardson added a commit to OctopusDeploy/TeamCityCloudAgentUpdater that referenced this issue Apr 2, 2021
@BenedekFarkas
Copy link

I don't know what's going on there, but I also found that manually created VMs (that are spun up from snapshots I prepared to run TC agents) also capitalize their resource group names, but not always. So it could be independent from TeamCity stuff.

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

No branches or pull requests

2 participants