Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitc82a372

Browse files
authored
Add timestamp to CI schema names (#2496)
1 parent52d80e6 commitc82a372

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

‎soda/core/tests/helpers/data_source_fixture.py‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
from __future__importannotations
22

3+
importdatetime
34
importlogging
45
importos
56
importre
@@ -10,7 +11,6 @@
1011
fromhelpers.test_scanimportTestScan
1112
fromhelpers.test_tableimportTestTable
1213
fromsoda.common.lazyimportLazy
13-
fromsoda.common.random_helperimportgenerate_random_alpha_num_str
1414
fromsoda.common.yaml_helperimportYamlHelper
1515
fromsoda.execution.data_sourceimportDataSource
1616

@@ -59,6 +59,7 @@ def _create_schema_name(self):
5959
else:
6060
python_version=os.getenv("PYTHON_VERSION")
6161
python_version_short=f'P{python_version.replace(".","")}'ifpython_versionelse""
62+
timestamp=datetime.datetime.now().strftime("%Y_%m_%dT%H_%M_%S_%f")
6263

6364
ifgithub_head_ref:
6465
github_head_ref_short= (
@@ -67,12 +68,12 @@ def _create_schema_name(self):
6768
schema_name_parts.append("ci")
6869
schema_name_parts.append(github_head_ref_short)
6970
schema_name_parts.append(python_version_short)
70-
schema_name_parts.append(generate_random_alpha_num_str(5))
71+
schema_name_parts.append(timestamp)
7172

7273
else:
7374
schema_name_parts.append("ci_main")
7475
schema_name_parts.append(python_version_short)
75-
schema_name_parts.append(generate_random_alpha_num_str(5))
76+
schema_name_parts.append(timestamp)
7677

7778
schema_name_raw="_".join(schema_name_parts)
7879
schema_name=re.sub("[^0-9a-zA-Z]+","_",schema_name_raw).lower()

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp