Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------------------------------

from azure.cli.core.breaking_change import register_default_value_breaking_change

register_default_value_breaking_change(
'containerapp env create',
'--logs-destination',
'log-analytics',
'azure-monitor',
target_version=None,

@JaysonTaiMicrosoft JaysonTaiMicrosoft Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Michael Dai (@michaelkira) As the underlying breaking change is going to merged in the next release for ignite. Please set target_version='2.93.0'

Please refer to https://github.com/Azure/azure-cli/milestone/175 for more information

doc_link='https://github.com/Azure/azure-cli/pull/34228',
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------------------------------

import inspect
import runpy
import unittest
from unittest import mock

from azure.cli.core.breaking_change import upcoming_breaking_changes
from azure.cli.core.mock import DummyCli
from azure.cli.command_modules.containerapp.custom import create_managed_environment


class ContainerappBreakingChangeTest(unittest.TestCase):
def test_logs_destination_preannouncement(self):
with mock.patch.dict(upcoming_breaking_changes, clear=True):
runpy.run_module('azure.cli.command_modules.containerapp._breaking_change')
changes = upcoming_breaking_changes['containerapp env create']
self.assertEqual(len(changes), 1)
change = changes[0]
self.assertEqual(change.current_default, 'log-analytics')
self.assertEqual(change.new_default, 'azure-monitor')
self.assertIn('--logs-destination', change.message)
self.assertIn('in a future release', change.message)
self.assertIn('https://github.com/Azure/azure-cli/pull/34228', change.message)
self.assertTrue(change.to_tag(DummyCli()).always_display)

self.assertEqual(
inspect.signature(create_managed_environment).parameters['logs_destination'].default,
'log-analytics',
)
Loading