diff --git a/conda_smithy/configure_feedstock.py b/conda_smithy/configure_feedstock.py index dd59b4f81..54616c1c7 100644 --- a/conda_smithy/configure_feedstock.py +++ b/conda_smithy/configure_feedstock.py @@ -820,12 +820,14 @@ def dump_subspace_config_files( package_key(config, top_level_loop_vars, metas[0].config.subdir), ) short_config_name = config_name + conf_hash = hashlib.sha256(config_name.encode("utf-8")).hexdigest()[:8] + # drone has a limit of 50, see https://github.com/conda-forge/conda-smithy/issues/1188 if len(short_config_name) >= 49: - h = hashlib.sha256(config_name.encode("utf-8")).hexdigest()[:10] - short_config_name = config_name[:35] + "_h" + h - if len("conda-forge-build-done-" + config_name) >= 250: + short_config_name = config_name[:40] + "_h" + conf_hash + # 200 = 190 + len("_h") + len(conf_hash) + if len(config_name) >= 200: # Shorten file name length to avoid hitting maximum filename limits. - config_name = short_config_name + config_name = config_name[:190] + "_h" + conf_hash out_folder = os.path.join(root_path, ".ci_support") out_path = os.path.join(out_folder, config_name) + ".yaml"