Skip to content

Conversation

@h-vetinari
Copy link
Member

This was proposed by Isuru here. I don't know where the limit on the windows server from prefix is coming from, normally filenames until 260 characters should be fine, but it still fails in conda-forge/pytorch-cpu-feedstock#332 (which has been rerendered with the changes this PR) with

Checking out the ref
  "C:\Program Files\Git\bin\git.exe" checkout --progress --force refs/remotes/pull/332/merge
  Error: error: unable to create file .ci_support/linux_64_blas_implgenericc_compiler_version13channel_targetsconda-forge_maincuda_compilerNonecuda_compiler_versionNonecxx_compiler_version13github_actions_labelscirun-openstack-cpu-2xlargeis_h2ab6b548.yaml: Filename too long
  Error: error: unable to create file .ci_support/linux_64_blas_implgenericc_compiler_version13channel_targetsconda-forge_maincuda_compilerNonecuda_compiler_versionNonecxx_compiler_version13github_actions_labelscirun-openstack-gpu-2xlargeis_h6173e25b.yaml: Filename too long

On the other hand, I don't want to shorten the config names too much, because then we lose a lot of information which is relevant for the pytorch/tensorflow feedstocks, like is this a CPU or GPU job (doubly so if we'd take the doubled CI as in conda-forge/pytorch-cpu-feedstock#332), and it's not desirable to just too-short filenames that are only distinguishable by hashes, where one has no idea which exact config is behind when looking at the actions UI.

short_config_name = config_name[:35] + "_h" + h
if len("conda-forge-build-done-" + config_name) >= 250:
short_config_name = config_name[:40] + "_h" + salt
if len("conda-forge-build-done-" + config_name) >= 200:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if len("conda-forge-build-done-" + config_name) >= 200:
if len(config_name) >= 190:

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't this need to take into account something like

C:\Users\runnerx\_work\pytorch-cpu-feedstock\pytorch-cpu-feedstock\.ci_support\

(not sure where you got that from, and why the pytorch-cpu-feedstock is doubled), then we can directly check >=260.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is done now

Copy link
Member

@isuruf isuruf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks like a reasonable change to me

but don't just take the short_config_name, which is too short to distinguish
the file names of the respective builds (e.g. CPU vs. CUDA)
@h-vetinari h-vetinari marked this pull request as ready for review June 10, 2025 04:48
@h-vetinari h-vetinari requested a review from a team as a code owner June 10, 2025 04:48
@h-vetinari
Copy link
Member Author

This PR (or something like it) is relevant to fix conda-forge/vc-feedstock#95. CC @beckermr

@xhochy xhochy merged commit 41d7349 into conda-forge:main Jun 12, 2025
2 checks passed
@xhochy
Copy link
Member

xhochy commented Jun 12, 2025

Only realised after merge that this still needs a news entry :(

@h-vetinari
Copy link
Member Author

Only realised after merge that this still needs a news entry :(

#2330

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants