File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed
Utils/azuretools-core/src/com/microsoft/azuretools/core/mvp/model/webapp Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -235,6 +235,7 @@ public WebApp createWebAppOnLinux(WebAppOnLinuxDeployModel model)
235235 */
236236 public WebApp updateWebAppOnLinux (String sid , String webAppId , ImageSetting imageSetting ) throws IOException {
237237 WebApp app = AzureWebAppMvpModel .getInstance ().getWebAppById (sid , webAppId );
238+ clearTags (app );
238239 if (imageSetting instanceof PrivateRegistryImageSetting ) {
239240 PrivateRegistryImageSetting pr = (PrivateRegistryImageSetting ) imageSetting ;
240241 app .update ().withPrivateRegistryImage (pr .getImageNameWithTag (), pr .getServerUrl ())
@@ -390,4 +391,15 @@ public void cleanWebAppsOnLinux() {
390391 private static final class SingletonHolder {
391392 private static final AzureWebAppMvpModel INSTANCE = new AzureWebAppMvpModel ();
392393 }
394+
395+ /**
396+ * Work Around:
397+ * When a web app is created from Azure Portal, there are hidden tags associated with the app.
398+ * It will be messed up when calling "update" API.
399+ * An issue is logged at https://github.com/Azure/azure-sdk-for-java/issues/1755 .
400+ * Remove all tags here to make it work.
401+ */
402+ private void clearTags (@ NotNull final WebApp app ) {
403+ app .inner ().withTags (null );
404+ }
393405}
You can’t perform that action at this time.
0 commit comments