mirror of https://github.com/databricks/cli.git
Switch to using [ from < in text replacements
This commit is contained in:
parent
6153423c56
commit
c19b9ac901
|
@ -3,7 +3,7 @@
|
||||||
# See https://docs.databricks.com/dev-tools/bundles/index.html for documentation.
|
# See https://docs.databricks.com/dev-tools/bundles/index.html for documentation.
|
||||||
bundle:
|
bundle:
|
||||||
name: my_dbt_sql
|
name: my_dbt_sql
|
||||||
uuid: <UUID>
|
uuid: [UUID]
|
||||||
|
|
||||||
include:
|
include:
|
||||||
- resources/*.yml
|
- resources/*.yml
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
# See https://docs.databricks.com/dev-tools/bundles/index.html for documentation.
|
# See https://docs.databricks.com/dev-tools/bundles/index.html for documentation.
|
||||||
bundle:
|
bundle:
|
||||||
name: my_default_python
|
name: my_default_python
|
||||||
uuid: <UUID>
|
uuid: [UUID]
|
||||||
|
|
||||||
include:
|
include:
|
||||||
- resources/*.yml
|
- resources/*.yml
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
"rowLimit": 10000
|
"rowLimit": 10000
|
||||||
},
|
},
|
||||||
"inputWidgets": {},
|
"inputWidgets": {},
|
||||||
"nuid": "<UUID>",
|
"nuid": "[UUID]",
|
||||||
"showTitle": false,
|
"showTitle": false,
|
||||||
"title": ""
|
"title": ""
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
"application/vnd.databricks.v1+cell": {
|
"application/vnd.databricks.v1+cell": {
|
||||||
"cellMetadata": {},
|
"cellMetadata": {},
|
||||||
"inputWidgets": {},
|
"inputWidgets": {},
|
||||||
"nuid": "<UUID>",
|
"nuid": "[UUID]",
|
||||||
"showTitle": false,
|
"showTitle": false,
|
||||||
"title": ""
|
"title": ""
|
||||||
}
|
}
|
||||||
|
@ -24,7 +24,7 @@
|
||||||
"application/vnd.databricks.v1+cell": {
|
"application/vnd.databricks.v1+cell": {
|
||||||
"cellMetadata": {},
|
"cellMetadata": {},
|
||||||
"inputWidgets": {},
|
"inputWidgets": {},
|
||||||
"nuid": "<UUID>",
|
"nuid": "[UUID]",
|
||||||
"showTitle": false,
|
"showTitle": false,
|
||||||
"title": ""
|
"title": ""
|
||||||
}
|
}
|
||||||
|
@ -47,7 +47,7 @@
|
||||||
"application/vnd.databricks.v1+cell": {
|
"application/vnd.databricks.v1+cell": {
|
||||||
"cellMetadata": {},
|
"cellMetadata": {},
|
||||||
"inputWidgets": {},
|
"inputWidgets": {},
|
||||||
"nuid": "<UUID>",
|
"nuid": "[UUID]",
|
||||||
"showTitle": false,
|
"showTitle": false,
|
||||||
"title": ""
|
"title": ""
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
"application/vnd.databricks.v1+cell": {
|
"application/vnd.databricks.v1+cell": {
|
||||||
"cellMetadata": {},
|
"cellMetadata": {},
|
||||||
"inputWidgets": {},
|
"inputWidgets": {},
|
||||||
"nuid": "<UUID>",
|
"nuid": "[UUID]",
|
||||||
"showTitle": false,
|
"showTitle": false,
|
||||||
"title": ""
|
"title": ""
|
||||||
}
|
}
|
||||||
|
@ -37,7 +37,7 @@
|
||||||
"rowLimit": 10000
|
"rowLimit": 10000
|
||||||
},
|
},
|
||||||
"inputWidgets": {},
|
"inputWidgets": {},
|
||||||
"nuid": "<UUID>",
|
"nuid": "[UUID]",
|
||||||
"showTitle": false,
|
"showTitle": false,
|
||||||
"title": ""
|
"title": ""
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
# See https://docs.databricks.com/dev-tools/bundles/index.html for documentation.
|
# See https://docs.databricks.com/dev-tools/bundles/index.html for documentation.
|
||||||
bundle:
|
bundle:
|
||||||
name: my_default_sql
|
name: my_default_sql
|
||||||
uuid: <UUID>
|
uuid: [UUID]
|
||||||
|
|
||||||
include:
|
include:
|
||||||
- resources/*.yml
|
- resources/*.yml
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
"application/vnd.databricks.v1+cell": {
|
"application/vnd.databricks.v1+cell": {
|
||||||
"cellMetadata": {},
|
"cellMetadata": {},
|
||||||
"inputWidgets": {},
|
"inputWidgets": {},
|
||||||
"nuid": "<UUID>",
|
"nuid": "[UUID]",
|
||||||
"showTitle": false,
|
"showTitle": false,
|
||||||
"title": ""
|
"title": ""
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
# See https://docs.databricks.com/dev-tools/bundles/index.html for documentation.
|
# See https://docs.databricks.com/dev-tools/bundles/index.html for documentation.
|
||||||
bundle:
|
bundle:
|
||||||
name: my_jobs_as_code
|
name: my_jobs_as_code
|
||||||
uuid: <UUID>
|
uuid: [UUID]
|
||||||
|
|
||||||
experimental:
|
experimental:
|
||||||
python:
|
python:
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
"application/vnd.databricks.v1+cell": {
|
"application/vnd.databricks.v1+cell": {
|
||||||
"cellMetadata": {},
|
"cellMetadata": {},
|
||||||
"inputWidgets": {},
|
"inputWidgets": {},
|
||||||
"nuid": "<UUID>",
|
"nuid": "[UUID]",
|
||||||
"showTitle": false,
|
"showTitle": false,
|
||||||
"title": ""
|
"title": ""
|
||||||
}
|
}
|
||||||
|
@ -37,7 +37,7 @@
|
||||||
"rowLimit": 10000
|
"rowLimit": 10000
|
||||||
},
|
},
|
||||||
"inputWidgets": {},
|
"inputWidgets": {},
|
||||||
"nuid": "<UUID>",
|
"nuid": "[UUID]",
|
||||||
"showTitle": false,
|
"showTitle": false,
|
||||||
"title": ""
|
"title": ""
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
Building project_name_$UNIQUE_PRJ...
|
Building project_name_$UNIQUE_PRJ...
|
||||||
Uploading project_name_$UNIQUE_PRJ-0.0.1+<NUMID>.<NUMID>-py3-none-any.whl...
|
Uploading project_name_$UNIQUE_PRJ-0.0.1+[NUMID].[NUMID]-py3-none-any.whl...
|
||||||
Uploading bundle files to /Workspace/Users/$USERNAME/.bundle/project_name_$UNIQUE_PRJ/dev/files...
|
Uploading bundle files to /Workspace/Users/$USERNAME/.bundle/project_name_$UNIQUE_PRJ/dev/files...
|
||||||
Deploying resources...
|
Deploying resources...
|
||||||
Updating deployment state...
|
Updating deployment state...
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
"enabled": false
|
"enabled": false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"uuid": "<UUID>"
|
"uuid": "[UUID]"
|
||||||
},
|
},
|
||||||
"include": [
|
"include": [
|
||||||
"resources/project_name_$UNIQUE_PRJ.job.yml",
|
"resources/project_name_$UNIQUE_PRJ.job.yml",
|
||||||
|
@ -74,7 +74,7 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"format": "MULTI_TASK",
|
"format": "MULTI_TASK",
|
||||||
"id": "<NUMID>",
|
"id": "[NUMID]",
|
||||||
"job_clusters": [
|
"job_clusters": [
|
||||||
{
|
{
|
||||||
"job_cluster_key": "job_cluster",
|
"job_cluster_key": "job_cluster",
|
||||||
|
@ -141,7 +141,7 @@
|
||||||
"unit": "DAYS"
|
"unit": "DAYS"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"url": "$DATABRICKS_URL/jobs/<NUMID>?o=<NUMID>"
|
"url": "$DATABRICKS_URL/jobs/[NUMID]?o=[NUMID]"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"pipelines": {
|
"pipelines": {
|
||||||
|
@ -155,7 +155,7 @@
|
||||||
"metadata_file_path": "/Workspace/Users/$USERNAME/.bundle/project_name_$UNIQUE_PRJ/dev/state/metadata.json"
|
"metadata_file_path": "/Workspace/Users/$USERNAME/.bundle/project_name_$UNIQUE_PRJ/dev/state/metadata.json"
|
||||||
},
|
},
|
||||||
"development": true,
|
"development": true,
|
||||||
"id": "<UUID>",
|
"id": "[UUID]",
|
||||||
"libraries": [
|
"libraries": [
|
||||||
{
|
{
|
||||||
"notebook": {
|
"notebook": {
|
||||||
|
@ -165,7 +165,7 @@
|
||||||
],
|
],
|
||||||
"name": "[dev $USERNAME] project_name_$UNIQUE_PRJ_pipeline",
|
"name": "[dev $USERNAME] project_name_$UNIQUE_PRJ_pipeline",
|
||||||
"target": "project_name_$UNIQUE_PRJ_dev",
|
"target": "project_name_$UNIQUE_PRJ_dev",
|
||||||
"url": "$DATABRICKS_URL/pipelines/<UUID>?o=<NUMID>"
|
"url": "$DATABRICKS_URL/pipelines/[UUID]?o=[NUMID]"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -183,4 +183,4 @@
|
||||||
"dev": "$USERNAME"
|
"dev": "$USERNAME"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -183,12 +183,12 @@ func PrepareReplacementsUser(t testutil.TestingT, r *ReplacementsContext, u iam.
|
||||||
|
|
||||||
func PrepareReplacementsUUID(t testutil.TestingT, r *ReplacementsContext) {
|
func PrepareReplacementsUUID(t testutil.TestingT, r *ReplacementsContext) {
|
||||||
t.Helper()
|
t.Helper()
|
||||||
r.append(uuidRegex, "<UUID>")
|
r.append(uuidRegex, "[UUID]")
|
||||||
}
|
}
|
||||||
|
|
||||||
func PrepareReplacementsNumber(t testutil.TestingT, r *ReplacementsContext) {
|
func PrepareReplacementsNumber(t testutil.TestingT, r *ReplacementsContext) {
|
||||||
t.Helper()
|
t.Helper()
|
||||||
r.append(numIdRegex, "<NUMID>")
|
r.append(numIdRegex, "[NUMID]")
|
||||||
}
|
}
|
||||||
|
|
||||||
func PrepareReplacementsTemporaryDirectory(t testutil.TestingT, r *ReplacementsContext) {
|
func PrepareReplacementsTemporaryDirectory(t testutil.TestingT, r *ReplacementsContext) {
|
||||||
|
|
|
@ -25,7 +25,7 @@ func TestReplacement_UUID(t *testing.T) {
|
||||||
|
|
||||||
PrepareReplacementsUUID(t, &repls)
|
PrepareReplacementsUUID(t, &repls)
|
||||||
|
|
||||||
assert.Equal(t, "<UUID>", repls.Replace("123e4567-e89b-12d3-a456-426614174000"))
|
assert.Equal(t, "[UUID]", repls.Replace("123e4567-e89b-12d3-a456-426614174000"))
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestReplacement_Number(t *testing.T) {
|
func TestReplacement_Number(t *testing.T) {
|
||||||
|
@ -34,7 +34,7 @@ func TestReplacement_Number(t *testing.T) {
|
||||||
PrepareReplacementsNumber(t, &repls)
|
PrepareReplacementsNumber(t, &repls)
|
||||||
|
|
||||||
assert.Equal(t, "12", repls.Replace("12"))
|
assert.Equal(t, "12", repls.Replace("12"))
|
||||||
assert.Equal(t, "<NUMID>", repls.Replace("123"))
|
assert.Equal(t, "[NUMID]", repls.Replace("123"))
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestReplacement_TemporaryDirectory(t *testing.T) {
|
func TestReplacement_TemporaryDirectory(t *testing.T) {
|
||||||
|
|
Loading…
Reference in New Issue