-
Notifications
You must be signed in to change notification settings - Fork 917
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix build metrics report format with long placehold filenames #17679
base: branch-25.02
Are you sure you want to change the base?
Conversation
Here is what it looks like after this fix: https://downloads.rapids.ai/ci/cudf/pull-request/17679/fb12cda/cuda12_x86_64.ninja_log.html (VPN required) |
Explaining this behavior for anyone who is curious: Conda uses a "placeholder" intentionally, to ensure that hardcoded paths in binaries are relocatable. On install, conda can replace hardcoded paths in a binary with the proper user path, but it cannot be longer than the original placeholder string because doing so would change the locations of content/symbols in the binary. It can be shorter and stop early with a I would prefer to use something like this: import re
def replace_placeholder_patterns(input_string: str) -> str:
pattern = r'(_h_env_placehold)[_placehold]+'
return re.sub(pattern, r'\1...', input_string)
print(replace_placeholder_patterns("CMakeFiles/cudf.dir/opt/conda/conda-bld/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placeho/include/rmm/logger_impl/logger.cpp.o")) This gives output like:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. One small non-blocking question though, as format_file_name
only returns replace_placeholder_patterns
, can we just consolidate them? Would we need to make any other adjustments to the display name in the future to keep it in the current form?
Right. I expect further updates to this function in the future and this will help keep them in one place. |
JFYI the docs on this are at https://docs.conda.io/projects/conda-build/en/latest/resources/make-relocatable.html. |
Description
Truncates filenames that appear as multiple
placehold_placedhold_...
in the Build Metrics Report.Example show here: https://downloads.rapids.ai/ci/cudf/pull-request/17669/0710ad6/cuda12_x86_64.ninja_log.html (requires VPN).
Checklist