-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Add edmDumpClassVersion and checkDictionaryUpdate.py scripts to check class version and checksum updates #45423
Conversation
cms-bot internal usage |
+code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-45423/40873 |
A new Pull Request was created by @makortel for master. It involves the following packages:
@Dr15Jones, @cmsbuild, @makortel, @smuzaffar can you please review it and eventually sign? Thanks. cms-bot commands are listed here |
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.
I think FWCore/Utilities
is not the best package for these utilities (mostly because of the dependence on ROOT).
Maybe FWCore/Reflection
would be better? (although I feel it would not be a perfect match either)
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.
I moved the code from edmCheckClassVersion
that I wanted to re-use into this file (with a few changes that I'll note below).
There is enough of somewhat complicated code shared between edmCheckClassVersion
and edmDumpClassVersion
that I'd prefer to have the edmDumpClassVersion
in CMSSW rather than in cms-bot (which then implies the need to backport to 14_0_X).
classVersionIndex=1 | ||
versionsToChecksumIndex = 2 | ||
|
||
def __init__(self, filename, includeNonVersionedClasses=False, normalizeClassNames=True): |
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.
The includeNonVersionedClasses
and normalizeClassNames
are new options for this class. The default values are those used by edmCheckClassVersion
(I could make that script to pass the values also explicitly). The edmDumpClassVersion
uses opposite values.
from sys import version_info | ||
if version_info[0] > 2: | ||
atol = int | ||
else: | ||
from string import atol |
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.
I just replaced all atol()
calls with int()
.
The present printout is along
If we proceed by the bot prints the checksums of the baseline and of the baseline+PR for every PR test, this format might be sufficient (simple If we proceed by having a storing the versions and checksums for all data format |
@smuzaffar What way do you think would make most sense to use the version+checksum information in the PR tests? |
@makortel , I am think something like the following
Note that this will be done during PR tests and not during code-checks (we do not want to build/run anything during self started code-checks tests) |
@smuzaffar Ok, sounds good. Do I understand correctly that a simple text format (like presently in this PR) would be sufficient? What about packages that have multiple |
@makortel , for few [a]
[b]
|
If I understand correctly, we do want to flag in case of any change in dataformat i.e. any new dict, removal of existing dict or change in checksum ... right? If yes then simple diff with this text format should be enough.
yes, bot will run single process per xml file but it will run |
@makortel , I also see some classes with [a]
|
Right, this is my understanding as well.
Ok, good. I'll then update the PR with the earlier review suggestions.
Sounds good. |
I have no idea. I'll tag @pcanal in the hope we'd get an answer when he gets back. |
Thanks, I'll take a look of these as well. |
yes bot will process all the xml files of the package. Also it will process any addition alpaka backend xml files
|
why would you expect a class version != -1 for these?
|
@makortel , all look good |
+core |
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. @sextonkennedy, @mandrenguyen, @rappoccio, @antoniovilela (and backports should be raised in the release meeting by the corresponding L2) |
@makortel |
I'd actually prefer to leave them open. 3 of them are my own comments about why some things were done (and there is nothing to react), and 1 is a question/suggestion for @smuzaffar (for which there is nothing to react in this PR). I feel all of them are more useful to be left open than closed for anyone looking at this PR in the future. |
Fair enough. But just to confirm, these are left open for the future, but the PR itself is ready to be merged (as the signatures already indicate)? |
Correct. |
+1 |
Coming back to the
Fixed in #45564
I need to talk to @pcanal to understand better best practices with type aliases in
Fixed in #45567
Fixed in #45553
Fixed in #45546
Fixed in #45545
I'll look into next week
Fixed in #45551
Fixed in #45554 |
@makortel , class versions results for IB/baseline are now available ( see the link on Ib page : https://cmssdt.cern.ch/SDT/jenkins-artifacts//class_versions/CMSSW_14_1_X_2024-07-28-2300/el8_amd64_gcc12/class_versions.html ). There are few errors e.g. there are errors like
|
Thanks! I'll start taking a look. I see they all are about the |
PR description:
This PR is a work-in-progress prototype of a
edmDumpClassVersion
script to print class versions and checksums of all (non-transient) classes defined in aclasses_def.xml
file. The script would be used in automated assignment ofchanges-dataformats
label discussed in cms-sw/cms-bot#2245.The command-line interface is similar to
edmCheckClassVersion
with the-x / --xml_file
and-l / --lib
parameters.Resolves cms-sw/framework-team#947
PR validation:
Tested the output on
DataFormats/Common/src/classes_def.xml
.If this PR is a backport please specify the original PR and why you need to backport that PR. If this PR will be backported please specify to which release cycle the backport is meant for:
Potentially to be backported to 14_0_X.