Skip to content
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 combine_phase_logs text encoding issues #34657

Merged
merged 1 commit into from Dec 22, 2022

Conversation

haampie
Copy link
Member

@haampie haampie commented Dec 22, 2022

Closes #34656

Avoid text decoding and encoding when combining log files, instead
combine in binary mode.

Also do a buffered copy which is sometimes faster for large log files.

Avoid text decoding and encoding when combining log files, instead
combine in binary mode.

Also do a buffered copy which is sometimes faster for large log files.
@spackbot-app spackbot-app bot added core PR affects Spack core functionality tests General test capability(ies) labels Dec 22, 2022
@alalazo alalazo merged commit 161fbfa into spack:develop Dec 22, 2022
haampie added a commit that referenced this pull request Dec 22, 2022
Avoid text decoding and encoding when combining log files, instead
combine in binary mode.

Also do a buffered copy which is sometimes faster for large log files.
@haampie haampie deleted the fix/combine_phase_logs-binary-mode branch December 22, 2022 17:04
@haampie haampie mentioned this pull request Dec 22, 2022
20 tasks
haampie added a commit that referenced this pull request Dec 23, 2022
Avoid text decoding and encoding when combining log files, instead
combine in binary mode.

Also do a buffered copy which is sometimes faster for large log files.
stephenmsachs pushed a commit to stephenmsachs/spack that referenced this pull request Jan 3, 2023
Avoid text decoding and encoding when combining log files, instead
combine in binary mode.

Also do a buffered copy which is sometimes faster for large log files.
@Jordan474
Copy link
Contributor

This change was cherry-picked on backports/v0.19.1, but I think it breaks python 2 ?

I get:

  File "spack/lib/spack/spack/installer.py", line 465, in combine_phase_logs
    with open(log_path, "bw") as log_file:
ValueError: mode string must begin with one of 'r', 'w', 'a' or 'U', not 'bw'

haampie added a commit that referenced this pull request Jan 18, 2023
Avoid text decoding and encoding when combining log files, instead
combine in binary mode.

Also do a buffered copy which is sometimes faster for large log files.
haampie added a commit that referenced this pull request Jan 24, 2023
Avoid text decoding and encoding when combining log files, instead
combine in binary mode.

Also do a buffered copy which is sometimes faster for large log files.
RikkiButler20 pushed a commit to RikkiButler20/spack that referenced this pull request Jan 24, 2023
Avoid text decoding and encoding when combining log files, instead
combine in binary mode.

Also do a buffered copy which is sometimes faster for large log files.
haampie added a commit that referenced this pull request Feb 7, 2023
Avoid text decoding and encoding when combining log files, instead
combine in binary mode.

Also do a buffered copy which is sometimes faster for large log files.
alalazo pushed a commit that referenced this pull request Feb 7, 2023
Avoid text decoding and encoding when combining log files, instead
combine in binary mode.

Also do a buffered copy which is sometimes faster for large log files.
amd-toolchain-support pushed a commit to amd-toolchain-support/spack that referenced this pull request Feb 16, 2023
Avoid text decoding and encoding when combining log files, instead
combine in binary mode.

Also do a buffered copy which is sometimes faster for large log files.
jmcarcell pushed a commit to key4hep/spack that referenced this pull request Apr 13, 2023
Avoid text decoding and encoding when combining log files, instead
combine in binary mode.

Also do a buffered copy which is sometimes faster for large log files.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core PR affects Spack core functionality tests General test capability(ies)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Hard error when a build log contains UTF-8 characters
3 participants