Skip to content

Commit ddbf610

Browse files
authored
acc: add Distinct option to [[Repls]] (#3676)
## Changes New Distinct option to [[Repls]]. Allows distinguishing different values of numeric ID instead of blending them all into single replacement. https://chatgpt.com/s/cd_68da505c977c8191b80e26a298d3658e ## Why Replacements like NUMID and UNIX_TIME_NANOS lump different numbers and timestamps together but it's sometimes important to distinguish those (e.g. track id change or timestamp change). For example, in this test https://github.com/databricks/cli/pull/3636/files#diff-d3f08b9d7e364b3acdac435ed772aaf58a092e853b671a8e6de1ef4790e0a4f4R81 it would be useful to see that only one library shows up in changes because the other one has the same timestamp. ## Tests New selftest.
1 parent bff4fad commit ddbf610

File tree

19 files changed

+133
-70
lines changed

19 files changed

+133
-70
lines changed

acceptance/bundle/artifacts/artifact_path_with_volume/volume_doesnot_exist/output.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"browse_only": false,
77
"catalog_name": "main",
88
"catalog_type": "MANAGED_CATALOG",
9-
"created_at": [UNIX_TIME_MILLIS],
9+
"created_at": [UNIX_TIME_MILLIS][0],
1010
"created_by": "[USERNAME]",
1111
"effective_predictive_optimization_flag": {
1212
"inherited_from_type": "METASTORE",
@@ -18,7 +18,7 @@
1818
"name": "schema-[UNIQUE_NAME]",
1919
"owner": "[USERNAME]",
2020
"schema_id": "[UUID]",
21-
"updated_at": [UNIX_TIME_MILLIS],
21+
"updated_at": [UNIX_TIME_MILLIS][0],
2222
"updated_by": "[USERNAME]"
2323
}
2424

acceptance/bundle/artifacts/artifact_path_with_volume/volume_not_deployed/output.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"browse_only": false,
77
"catalog_name": "main",
88
"catalog_type": "MANAGED_CATALOG",
9-
"created_at": [UNIX_TIME_MILLIS],
9+
"created_at": [UNIX_TIME_MILLIS][0],
1010
"created_by": "[USERNAME]",
1111
"effective_predictive_optimization_flag": {
1212
"inherited_from_type": "METASTORE",
@@ -18,7 +18,7 @@
1818
"name": "schema-[UNIQUE_NAME]",
1919
"owner": "[USERNAME]",
2020
"schema_id": "[UUID]",
21-
"updated_at": [UNIX_TIME_MILLIS],
21+
"updated_at": [UNIX_TIME_MILLIS][0],
2222
"updated_by": "[USERNAME]"
2323
}
2424

acceptance/bundle/artifacts/whl_dynamic/output.txt

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -26,29 +26,29 @@
2626

2727
>>> [CLI] bundle deploy
2828
Building my_test_code...
29-
Uploading .databricks/bundle/default/patched_wheels/my_prebuilt_whl_other_test_code/other_test_code-0.0.1+[UNIX_TIME_NANOS]-py3-none-any.whl...
30-
Uploading .databricks/bundle/default/patched_wheels/my_test_code_my_test_code/my_test_code-0.0.1+[UNIX_TIME_NANOS]-py3-none-any.whl...
29+
Uploading .databricks/bundle/default/patched_wheels/my_prebuilt_whl_other_test_code/other_test_code-0.0.1+[UNIX_TIME_NANOS][0]-py3-none-any.whl...
30+
Uploading .databricks/bundle/default/patched_wheels/my_test_code_my_test_code/my_test_code-0.0.1+[UNIX_TIME_NANOS][1]-py3-none-any.whl...
3131
Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/test-bundle/default/files...
3232
Deploying resources...
3333
Updating deployment state...
3434
Deployment complete!
3535

3636
=== There are 2 original wheels and 2 patched ones
3737
>>> find.py --expect 4 whl
38-
.databricks/bundle/default/patched_wheels/my_prebuilt_whl_other_test_code/other_test_code-0.0.1+[UNIX_TIME_NANOS]-py3-none-any.whl
39-
.databricks/bundle/default/patched_wheels/my_test_code_my_test_code/my_test_code-0.0.1+[UNIX_TIME_NANOS]-py3-none-any.whl
38+
.databricks/bundle/default/patched_wheels/my_prebuilt_whl_other_test_code/other_test_code-0.0.1+[UNIX_TIME_NANOS][0]-py3-none-any.whl
39+
.databricks/bundle/default/patched_wheels/my_test_code_my_test_code/my_test_code-0.0.1+[UNIX_TIME_NANOS][1]-py3-none-any.whl
4040
my_test_code/dist/my_test_code-0.0.1-py3-none-any.whl
4141
prebuilt/other_test_code-0.0.1-py3-none-any.whl
4242

4343
=== Verify contents of the zip file
4444
>>> find.py --expect 1 .databricks/.*my_test_code.*whl
4545
src/__init__.py
4646
src/__main__.py
47-
my_test_code-0.0.1+[UNIX_TIME_NANOS].dist-info/METADATA
48-
my_test_code-0.0.1+[UNIX_TIME_NANOS].dist-info/WHEEL
49-
my_test_code-0.0.1+[UNIX_TIME_NANOS].dist-info/entry_points.txt
50-
my_test_code-0.0.1+[UNIX_TIME_NANOS].dist-info/top_level.txt
51-
my_test_code-0.0.1+[UNIX_TIME_NANOS].dist-info/RECORD
47+
my_test_code-0.0.1+[UNIX_TIME_NANOS][1].dist-info/METADATA
48+
my_test_code-0.0.1+[UNIX_TIME_NANOS][1].dist-info/WHEEL
49+
my_test_code-0.0.1+[UNIX_TIME_NANOS][1].dist-info/entry_points.txt
50+
my_test_code-0.0.1+[UNIX_TIME_NANOS][1].dist-info/top_level.txt
51+
my_test_code-0.0.1+[UNIX_TIME_NANOS][1].dist-info/RECORD
5252

5353
=== Expecting 2 patched wheels in libraries section in /jobs/create
5454
>>> jq -s .[] | select(.path=="/api/2.2/jobs/create") | .body.tasks out.requests.txt
@@ -69,7 +69,7 @@ my_test_code-0.0.1+[UNIX_TIME_NANOS].dist-info/RECORD
6969
"existing_cluster_id": "0717-132531-5opeqon1",
7070
"libraries": [
7171
{
72-
"whl": "/Workspace/Users/[USERNAME]/.bundle/test-bundle/default/artifacts/.internal/my_test_code-0.0.1+[UNIX_TIME_NANOS]-py3-none-any.whl"
72+
"whl": "/Workspace/Users/[USERNAME]/.bundle/test-bundle/default/artifacts/.internal/my_test_code-0.0.1+[UNIX_TIME_NANOS][1]-py3-none-any.whl"
7373
}
7474
],
7575
"python_wheel_task": {
@@ -81,10 +81,10 @@ my_test_code-0.0.1+[UNIX_TIME_NANOS].dist-info/RECORD
8181
},
8282
"libraries": [
8383
{
84-
"whl": "/Workspace/Users/[USERNAME]/.bundle/test-bundle/default/artifacts/.internal/my_test_code-0.0.1+[UNIX_TIME_NANOS]-py3-none-any.whl"
84+
"whl": "/Workspace/Users/[USERNAME]/.bundle/test-bundle/default/artifacts/.internal/my_test_code-0.0.1+[UNIX_TIME_NANOS][1]-py3-none-any.whl"
8585
},
8686
{
87-
"whl": "/Workspace/Users/[USERNAME]/.bundle/test-bundle/default/artifacts/.internal/other_test_code-0.0.1+[UNIX_TIME_NANOS]-py3-none-any.whl"
87+
"whl": "/Workspace/Users/[USERNAME]/.bundle/test-bundle/default/artifacts/.internal/other_test_code-0.0.1+[UNIX_TIME_NANOS][0]-py3-none-any.whl"
8888
}
8989
],
9090
"python_wheel_task": {
@@ -97,16 +97,16 @@ my_test_code-0.0.1+[UNIX_TIME_NANOS].dist-info/RECORD
9797

9898
=== Expecting 2 patched wheels to be uploaded
9999
>>> jq .path
100-
"/api/2.0/workspace-files/import-file/Workspace/Users/[USERNAME]/.bundle/test-bundle/default/artifacts/.internal/my_test_code-0.0.1+[UNIX_TIME_NANOS]-py3-none-any.whl"
101-
"/api/2.0/workspace-files/import-file/Workspace/Users/[USERNAME]/.bundle/test-bundle/default/artifacts/.internal/other_test_code-0.0.1+[UNIX_TIME_NANOS]-py3-none-any.whl"
100+
"/api/2.0/workspace-files/import-file/Workspace/Users/[USERNAME]/.bundle/test-bundle/default/artifacts/.internal/my_test_code-0.0.1+[UNIX_TIME_NANOS][1]-py3-none-any.whl"
101+
"/api/2.0/workspace-files/import-file/Workspace/Users/[USERNAME]/.bundle/test-bundle/default/artifacts/.internal/other_test_code-0.0.1+[UNIX_TIME_NANOS][0]-py3-none-any.whl"
102102
"/api/2.0/workspace-files/import-file/Workspace/Users/[USERNAME]/.bundle/test-bundle/default/files/my_test_code/dist/my_test_code-0.0.1-py3-none-any.whl"
103103
"/api/2.0/workspace-files/import-file/Workspace/Users/[USERNAME]/.bundle/test-bundle/default/files/prebuilt/other_test_code-0.0.1-py3-none-any.whl"
104104

105105
=== Updating the local wheel and deploying again
106106
>>> [CLI] bundle deploy
107107
Building my_test_code...
108-
Uploading .databricks/bundle/default/patched_wheels/my_prebuilt_whl_other_test_code/other_test_code-0.0.1+[UNIX_TIME_NANOS]-py3-none-any.whl...
109-
Uploading .databricks/bundle/default/patched_wheels/my_test_code_my_test_code/my_test_code-0.0.1+[UNIX_TIME_NANOS]-py3-none-any.whl...
108+
Uploading .databricks/bundle/default/patched_wheels/my_prebuilt_whl_other_test_code/other_test_code-0.0.1+[UNIX_TIME_NANOS][0]-py3-none-any.whl...
109+
Uploading .databricks/bundle/default/patched_wheels/my_test_code_my_test_code/my_test_code-0.0.1+[UNIX_TIME_NANOS][2]-py3-none-any.whl...
110110
Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/test-bundle/default/files...
111111
Deploying resources...
112112
Updating deployment state...
@@ -117,11 +117,11 @@ Deployment complete!
117117
src/__init__.py
118118
src/__main__.py
119119
src/new_module.py
120-
my_test_code-0.0.1+[UNIX_TIME_NANOS].dist-info/METADATA
121-
my_test_code-0.0.1+[UNIX_TIME_NANOS].dist-info/WHEEL
122-
my_test_code-0.0.1+[UNIX_TIME_NANOS].dist-info/entry_points.txt
123-
my_test_code-0.0.1+[UNIX_TIME_NANOS].dist-info/top_level.txt
124-
my_test_code-0.0.1+[UNIX_TIME_NANOS].dist-info/RECORD
120+
my_test_code-0.0.1+[UNIX_TIME_NANOS][2].dist-info/METADATA
121+
my_test_code-0.0.1+[UNIX_TIME_NANOS][2].dist-info/WHEEL
122+
my_test_code-0.0.1+[UNIX_TIME_NANOS][2].dist-info/entry_points.txt
123+
my_test_code-0.0.1+[UNIX_TIME_NANOS][2].dist-info/top_level.txt
124+
my_test_code-0.0.1+[UNIX_TIME_NANOS][2].dist-info/RECORD
125125

126126
=== Expecting 2 patched wheels in libraries section in /jobs/reset
127127
>>> jq -s .[] | select(.path=="/api/2.2/jobs/reset") | .body.new_settings.tasks out.requests.txt
@@ -142,7 +142,7 @@ my_test_code-0.0.1+[UNIX_TIME_NANOS].dist-info/RECORD
142142
"existing_cluster_id": "0717-132531-5opeqon1",
143143
"libraries": [
144144
{
145-
"whl": "/Workspace/Users/[USERNAME]/.bundle/test-bundle/default/artifacts/.internal/my_test_code-0.0.1+[UNIX_TIME_NANOS]-py3-none-any.whl"
145+
"whl": "/Workspace/Users/[USERNAME]/.bundle/test-bundle/default/artifacts/.internal/my_test_code-0.0.1+[UNIX_TIME_NANOS][2]-py3-none-any.whl"
146146
}
147147
],
148148
"python_wheel_task": {
@@ -154,10 +154,10 @@ my_test_code-0.0.1+[UNIX_TIME_NANOS].dist-info/RECORD
154154
},
155155
"libraries": [
156156
{
157-
"whl": "/Workspace/Users/[USERNAME]/.bundle/test-bundle/default/artifacts/.internal/my_test_code-0.0.1+[UNIX_TIME_NANOS]-py3-none-any.whl"
157+
"whl": "/Workspace/Users/[USERNAME]/.bundle/test-bundle/default/artifacts/.internal/my_test_code-0.0.1+[UNIX_TIME_NANOS][2]-py3-none-any.whl"
158158
},
159159
{
160-
"whl": "/Workspace/Users/[USERNAME]/.bundle/test-bundle/default/artifacts/.internal/other_test_code-0.0.1+[UNIX_TIME_NANOS]-py3-none-any.whl"
160+
"whl": "/Workspace/Users/[USERNAME]/.bundle/test-bundle/default/artifacts/.internal/other_test_code-0.0.1+[UNIX_TIME_NANOS][0]-py3-none-any.whl"
161161
}
162162
],
163163
"python_wheel_task": {
@@ -170,6 +170,6 @@ my_test_code-0.0.1+[UNIX_TIME_NANOS].dist-info/RECORD
170170

171171
=== Expecting 2 pached wheels to be uploaded (Bad: it is currently uploaded twice)
172172
>>> jq .path
173-
"/api/2.0/workspace-files/import-file/Workspace/Users/[USERNAME]/.bundle/test-bundle/default/artifacts/.internal/my_test_code-0.0.1+[UNIX_TIME_NANOS]-py3-none-any.whl"
174-
"/api/2.0/workspace-files/import-file/Workspace/Users/[USERNAME]/.bundle/test-bundle/default/artifacts/.internal/other_test_code-0.0.1+[UNIX_TIME_NANOS]-py3-none-any.whl"
173+
"/api/2.0/workspace-files/import-file/Workspace/Users/[USERNAME]/.bundle/test-bundle/default/artifacts/.internal/my_test_code-0.0.1+[UNIX_TIME_NANOS][2]-py3-none-any.whl"
174+
"/api/2.0/workspace-files/import-file/Workspace/Users/[USERNAME]/.bundle/test-bundle/default/artifacts/.internal/other_test_code-0.0.1+[UNIX_TIME_NANOS][0]-py3-none-any.whl"
175175
"/api/2.0/workspace-files/import-file/Workspace/Users/[USERNAME]/.bundle/test-bundle/default/files/my_test_code/dist/my_test_code-0.0.1-py3-none-any.whl"

acceptance/bundle/artifacts/whl_prebuilt_outside_dynamic/output.txt

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11

22
>>> errcode [CLI] bundle deploy
3-
Uploading this_dab/.databricks/bundle/default/patched_wheels/art1_my_test_code/my_test_code-0.0.1+[UNIX_TIME_NANOS]-py3-none-any.whl...
4-
Uploading this_dab/.databricks/bundle/default/patched_wheels/art2_other_test_code/other_test_code-0.0.1+[UNIX_TIME_NANOS]-py3-none-any.whl...
3+
Uploading this_dab/.databricks/bundle/default/patched_wheels/art1_my_test_code/my_test_code-0.0.1+[UNIX_TIME_NANOS][0]-py3-none-any.whl...
4+
Uploading this_dab/.databricks/bundle/default/patched_wheels/art2_other_test_code/other_test_code-0.0.1+[UNIX_TIME_NANOS][1]-py3-none-any.whl...
55
Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/python-wheel/default/files...
66
Deploying resources...
77
Updating deployment state...
88
Deployment complete!
99

1010
=== Expecting to find two patched wheels in current directory
1111
>>> find.py --expect 2 whl
12-
.databricks/bundle/default/patched_wheels/art1_my_test_code/my_test_code-0.0.1+[UNIX_TIME_NANOS]-py3-none-any.whl
13-
.databricks/bundle/default/patched_wheels/art2_other_test_code/other_test_code-0.0.1+[UNIX_TIME_NANOS]-py3-none-any.whl
12+
.databricks/bundle/default/patched_wheels/art1_my_test_code/my_test_code-0.0.1+[UNIX_TIME_NANOS][0]-py3-none-any.whl
13+
.databricks/bundle/default/patched_wheels/art2_other_test_code/other_test_code-0.0.1+[UNIX_TIME_NANOS][1]-py3-none-any.whl
1414

1515
=== Expecting 2 wheels in libraries section in /jobs/create
1616
>>> jq -s .[] | select(.path=="/api/2.2/jobs/create") | .body.tasks out.requests.txt
@@ -27,10 +27,10 @@ Deployment complete!
2727
"existing_cluster_id": "0717-132531-5opeqon1",
2828
"libraries": [
2929
{
30-
"whl": "/Workspace/Users/[USERNAME]/.bundle/python-wheel/default/artifacts/.internal/my_test_code-0.0.1+[UNIX_TIME_NANOS]-py3-none-any.whl"
30+
"whl": "/Workspace/Users/[USERNAME]/.bundle/python-wheel/default/artifacts/.internal/my_test_code-0.0.1+[UNIX_TIME_NANOS][0]-py3-none-any.whl"
3131
},
3232
{
33-
"whl": "/Workspace/Users/[USERNAME]/.bundle/python-wheel/default/artifacts/.internal/other_test_code-0.0.1+[UNIX_TIME_NANOS]-py3-none-any.whl"
33+
"whl": "/Workspace/Users/[USERNAME]/.bundle/python-wheel/default/artifacts/.internal/other_test_code-0.0.1+[UNIX_TIME_NANOS][1]-py3-none-any.whl"
3434
}
3535
],
3636
"python_wheel_task": {
@@ -48,14 +48,14 @@ Deployment complete!
4848
"spec": {
4949
"client": "1",
5050
"dependencies": [
51-
"/Workspace/Users/[USERNAME]/.bundle/python-wheel/default/artifacts/.internal/my_test_code-0.0.1+[UNIX_TIME_NANOS]-py3-none-any.whl",
52-
"/Workspace/Users/[USERNAME]/.bundle/python-wheel/default/artifacts/.internal/other_test_code-0.0.1+[UNIX_TIME_NANOS]-py3-none-any.whl"
51+
"/Workspace/Users/[USERNAME]/.bundle/python-wheel/default/artifacts/.internal/my_test_code-0.0.1+[UNIX_TIME_NANOS][0]-py3-none-any.whl",
52+
"/Workspace/Users/[USERNAME]/.bundle/python-wheel/default/artifacts/.internal/other_test_code-0.0.1+[UNIX_TIME_NANOS][1]-py3-none-any.whl"
5353
]
5454
}
5555
}
5656
]
5757

5858
=== Expecting 2 wheels to be uploaded
5959
>>> jq .path
60-
"/api/2.0/workspace-files/import-file/Workspace/Users/[USERNAME]/.bundle/python-wheel/default/artifacts/.internal/my_test_code-0.0.1+[UNIX_TIME_NANOS]-py3-none-any.whl"
61-
"/api/2.0/workspace-files/import-file/Workspace/Users/[USERNAME]/.bundle/python-wheel/default/artifacts/.internal/other_test_code-0.0.1+[UNIX_TIME_NANOS]-py3-none-any.whl"
60+
"/api/2.0/workspace-files/import-file/Workspace/Users/[USERNAME]/.bundle/python-wheel/default/artifacts/.internal/my_test_code-0.0.1+[UNIX_TIME_NANOS][0]-py3-none-any.whl"
61+
"/api/2.0/workspace-files/import-file/Workspace/Users/[USERNAME]/.bundle/python-wheel/default/artifacts/.internal/other_test_code-0.0.1+[UNIX_TIME_NANOS][1]-py3-none-any.whl"

acceptance/bundle/artifacts/whl_prebuilt_outside_dynamic/script

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
cd this_dab
22

3+
touch ../other_dab/dist/lib/other_test_code-0.0.1-py3-none-any.whl # ensure timestamp is different
4+
35
trace errcode $CLI bundle deploy
46

57
title "Expecting to find two patched wheels in current directory"

acceptance/bundle/integration_whl/interactive_cluster_dynamic_version/output.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
>>> [CLI] bundle deploy
33
Building python_artifact...
4-
Uploading .databricks/bundle/default/patched_wheels/python_artifact_my_test_code/my_test_code-0.0.1+[UNIX_TIME_NANOS]-py3-none-any.whl...
4+
Uploading .databricks/bundle/default/patched_wheels/python_artifact_my_test_code/my_test_code-0.0.1+[UNIX_TIME_NANOS][0]-py3-none-any.whl...
55
Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/[UNIQUE_NAME]/files...
66
Deploying resources...
77
Updating deployment state...
@@ -19,7 +19,7 @@ Got arguments:
1919
=== Make a change to code without version change and run the job again
2020
>>> [CLI] bundle deploy
2121
Building python_artifact...
22-
Uploading .databricks/bundle/default/patched_wheels/python_artifact_my_test_code/my_test_code-0.0.1+[UNIX_TIME_NANOS]-py3-none-any.whl...
22+
Uploading .databricks/bundle/default/patched_wheels/python_artifact_my_test_code/my_test_code-0.0.1+[UNIX_TIME_NANOS][1]-py3-none-any.whl...
2323
Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/[UNIQUE_NAME]/files...
2424
Deploying resources...
2525
Updating deployment state...

acceptance/bundle/integration_whl/serverless_dynamic_version/output.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
>>> [CLI] bundle deploy
55
Building my_test_code...
6-
Uploading .databricks/bundle/default/patched_wheels/my_test_code_my_test_code/my_test_code-0.0.1+[UNIX_TIME_NANOS]-py3-none-any.whl...
6+
Uploading .databricks/bundle/default/patched_wheels/my_test_code_my_test_code/my_test_code-0.0.1+[UNIX_TIME_NANOS][0]-py3-none-any.whl...
77
Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/[UNIQUE_NAME]/files...
88
Deploying resources...
99
Updating deployment state...
@@ -21,7 +21,7 @@ Got arguments:
2121
=== Make a change to code without version change and run the job again
2222
>>> [CLI] bundle deploy
2323
Building my_test_code...
24-
Uploading .databricks/bundle/default/patched_wheels/my_test_code_my_test_code/my_test_code-0.0.1+[UNIX_TIME_NANOS]-py3-none-any.whl...
24+
Uploading .databricks/bundle/default/patched_wheels/my_test_code_my_test_code/my_test_code-0.0.1+[UNIX_TIME_NANOS][1]-py3-none-any.whl...
2525
Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/[UNIQUE_NAME]/files...
2626
Deploying resources...
2727
Updating deployment state...

acceptance/cmd/patchwhl/output.txt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,20 @@
33
>>> setmtime.py [TIMESTAMP].[NUMID] my_test_code-0.0.1-py3-none-any.whl
44

55
>>> [CLI] selftest patchwhl my_test_code-0.0.1-py3-none-any.whl
6-
Warn: Patched whl: my_test_code-0.0.1-py3-none-any.whl -> my_test_code-0.0.1+[UNIX_TIME_NANOS]-py3-none-any.whl
6+
Warn: Patched whl: my_test_code-0.0.1-py3-none-any.whl -> my_test_code-0.0.1+[UNIX_TIME_NANOS][0]-py3-none-any.whl
77

88
>>> diff.py original output
9-
--- original/my_test_code-0.0.1+[UNIX_TIME_NANOS].dist-info/METADATA
10-
+++ output/my_test_code-0.0.1+[UNIX_TIME_NANOS].dist-info/METADATA
9+
--- original/my_test_code-0.0.1+[UNIX_TIME_NANOS][0].dist-info/METADATA
10+
+++ output/my_test_code-0.0.1+[UNIX_TIME_NANOS][0].dist-info/METADATA
1111
@@ -1,5 +1,5 @@
1212
Metadata-Version: 2.1
1313
Name: my-test-code
1414
-Version: 0.0.1
1515
+Version: 0.0.1+[UNIX_TIME_NANOS]
1616
Summary: my test wheel
1717
Home-page: https://databricks.com
18-
--- original/my_test_code-0.0.1+[UNIX_TIME_NANOS].dist-info/RECORD
19-
+++ output/my_test_code-0.0.1+[UNIX_TIME_NANOS].dist-info/RECORD
18+
--- original/my_test_code-0.0.1+[UNIX_TIME_NANOS][0].dist-info/RECORD
19+
+++ output/my_test_code-0.0.1+[UNIX_TIME_NANOS][0].dist-info/RECORD
2020
@@ -1,7 +1,7 @@
2121
src/__init__.py,sha256=BRmKeYehopKv4NG_SFa7t6wn248RrPHJivu7DM1R-Rw,48
2222
src/__main__.py,sha256=8TtsnLsaJEM35Y4L8ocrv-qfxusgYpRL2HPyYiabHng,242
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
src/__init__.py,sha256=BRmKeYehopKv4NG_SFa7t6wn248RrPHJivu7DM1R-Rw,48
22
src/__main__.py,sha256=8TtsnLsaJEM35Y4L8ocrv-qfxusgYpRL2HPyYiabHng,242
3-
my_test_code-0.0.1+[UNIX_TIME_NANOS].dist-info/METADATA,sha256=H99P2vEwB_hBVPNtPwsXZotaDQzmWEGeSlOtMzWe62U,217
4-
my_test_code-0.0.1+[UNIX_TIME_NANOS].dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
5-
my_test_code-0.0.1+[UNIX_TIME_NANOS].dist-info/entry_points.txt,sha256=oDWOW9SsBlk4Uejj1ftYPBxfhJ5ZJctb4JOUIG1rc-4,34
6-
my_test_code-0.0.1+[UNIX_TIME_NANOS].dist-info/top_level.txt,sha256=74rtVfumQlgAPzR5_2CgYN24MB0XARCg0t-gzk6gTrM,4
7-
my_test_code-0.0.1+[UNIX_TIME_NANOS].dist-info/RECORD,,
3+
my_test_code-0.0.1+[UNIX_TIME_NANOS][0].dist-info/METADATA,sha256=H99P2vEwB_hBVPNtPwsXZotaDQzmWEGeSlOtMzWe62U,217
4+
my_test_code-0.0.1+[UNIX_TIME_NANOS][0].dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
5+
my_test_code-0.0.1+[UNIX_TIME_NANOS][0].dist-info/entry_points.txt,sha256=oDWOW9SsBlk4Uejj1ftYPBxfhJ5ZJctb4JOUIG1rc-4,34
6+
my_test_code-0.0.1+[UNIX_TIME_NANOS][0].dist-info/top_level.txt,sha256=74rtVfumQlgAPzR5_2CgYN24MB0XARCg0t-gzk6gTrM,4
7+
my_test_code-0.0.1+[UNIX_TIME_NANOS][0].dist-info/RECORD,,

acceptance/selftest/basic/output.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,11 @@ Exit code: 7
3434
CUSTOM_NUMBER_REGEX
3535
123456
3636

37+
=== Distinct replacements
38+
[NUMBER][0]
39+
[NUMBER][1]
40+
[NUMBER][0]
41+
3742
=== Testing --version
3843
>>> [CLI] --version
3944
Databricks CLI v[DEV_VERSION]

0 commit comments

Comments
 (0)