-
Notifications
You must be signed in to change notification settings - Fork 161
Conversation
src/services/namingService.ts
Outdated
if (suffix) { | ||
name += `-${suffix}`; | ||
} | ||
return name; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can't think of a great reason why, but would we want to .toLowerCase()
this, just to normalize? Also, guessing it's unsupported, but has anyone tried extended ascii or double-byte chars?
nvm.. i think this is answered in getSafeResourceName
below...
LGTM - thanks for centralizing this logic and updating across the board 👍 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
some nit suggestion
src/services/baseService.ts
Outdated
@@ -116,8 +123,8 @@ export abstract class BaseService { | |||
*/ | |||
protected getArtifactName(deploymentName: string): string { | |||
return `${deploymentName | |||
.replace("rg-deployment", "artifact") | |||
.replace("deployment", "artifact")}.zip`; | |||
.replace(`rg-${configConstants.naming.suffix.deployment}`, configConstants.naming.suffix.artifact) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: extract configConstants.naming.suffix.deployment
and configConstants.naming.suffix.artifact
into local variables
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
src/services/baseService.ts
Outdated
@@ -43,7 +44,7 @@ export abstract class BaseService { | |||
this.deploymentConfig = this.getDeploymentConfig(); | |||
this.deploymentName = this.getDeploymentName(); | |||
this.storageAccountName = StorageAccountResource.getResourceName( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can likely just keep this as 1 line now.
77804a1
to
17a026d
Compare
17a026d
to
92e8d0f
Compare
- [x] Add `AzureNamingService` - [x] Move naming utils to naming service - [x] Added `getSafeResourceName` - used by `storageAccount` and `deploymentName` Resolves [AB#597]
AzureNamingService
getSafeResourceName
- used bystorageAccount
anddeploymentName
Resolves [AB#597]