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

[crab][dbs] expose dbs python api and examples via crab distribution #5841

Merged
merged 1 commit into from May 22, 2020

Conversation

smuzaffar
Copy link
Contributor

  • expose dbs and RestClient python api via crab distribution
  • crab distribution to include dbs/Client/utils (as examples)
  • crab-setup.*sh scripts to set DBS3_CLIENT_ROOT pointing to latest crab/dbs distribution

@smuzaffar
Copy link
Contributor Author

please test

@cmsbuild
Copy link
Contributor

cmsbuild commented May 21, 2020

The tests are being triggered in jenkins.
https://cmssdt.cern.ch/jenkins/job/ib-run-pr-tests/6494/console Started: 2020/05/22 04:57

@cmsbuild
Copy link
Contributor

A new Pull Request was created by @smuzaffar (Malik Shahzad Muzaffar) for branch IB/CMSSW_11_1_X/master.

@cmsbuild, @smuzaffar, @mrodozov, @tulamor can you please review it and eventually sign? Thanks.
cms-bot commands are listed here

@smuzaffar
Copy link
Contributor Author

@belforte and @yuyiguo , once this is merged then crab-setup.*sh script should

  • set DBS3_CLIENT_ROOT env variable pointing to crab-(pre|propd|dev) installation where dbs/examples will be available.
  • dbs and RestClient python api will also be available and there is no need to do import CRABClient first to get dbs.

@yuyiguo
Copy link

yuyiguo commented May 22, 2020

Thanks @smuzaffar !

@cmsbuild
Copy link
Contributor

+1
Tested at: 43b24cc
https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-20a129/6494/summary.html
CMSSW: CMSSW_11_1_X_2020-05-21-2300
SCRAM_ARCH: slc7_amd64_gcc820

@cmsbuild
Copy link
Contributor

Comparison job queued.

@cmsbuild
Copy link
Contributor

Comparison is ready
https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-20a129/6494/summary.html

Comparison Summary:

  • No significant changes to the logs found
  • Reco comparison results: 0 differences found in the comparisons
  • DQMHistoTests: Total files compared: 35
  • DQMHistoTests: Total histograms compared: 2694466
  • DQMHistoTests: Total failures: 1
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 2694416
  • DQMHistoTests: Total skipped: 49
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 0.0 KiB( 34 files compared)
  • Checked 150 log files, 16 edm output root files, 35 DQM output files

@smuzaffar
Copy link
Contributor Author

+externals

@cmsbuild
Copy link
Contributor

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

@belforte
Copy link
Contributor

@smuzaffar @yuyiguo I see that this was used in last IB since using that [1] I now see the new
env. var and the expanded pythonpath
DBS3_CLIENT_ROOT=/cvmfs/cms-ib.cern.ch/nweek-02629/share/cms/crab-prod/3.3.2005
and
belforte@lxplus757/TC3> ls $PYTHONPATH
CRABAPI/ CRABClient/ RestClient/ dbs/

But I do not see the DBS3 examples around:
belforte@lxplus757/TC3> find $DBS3_CLIENT_ROOT -name 'DBS3*py'
/cvmfs/cms-ib.cern.ch/nweek-02629/share/cms/crab-prod/3.3.2005/lib/WMCore/Services/DBS/DBS3Reader.py
belforte@lxplus757/TC3>

Do we need to touch crab-*.spec files to trigger a new build ?

[1]
https://twiki.cern.ch/twiki/bin/view/CMSPublic/CMSCrabClient#Using_CRABClient_from_nightly_CM

@smuzaffar
Copy link
Contributor Author

No, no need to touch crab-*.spec. The problem is with finding the lastest version of crab. I have tried to fix it here https://github.com/cms-sw/cmsdist/pull/5847/files .

@smuzaffar
Copy link
Contributor Author

@belforte , there are two issues with finding the latest version of crab client

  1. .rcN versions
  2. Automatic suffix -<some-string> (added by cmsBuild) whenever you change WMCore, dbs or CRABServer tags.

To fix (1), I would suggest to change the crab version naming scheme. As there are no more monthly releases and there is no need to have release candidates so I would suggest that crab client tags in guthub could be either of form 3.3.YYMMDD (e.g. 3.3.200522) or v3.YYMMDD (e.g. v3.200522).

To fix (2), I would suggest that we add a numeric suffix for the installation e.g. initial version v3.200522 could be installed as v3.200522.00 and later if you have to update dbs, WMCore or CRABServers tags then the build can be installed in v3.200522.01, v3.200522.02 and so on. So basically every new tag of crabclient will be installed as v3.YYMMDD.00 and every re-build (due to change in WMCore, dbs, CRABServer) will be installed in v3.YYMMDD.NN. This will simplify the crab latest version logic a lot.

What do you think?

@belforte
Copy link
Contributor

thans @smuzaffar very nice ideas. We are not in a hurry. Let me think a bit over this and run the idea in the (small) CRAB group and converge. Will track in a CRAB issue, do no like to add much to a closed PR.

@belforte
Copy link
Contributor

if a new version of crab client can help in the short tern, I can surely make one in order to test things while sticking with current scheme, right ? I.e. hopefully you do not need the (hard to read) logic in https://github.com/cms-sw/cmsdist/pull/5847/files.

Rather I need to ask about (2): who will add the numeric suffix ? where/how will it be visible ? what will crab version return ?

@smuzaffar
Copy link
Contributor Author

smuzaffar commented May 22, 2020

@belforte , no, currently there is no need to have new tag. my latest changes to get the latest crab version are now in and available under /cvmfs/cms-ib.cern.ch. So dbs/examples should be available now under $DBS3_CLIENT_ROOT.

For (2), the numeric suffix needs to be set/modified by hand. For e.g. crab-*.spec files will look like this

%define crab_client_tag 3.200522
#For new crab_client_tag set the version suffix (in next line) to "00" otherwise for any other change just increament it
### RPM cms crab-prod %{crab_client_tag}.00

So whenever you need to update crab_client_tag then make sure the suffix is 00 and for any other change e.g. updating WMCore, dbs etc., just increment it.

@belforte
Copy link
Contributor

I understand. Thanks.,
And I confirm that DBS examples are now available in
$DBS3_CLIENT_ROOT/examples is now visible and filled
I will change again the documentation for CRAB users :-)

@belforte
Copy link
Contributor

@smuzaffar I understand the idea, and all in all I like this schema and would like to adopt for crabserver/crabcacge/crabtaskworker as well.
But have a question on the technicality.
We now have in crab-prod.spec (for the crab client):

### RPM cms crab-prod 3.3.2005

which tells causes versin 3.3.2005 to be checked out from github and built. Looking at crab-build.spec I would unserstand that %{realversion} is defined as the righmost word in ### RPM statement. WHen I put ### RPM cms crab-prod %{crab_client_tag}.00 what will be pulled from github ? Do we also need to change

Source0: git://github.com/dmwm/CRABClient.git?obj=master/%{realversion}&export=CRABClient&output=/CRABClient-%{realversion}.tar.gz

so that it uses %{crab_client_tag} instead of %{realversion} ?

Anyhow.. can we give it a try ? What should I do ?

belforte added a commit to belforte/cmsdist that referenced this pull request May 25, 2020
@smuzaffar smuzaffar deleted the crab-dbs branch May 27, 2020 21:05
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.

None yet

4 participants