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

Update hash_name function for RelMon utilities #43348

Merged
merged 1 commit into from
Nov 28, 2023

Conversation

ggonzr
Copy link
Contributor

@ggonzr ggonzr commented Nov 21, 2023

PR description:

Fixes a compatibility bug between Python 2 and 3 for RelMon HTML report generation. If the parameter --hash_name is set when using ValidationMatrix.py, the scripts fails because it is required to encode the parameter file_name to be hashed as bytes. str is not longer supported.

PR validation:

Some manual tests:

  1. Isolate the updated function (hash_name) into another script and use it to hash some strings calling the script using the Python 2.7 and Python 3.11 interpreters.
  2. Generate a dummy comparison report with the following .root file: DQM_V0001_R000000001__RelValBuMixing_14__CMSSW_12_4_0-124X_mcRun3_2022_realistic_v5-v1__DQMIO.root, via:

ValidationMatrix.py -R DQM_V0001_R000000001__RelValBuMixing_14__CMSSW_12_4_0-124X_mcRun3_2022_realistic_v5-v1__DQMIO.root -T DQM_V0001_R000000001__RelValBuMixing_14__CMSSW_12_4_0-124X_mcRun3_2022_realistic_v5-v1__DQMIO.root -o Test_Report --hash_name --standalone

1. Compatibility issue with Python 3: Encode the `file_name` argument before computing the hash.
2. Import the `hashlib` module for the development environment
@ggonzr
Copy link
Contributor Author

ggonzr commented Nov 21, 2023

please test

@cmsbuild
Copy link
Contributor

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-43348/37811

  • This PR adds an extra 20KB to repository

@cmsbuild
Copy link
Contributor

A new Pull Request was created by @ggonzr (Geovanny González-Rodríguez) for master.

It involves the following packages:

  • Utilities/RelMon (dqm)

@syuvivida, @cmsbuild, @antoniovagnerini, @tjavaid, @nothingface0, @rvenditti can you please review it and eventually sign? Thanks.
@wddgit, @fabiocos this is something you requested to watch as well.
@sextonkennedy, @rappoccio, @antoniovilela you are the release manager for this.

cms-bot commands are listed here

@tjavaid
Copy link

tjavaid commented Nov 22, 2023

please test

@cmsbuild
Copy link
Contributor

+1

Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-cef693/35998/summary.html
COMMIT: aeae5e9
CMSSW: CMSSW_14_0_X_2023-11-21-2300/el8_amd64_gcc12
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week0/cms-sw/cmssw/43348/35998/install.sh to create a dev area with all the needed externals and cmssw changes.

Comparison Summary

Summary:

@tjavaid
Copy link

tjavaid commented Nov 25, 2023

@ggonzr , can this update cause (though very minute i.e. a couple of entries) differences for the WF 9.0 ? (bin-by-bin)

@ggonzr
Copy link
Contributor Author

ggonzr commented Nov 27, 2023

Hello @tjavaid,
No, This update is only related to the compatibility with Python 3, the behavior for computing the hash remains the same, so no issues are expected from this.

@tjavaid
Copy link

tjavaid commented Nov 28, 2023

@ggonzr , thanks for confirming. @mmusich just pointed out an issue (#43415) on this randomly appearing WF causing differences. We can sign this now.

@tjavaid
Copy link

tjavaid commented Nov 28, 2023

+1

@cmsbuild
Copy link
Contributor

This pull request is fully signed and it will be integrated in one of the next master IBs (tests are also fine). This pull request will now be reviewed by the release team before it's merged. @rappoccio, @antoniovilela, @sextonkennedy (and backports should be raised in the release meeting by the corresponding L2)

@rappoccio
Copy link
Contributor

+1

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

Successfully merging this pull request may close these issues.

4 participants