Skip to content

Commit

Permalink
[Spring] update the app name used in build to app name and deployment…
Browse files Browse the repository at this point in the history
… name (Azure#4951)
  • Loading branch information
smile37773 authored Jun 8, 2022
1 parent f1d59a4 commit 33d6423
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/spring/azext_spring/_buildservices_factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def _get_upload_info(self):
except AttributeError as e:
raise AzureInternalError("Failed to get a SAS URL to upload context. Error: {}".format(e))

def _queue_build(self, relative_path=None, builder=None, build_env=None, build_cpu=None, build_memory=None, app=None, **_):
def _queue_build(self, relative_path=None, builder=None, build_env=None, build_cpu=None, build_memory=None, app=None, deployment=None, **_):
subscription = get_subscription_id(self.cmd.cli_ctx)
service_resource_id = '/subscriptions/{}/resourceGroups/{}/providers/Microsoft.AppPlatform/Spring/{}'.format(subscription, self.resource_group, self.service)
build_resource_requests = models.BuildResourceRequests(
Expand All @@ -75,7 +75,7 @@ def _queue_build(self, relative_path=None, builder=None, build_env=None, build_c
return self.client.build_service.create_or_update_build(self.resource_group,
self.service,
self.name,
app,
app + '-' + deployment,
build).properties.triggered_build_result.id
except (AttributeError, CloudError) as e:
raise DeploymentError("Failed to create or update a build. Error: {}".format(e.message))
Expand Down
2 changes: 1 addition & 1 deletion src/spring/azext_spring/tests/latest/test_asa_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ def verify_build_args(self, client, *args):
if build_args and build_args[0]:
self.assertEqual(1, len(build_args))
self.assertEqual(5, len(build_args[0][0]))
self.assertEqual(args[0:2]+('default',)+(args[2],), build_args[0][0][0:4])
self.assertEqual(args[0:2]+('default',)+(args[2]+'-default',), build_args[0][0][0:4])
self.put_build_resource = build_args[0][0][4]

def _execute(self, *args, **kwargs):
Expand Down

0 comments on commit 33d6423

Please sign in to comment.