Skip to content
Open
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
Expand Up @@ -237,19 +237,20 @@ class MultiWorkspaceDeployment extends SparkSessionWrapper {
private def startBronzeDeployment(workspace: Workspace, deploymentId: String): MultiWSDeploymentReport = {
val workspaceId = workspace.getConfig.organizationId
val args = JsonUtils.objToJson(workspace.getConfig.inputConfig)
println(s"""************Bronze Deployment Started workspaceID:$workspaceId\nargs:${args.prettyString}********** """)
val redactedArgs = args.replace("\"azureClientSecret\":\"[^\"]+\"".r, "\"azureClientSecret\":\"REDACTED\"")
println(s"""************Bronze Deployment Started workspaceID:$workspaceId\nargs:${redactedArgs.prettyString}********** """)
try {
Bronze(workspace).run()
println(s"""************Bronze Deployment Completed workspaceID:$workspaceId************ """)
MultiWSDeploymentReport(workspaceId, "Bronze", Some(args.compactString),
MultiWSDeploymentReport(workspaceId, "Bronze", Some(redactedArgs.compactString),
"SUCCESS",
Some(deploymentId)
)
} catch {
case exception: Exception =>
val fullMsg = PipelineFunctions.appendStackStrace(exception, "Got Exception while Deploying,")
logger.log(Level.ERROR, fullMsg)
MultiWSDeploymentReport(workspaceId, "Bronze", Some(args.compactString),
MultiWSDeploymentReport(workspaceId, "Bronze", Some(redactedArgs.compactString),
fullMsg,
Some(deploymentId)
)
Expand All @@ -261,20 +262,21 @@ class MultiWorkspaceDeployment extends SparkSessionWrapper {
private def startSilverDeployment(workspace: Workspace, deploymentId: String): MultiWSDeploymentReport = {
val workspaceId = workspace.getConfig.organizationId
val args = JsonUtils.objToJson(workspace.getConfig.inputConfig)
val redactedArgs = args.replace("\"azureClientSecret\":\"[^\"]+\"".r, "\"azureClientSecret\":\"REDACTED\"")
try {
println(s"""************Silver Deployment Started workspaceID:$workspaceId\nargs:${args.prettyString} ************""")
println(s"""************Silver Deployment Started workspaceID:$workspaceId\nargs:${redactedArgs.prettyString} ************""")

Silver(workspace).run()
println(s"""************Silver Deployment Completed workspaceID:$workspaceId************""")
MultiWSDeploymentReport(workspaceId, "Silver", Some(args.compactString),
MultiWSDeploymentReport(workspaceId, "Silver", Some(redactedArgs.compactString),
"SUCCESS",
Some(deploymentId)
)
} catch {
case exception: Exception =>
val fullMsg = PipelineFunctions.appendStackStrace(exception, "Got Exception while Deploying,")
logger.log(Level.ERROR, fullMsg)
MultiWSDeploymentReport(workspaceId, "Silver", Some(args.compactString),
MultiWSDeploymentReport(workspaceId, "Silver", Some(redactedArgs.compactString),
fullMsg,
Some(deploymentId)
)
Expand All @@ -286,20 +288,21 @@ class MultiWorkspaceDeployment extends SparkSessionWrapper {
private def startGoldDeployment(workspace: Workspace, deploymentId: String): MultiWSDeploymentReport = {
val workspaceId = workspace.getConfig.organizationId
val args = JsonUtils.objToJson(workspace.getConfig.inputConfig)
val redactedArgs = args.replace("\"azureClientSecret\":\"[^\"]+\"".r, "\"azureClientSecret\":\"REDACTED\"")
try {
println(s"""************Gold Deployment Started workspaceID:$workspaceId args:${args.prettyString} ************"""")
println(s"""************Gold Deployment Started workspaceID:$workspaceId\nargs:${redactedArgs.prettyString} ************"""")

Gold(workspace).run()
println(s"""************Gold Deployment Completed workspaceID:$workspaceId************""")
MultiWSDeploymentReport(workspaceId, "Gold", Some(args.compactString),
MultiWSDeploymentReport(workspaceId, "Gold", Some(redactedArgs.compactString),
"SUCCESS",
Some(deploymentId)
)
} catch {
case exception: Exception =>
val fullMsg = PipelineFunctions.appendStackStrace(exception, "Got Exception while Deploying,")
logger.log(Level.ERROR, fullMsg)
MultiWSDeploymentReport(workspaceId, "Gold", Some(args.compactString),
MultiWSDeploymentReport(workspaceId, "Gold", Some(redactedArgs.compactString),
fullMsg,
Some(deploymentId)
)
Expand Down Expand Up @@ -582,4 +585,4 @@ class MultiWorkspaceDeployment extends SparkSessionWrapper {



}
}