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

Check CMSSW release before getting skim-datatier map #11110

Merged
merged 1 commit into from Apr 27, 2022

Conversation

germanfgv
Copy link
Contributor

Fixes #11109

Status

ready

Description

Uses isCMSSWSupported() to determine the Python version to use to get skim's datatier, instead of just using the agent's python version.

Is it backward compatible (if not, which system it affects?)

YES

Related PRs

None

External dependencies / deployment changes

None

@cmsdmwmbot
Copy link

Jenkins results:

  • Python3 Unit tests: succeeded
    • 7 tests added
  • Python3 Pylint check: failed
    • 8 warnings and errors that must be fixed
    • 2 warnings
    • 56 comments to review
  • Pylint py3k check: failed
    • 1 warnings
  • Pycodestyle check: succeeded

Details at https://cmssdt.cern.ch/dmwm-jenkins/view/All/job/DMWM-WMCore-PR-test/13055/artifact/artifacts/PullRequestReport.html

@germanfgv
Copy link
Contributor Author

The Pylint --py3k check fails because of a preexisting problem. I'm not sure what to do in this case @amaltaro @todor-ivanov

@germanfgv germanfgv changed the title Check CMSSW version before getting sim-datatier map Check CMSSW version before getting skim-datatier map Apr 26, 2022
@germanfgv germanfgv changed the title Check CMSSW version before getting skim-datatier map Check CMSSW release before getting skim-datatier map Apr 26, 2022
Copy link
Contributor

@todor-ivanov todor-ivanov left a comment

Choose a reason for hiding this comment

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

Thanks for providig this fix @germanfgv. It looks good and I think estimating if PY3 code is supported by cutting the set of CMSSW version in two slices ( e.g. starting from CMSSW_10_3_0) is a good way of proceeding here. I just wanted to ask a general question, because I am not completely sure if and how to estimate the version trough which we should draw the line. Did you try with multiple CMSSW versions? Because one thing is if with this version that particular call has been fixed, something totally different would be the release which provides full PY3 compatibility. BTW, I think this information is retrievable from other sources, no need for trail and error method.

@@ -160,7 +161,7 @@ def skimToDataTier(cmsswVersion, skim):
command += "cd %s\n" % scramBaseDirs[0]
command += "eval `scramv1 runtime -sh`\n"

if PY3:
if isCMSSWSupported(cmsswVersion, "CMSSW_10_3_0"):
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this the exact version from which on this getSkimDatatier method has been fixed to support python3?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hi Todor. What I did is I looked for the PR that made the changes: cms-sw/cmssw#23932
It was introduced in CMSSW_10_3_0_pre1, but I think isCMSSWSupported() does not handle pre-releases.

Copy link
Contributor

Choose a reason for hiding this comment

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

Hi @germanfgv I think this check is pretty much enough for the current situation. Thanks!

Copy link
Contributor

Choose a reason for hiding this comment

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

That's correct, this method doesn't go beyond the 3rd digit of the release number.
Thanks for this confirmation, German, I missed your in-thread reply :)

Copy link
Contributor

@amaltaro amaltaro left a comment

Choose a reason for hiding this comment

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

The Pylint --py3k check fails because of a preexisting problem.

pre-existing issues are not a problem, you are welcome to fix those if it's straight forward though.

German, these changes look good to me. However, I'd rather wait for your answer to Todor's question. Thanks

@@ -160,7 +161,7 @@ def skimToDataTier(cmsswVersion, skim):
command += "cd %s\n" % scramBaseDirs[0]
command += "eval `scramv1 runtime -sh`\n"

if PY3:
if isCMSSWSupported(cmsswVersion, "CMSSW_10_3_0"):
Copy link
Contributor

Choose a reason for hiding this comment

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

Hi @germanfgv I think this check is pretty much enough for the current situation. Thanks!

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.

Unable to get Skims-Datatier map for CMSSW releases prior to 10_3_0_pre1
4 participants