Skip to content

Commit

Permalink
Double underscore and mod timestamp
Browse files Browse the repository at this point in the history
  • Loading branch information
chi-yelp committed Aug 17, 2023
1 parent b6850c5 commit 57a6e08
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion service_configuration_lib/spark_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -1098,7 +1098,7 @@ def get_spark_conf(
if is_jupyter:
raw_app_id = app_name
else:
raw_app_id = f'{paasta_service}_{paasta_instance}_{int(time.time())}'
raw_app_id = f'{paasta_service}__{paasta_instance}__{int(time.time()) % 10000}'
app_id = re.sub(r'[\.,-]', '_', _get_k8s_resource_name_limit_size_with_hash(raw_app_id))

spark_conf.update({
Expand Down
2 changes: 1 addition & 1 deletion tests/spark_config_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -1151,7 +1151,7 @@ def verify(output):
if is_jupyter:
raw_app_id_prefix = app_name
else:
raw_app_id_prefix = f'{paasta_service}_{paasta_instance}_'
raw_app_id_prefix = f'{paasta_service}__{paasta_instance}__'
app_id_prefix = re.sub(r'[\.,-]', '_', raw_app_id_prefix)
output_app_id = output[key]
assert output_app_id.startswith(app_id_prefix)
Expand Down

0 comments on commit 57a6e08

Please sign in to comment.