Skip to content

Commit a3063c7

Browse files
pjonssonomad
authored andcommitted
generate: permit longer app name
The warnings happen at 64 characters on modern datacube versions, so get ~40 more characters into the name.
1 parent 95bbd21 commit a3063c7

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

cubedash/generate.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -153,11 +153,9 @@ def print_status(
153153

154154
def _get_index(config: ODCEnvironment, variant: str) -> Index:
155155
# Avoid long names as they will print warnings all the time.
156-
short_name = variant.replace("_", "")[:20]
157-
index: Index = index_connect(
158-
config, application_name=f"gen.{short_name}", validate_connection=False
159-
)
160-
return index
156+
prefix = "gen."
157+
name = f"{prefix}{variant.replace('_', '')[: 64 - len(prefix)]}"
158+
return index_connect(config, application_name=name, validate_connection=False)
161159

162160

163161
def run_generation(

0 commit comments

Comments
 (0)