Skip to content

Commit 7dd07b0

Browse files
2 parents c249025 + d2e3902 commit 7dd07b0

6 files changed

Lines changed: 32 additions & 34 deletions

File tree

infra/main.bicep

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -373,7 +373,6 @@ module applicationInsights 'br/public:avm/res/insights/component:0.6.0' = if (en
373373
flowType: 'Bluefield'
374374
// WAF aligned configuration for Monitoring
375375
workspaceResourceId: enableMonitoring ? logAnalyticsWorkspaceResourceId : ''
376-
diagnosticSettings: enableMonitoring ? [{ workspaceResourceId: logAnalyticsWorkspaceResourceId }] : null
377376
}
378377
}
379378

infra/main.json

Lines changed: 17 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@
55
"metadata": {
66
"_generator": {
77
"name": "bicep",
8-
"version": "0.40.2.10011",
9-
"templateHash": "17476534152468179054"
8+
"version": "0.41.2.15936",
9+
"templateHash": "7834026170340721066"
1010
},
1111
"name": "Multi-Agent Custom Automation Engine",
12-
"description": "This module contains the resources required to deploy the [Multi-Agent Custom Automation Engine solution accelerator](https://github.com/microsoft/Multi-Agent-Custom-Automation-Engine-Solution-Accelerator) for both Sandbox environments and WAF aligned environments.\n\n> **Note:** This module is not intended for broad, generic use, as it was designed by the Commercial Solution Areas CTO team, as a Microsoft Solution Accelerator. Feature requests and bug fix requests are welcome if they support the needs of this organization but may not be incorporated if they aim to make this module more generic than what it needs to be for its primary use case. This module will likely be updated to leverage AVM resource modules in the future. This may result in breaking changes in upcoming versions when these features are implemented.\n"
12+
"description": "This module contains the resources required to deploy the [Multi-Agent Custom Automation Engine solution accelerator](https://github.com/microsoft/Multi-Agent-Custom-Automation-Engine-Solution-Accelerator) for both Sandbox environments and WAF aligned environments.\r\n\r\n> **Note:** This module is not intended for broad, generic use, as it was designed by the Commercial Solution Areas CTO team, as a Microsoft Solution Accelerator. Feature requests and bug fix requests are welcome if they support the needs of this organization but may not be incorporated if they aim to make this module more generic than what it needs to be for its primary use case. This module will likely be updated to leverage AVM resource modules in the future. This may result in breaking changes in upcoming versions when these features are implemented.\r\n"
1313
},
1414
"parameters": {
1515
"solutionName": {
@@ -3703,8 +3703,7 @@
37033703
"flowType": {
37043704
"value": "Bluefield"
37053705
},
3706-
"workspaceResourceId": "[if(parameters('enableMonitoring'), if(variables('useExistingLogAnalytics'), createObject('value', parameters('existingLogAnalyticsWorkspaceId')), createObject('value', reference('logAnalyticsWorkspace').outputs.resourceId.value)), createObject('value', ''))]",
3707-
"diagnosticSettings": "[if(parameters('enableMonitoring'), createObject('value', createArray(createObject('workspaceResourceId', if(variables('useExistingLogAnalytics'), parameters('existingLogAnalyticsWorkspaceId'), reference('logAnalyticsWorkspace').outputs.resourceId.value)))), createObject('value', null()))]"
3706+
"workspaceResourceId": "[if(parameters('enableMonitoring'), if(variables('useExistingLogAnalytics'), createObject('value', parameters('existingLogAnalyticsWorkspaceId')), createObject('value', reference('logAnalyticsWorkspace').outputs.resourceId.value)), createObject('value', ''))]"
37083707
},
37093708
"template": {
37103709
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
@@ -4921,8 +4920,8 @@
49214920
"metadata": {
49224921
"_generator": {
49234922
"name": "bicep",
4924-
"version": "0.40.2.10011",
4925-
"templateHash": "16969845928384020185"
4923+
"version": "0.41.2.15936",
4924+
"templateHash": "8667922205584012198"
49264925
}
49274926
},
49284927
"definitions": {
@@ -22453,8 +22452,8 @@
2245322452
"metadata": {
2245422453
"_generator": {
2245522454
"name": "bicep",
22456-
"version": "0.40.2.10011",
22457-
"templateHash": "8742987061721021759"
22455+
"version": "0.41.2.15936",
22456+
"templateHash": "8365054813170845685"
2245822457
}
2245922458
},
2246022459
"definitions": {
@@ -25440,8 +25439,8 @@
2544025439
}
2544125440
},
2544225441
"dependsOn": [
25443-
"[format('avmPrivateDnsZones[{0}]', variables('dnsZoneIndex').openAI)]",
2544425442
"[format('avmPrivateDnsZones[{0}]', variables('dnsZoneIndex').aiServices)]",
25443+
"[format('avmPrivateDnsZones[{0}]', variables('dnsZoneIndex').openAI)]",
2544525444
"[format('avmPrivateDnsZones[{0}]', variables('dnsZoneIndex').cognitiveServices)]",
2544625445
"logAnalyticsWorkspace",
2544725446
"userAssignedIdentity",
@@ -25481,8 +25480,8 @@
2548125480
"metadata": {
2548225481
"_generator": {
2548325482
"name": "bicep",
25484-
"version": "0.40.2.10011",
25485-
"templateHash": "7507285802464480889"
25483+
"version": "0.41.2.15936",
25484+
"templateHash": "5789718034225488560"
2548625485
}
2548725486
},
2548825487
"parameters": {
@@ -34461,8 +34460,8 @@
3446134460
"metadata": {
3446234461
"_generator": {
3446334462
"name": "bicep",
34464-
"version": "0.40.2.10011",
34465-
"templateHash": "8640881069237947782"
34463+
"version": "0.41.2.15936",
34464+
"templateHash": "14525082674956141939"
3446634465
}
3446734466
},
3446834467
"definitions": {
@@ -35474,8 +35473,8 @@
3547435473
"metadata": {
3547535474
"_generator": {
3547635475
"name": "bicep",
35477-
"version": "0.40.2.10011",
35478-
"templateHash": "10706743168754451638"
35476+
"version": "0.41.2.15936",
35477+
"templateHash": "1185169597469996118"
3547935478
},
3548035479
"name": "Site App Settings",
3548135480
"description": "This module deploys a Site App Setting."
@@ -44644,8 +44643,8 @@
4464444643
"metadata": {
4464544644
"_generator": {
4464644645
"name": "bicep",
44647-
"version": "0.40.2.10011",
44648-
"templateHash": "15348022841521786626"
44646+
"version": "0.41.2.15936",
44647+
"templateHash": "8488390916703184584"
4464944648
}
4465044649
},
4465144650
"parameters": {

infra/main_custom.bicep

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -372,7 +372,6 @@ module applicationInsights 'br/public:avm/res/insights/component:0.6.0' = if (en
372372
flowType: 'Bluefield'
373373
// WAF aligned configuration for Monitoring
374374
workspaceResourceId: enableMonitoring ? logAnalyticsWorkspaceResourceId : ''
375-
diagnosticSettings: enableMonitoring ? [{ workspaceResourceId: logAnalyticsWorkspaceResourceId }] : null
376375
}
377376
}
378377

src/tests/backend/test_app.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,7 @@
1313
import pytest
1414
import sys
1515
import os
16-
from unittest.mock import Mock, AsyncMock, patch, MagicMock
17-
from types import ModuleType
16+
from unittest.mock import Mock, AsyncMock, patch, NonCallableMock
1817

1918
# Environment variables are set by conftest.py, but ensure they're available
2019
os.environ.setdefault("APPLICATIONINSIGHTS_CONNECTION_STRING", "InstrumentationKey=test-key-12345")
@@ -36,7 +35,8 @@
3635
os.environ.setdefault("AZURE_OPENAI_RAI_DEPLOYMENT_NAME", "test-rai-deployment")
3736

3837
# Check if v4 has been mocked by another test file (prevents import errors)
39-
_v4_is_mocked = 'v4' in sys.modules and isinstance(sys.modules['v4'], (Mock, MagicMock))
38+
# Use NonCallableMock to catch all mock subclasses (Mock, MagicMock, etc.)
39+
_v4_is_mocked = 'v4' in sys.modules and isinstance(sys.modules['v4'], NonCallableMock)
4040
if _v4_is_mocked:
4141
# Skip this module - v4 has been mocked by another test file
4242
pytest.skip(

src/tests/backend/v4/orchestration/helper/test_plan_to_mplan_converter.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,14 @@
1111

1212
import unittest
1313
import sys
14-
from unittest.mock import Mock, MagicMock
14+
from unittest.mock import NonCallableMock
1515

1616
import pytest
1717

1818
# Check if v4 has been mocked by another test file (prevents import errors)
19-
_v4_is_mocked = 'v4' in sys.modules and isinstance(sys.modules['v4'], (Mock, MagicMock))
20-
_v4_models_is_mocked = 'v4.models' in sys.modules and isinstance(sys.modules['v4.models'], (Mock, MagicMock))
19+
# Use NonCallableMock to catch all mock subclasses (Mock, MagicMock, etc.)
20+
_v4_is_mocked = 'v4' in sys.modules and isinstance(sys.modules['v4'], NonCallableMock)
21+
_v4_models_is_mocked = 'v4.models' in sys.modules and isinstance(sys.modules['v4.models'], NonCallableMock)
2122
if _v4_is_mocked or _v4_models_is_mocked:
2223
pytest.skip(
2324
"Skipping test_plan_to_mplan_converter.py: v4 module has been mocked by another test file. "

src/tests/backend/v4/orchestration/test_orchestration_manager.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -917,30 +917,30 @@ def test_extract_response_text_object_with_text_attr(self):
917917
def test_extract_response_text_object_with_empty_text(self):
918918
"""Test extracting text from object with empty text attribute."""
919919
# Use spec to ensure only specified attributes exist
920-
obj = Mock(spec=['text'])
920+
obj = Mock(spec_set=['text'])
921921
obj.text = ""
922922
result = self.manager._extract_response_text(obj)
923923
self.assertEqual(result, "")
924924

925925
def test_extract_response_text_agent_executor_response_with_agent_response(self):
926926
"""Test extracting text from AgentExecutorResponse with agent_response.text."""
927-
agent_resp = Mock()
927+
agent_resp = Mock(spec_set=['text'])
928928
agent_resp.text = "Agent executor response"
929929

930-
executor_resp = Mock(spec=['agent_response'])
930+
executor_resp = Mock(spec_set=['agent_response'])
931931
executor_resp.agent_response = agent_resp
932932

933933
result = self.manager._extract_response_text(executor_resp)
934934
self.assertEqual(result, "Agent executor response")
935935

936936
def test_extract_response_text_agent_executor_response_fallback_to_conversation(self):
937937
"""Test extracting text from AgentExecutorResponse falling back to full_conversation."""
938-
agent_resp = Mock()
938+
agent_resp = Mock(spec_set=['text'])
939939
agent_resp.text = None
940940

941941
last_msg = MockChatMessage("Last conversation message")
942942

943-
executor_resp = Mock(spec=['agent_response', 'full_conversation'])
943+
executor_resp = Mock(spec_set=['agent_response', 'full_conversation'])
944944
executor_resp.agent_response = agent_resp
945945
executor_resp.full_conversation = [MockChatMessage("First"), last_msg]
946946

@@ -949,10 +949,10 @@ def test_extract_response_text_agent_executor_response_fallback_to_conversation(
949949

950950
def test_extract_response_text_agent_executor_response_empty_conversation(self):
951951
"""Test extracting text from AgentExecutorResponse with empty conversation."""
952-
agent_resp = Mock()
952+
agent_resp = Mock(spec_set=['text'])
953953
agent_resp.text = None
954954

955-
executor_resp = Mock(spec=['agent_response', 'full_conversation'])
955+
executor_resp = Mock(spec_set=['agent_response', 'full_conversation'])
956956
executor_resp.agent_response = agent_resp
957957
executor_resp.full_conversation = []
958958

@@ -1091,7 +1091,7 @@ async def test_workflow_output_with_object_with_text(self):
10911091
mock_workflow = Mock()
10921092

10931093
# Create object with text attribute
1094-
obj_with_text = Mock(spec=['text'])
1094+
obj_with_text = Mock(spec_set=['text'])
10951095
obj_with_text.text = "Object response"
10961096
output_event = MockWorkflowOutputEvent(obj_with_text)
10971097

0 commit comments

Comments
 (0)