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

[Do not merge] Mason/asc create and app insights create #4

Closed
wants to merge 29 commits into from
Closed
Changes from 1 commit
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
d988440
fix bug to block use disable_app_insights and enable_java_agent argum…
jiec-msft Mar 30, 2022
bebc6f5
move _warn_enable_java_agent to deprecation info for all tiers.
jiec-msft Mar 30, 2022
96c4894
fix validator order for app insights when create service instance.
jiec-msft Mar 31, 2022
149bb98
refactor app insights operations from buildpack_binding.py
jiec-msft Mar 31, 2022
2c2ddf9
refactor validator for spring cloud create, move to command level.
jiec-msft Mar 31, 2022
21a2c33
in validator, add fail fast for application insights create
jiec-msft Mar 31, 2022
9d3b55d
refactor application insights create library
jiec-msft Mar 31, 2022
f731f74
Fix service_name to name
jiec-msft Mar 31, 2022
329b739
remove fail fast create app insights
jiec-msft Mar 31, 2022
1aac7c5
refactor app insights lib
jiec-msft Mar 31, 2022
9ff21ac
1. put check on connection string by app insights name into validator…
jiec-msft Mar 31, 2022
d0abec4
rename _safe_get_connection to _safe_get_connection_string
jiec-msft Mar 31, 2022
dee4610
move validator from command level to argument level since command lev…
jiec-msft Mar 31, 2022
4c8beb4
fix bug to use correct validator for asc create
jiec-msft Apr 1, 2022
7de1271
fix bug to import get_portal_uri
jiec-msft Apr 1, 2022
91e31b0
fix bug for creation_failed_warn message
jiec-msft Apr 1, 2022
5f6aa30
fix bug for var appinsights
jiec-msft Apr 1, 2022
a0dfc94
remove app_insights parameter for enterprise case
jiec-msft Apr 1, 2022
2b6b24e
enhance test after change code
jiec-msft Apr 1, 2022
84a2c2e
add tmp version number
jiec-msft Apr 1, 2022
69e160a
Refactor method _get_connection_string_or_warn
jiec-msft May 3, 2022
4cadd6f
replace == True with is True
jiec-msft May 3, 2022
22543b6
add unit test for application insights validator
jiec-msft May 3, 2022
a8b2819
add unit test for application insights disable or enable
jiec-msft May 3, 2022
54f9d28
add scenario test for create enterprise service instance in region no…
jiec-msft May 3, 2022
aeeae01
cast to AzCLIError and add scenario test for create asc with not exis…
jiec-msft May 3, 2022
2169c51
create with application insights fake resource id
jiec-msft May 3, 2022
64c79b7
add test to create asc in region supports app insights for enterprise…
jiec-msft May 3, 2022
ac643e1
update version and history
jiec-msft May 4, 2022
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
Prev Previous commit
Next Next commit
fix bug for creation_failed_warn message
  • Loading branch information
jiec-msft committed May 3, 2022
commit 91e31b00560dcdeb70ba736efed316b1860d2966
8 changes: 4 additions & 4 deletions src/spring-cloud/azext_spring_cloud/buildpack_binding.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,6 @@ def _build_buildpack_binding_resource(binding_type, properties_dict, secrets_dic

def _get_buildpack_binding_properties(cmd, resource_group, service_name, location,
app_insights_key, app_insights, sampling_rate):
creation_failed_warn = 'Unable to create the Application Insights for the Azure Spring Cloud. ' \
'Please use the Azure Portal to manually create and configure the Application Insights, ' \
'if needed.'

sampling_rate = sampling_rate or 10
connection_string = _safe_get_connection_string(cmd, resource_group, service_name, location, app_insights_key)
if not connection_string:
Expand All @@ -97,6 +93,10 @@ def _get_buildpack_binding_properties(cmd, resource_group, service_name, locatio


def _safe_get_connection_string(cmd, resource_group, service_name, location, app_insights_key):
creation_failed_warn = 'Unable to create the Application Insights for the Azure Spring Cloud. ' \
'Please use the Azure Portal to manually create and configure the Application Insights, ' \
'if needed.'

connection_string = app_insights_key
if not connection_string:
try:
Expand Down