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

o2oRun_SiStripDCS email warning fix #45977

Merged
merged 1 commit into from
Sep 12, 2024

Conversation

JanChyczynski
Copy link
Contributor

@JanChyczynski JanChyczynski commented Sep 11, 2024

PR description:

This fixes an error encountered when testing moving SiStripDetVOff_prompt O2O from CMSSW_11_0_1 to 14_0_15_patch1. A copy of SiStripDetVOff_prompt - SiStripDetVOff_prompt_test was run for the tests and when it was failing it was trying to send a warning email which caused an exception. The exception's cause is providing a bytes object where str was expected.

PR validation:

Tested by running SiStripDetVOff_prompt_test on CMSSW_14_0_15_patch1 with local changes (this PR's fix). The O2O was failing when testing providing the certificate for T0 API access (see #45779) - setting TIER0_API_URL=https://cmsweb-preprod.cern.ch/t0wmadatasvc/prod/ (which requires the cert) but not setting X509_USER_CERT. An O2O failure in this test scenario is expected (no cert provided) but it shouldn't cause an error with the email warning and this PR fixes the email error.

The error was:

[ERROR] O2OJob SiStripDetVOff_prompt_test FAILED!
Traceback (most recent call last):
  File "/cvmfs/cms.cern.ch/slc7_amd64_gcc12/cms/cmssw/CMSSW_14_0_15/bin/slc7_amd64_gcc12/o2oRun_SiStripDCS.py", line 104, in <module>
    sys.exit(main())
  File "/cvmfs/cms.cern.ch/slc7_amd64_gcc12/cms/cmssw/CMSSW_14_0_15/bin/slc7_amd64_gcc12/o2oRun_SiStripDCS.py", line 93, in main
    summary(args, is_ok, logfile)
  File "/cvmfs/cms.cern.ch/slc7_amd64_gcc12/cms/cmssw/CMSSW_14_0_15/bin/slc7_amd64_gcc12/o2oRun_SiStripDCS.py", line 58, in summary
    helper.send_mail(subject='%sDCS O2O Failure: %s' % (debugLabel, args.jobname),
  File "/cvmfs/cms.cern.ch/slc7_amd64_gcc12/cms/cmssw-patch/CMSSW_14_0_15_patch1/src/CondTools/SiStrip/python/o2o_helper.py", line 137, in send_mail
    msg.attach(MIMEText(message))
  File "/cvmfs/cms.cern.ch/slc7_amd64_gcc12/external/python3/3.9.14-4612d00f9f0430a19291545f1e47b4a4/lib/python3.9/email/mime/text.py", line 34, in __init__
    _text.encode('us-ascii')
AttributeError: 'bytes' object has no attribute 'encode'

After the fix the expected certificate-related failure was:

WARNING: No certificate provided for Tier0 access\n[2024-09-11 14:57:50,316] ERROR: ValueError for firstConditionSafeRun from Tier-0 Expecting value: line 1 column 1 (char 0) \n[2024-09-11 14:57:50,319] ERROR: Changes rolled back.\n[2024-09-11 14:57:50,319] ERROR: Error setting up Tier-0 data service: Invalid firstConditionSafeRun from Tier-0\n'
[2024-09-11 14:57:50,385] INFO: @@@Upload return code = -1@@@
Traceback (most recent call last):
  File "/data/O2O/cmssw/CMSSW_14_0_15_patch1/bin/slc7_amd64_gcc12/SiStripDCSPopCon.py", line 113, in <module>
    main()
  File "/data/O2O/cmssw/CMSSW_14_0_15_patch1/bin/slc7_amd64_gcc12/SiStripDCSPopCon.py", line 106, in main
    runjob(args)
  File "/data/O2O/cmssw/CMSSW_14_0_15_patch1/bin/slc7_amd64_gcc12/SiStripDCSPopCon.py", line 58, in runjob
    f(dbFile=output_db, inputTag=args.inputTag, destTags=args.destTags, destDb=args.destDb, since=None,
  File "/data/O2O/cmssw/CMSSW_14_0_15_patch1/src/CondTools/SiStrip/python/o2o_helper.py", line 128, in copy_payload
    raise RuntimeError('Upload FAILED!')
RuntimeError: Upload FAILED!

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:

We need backports to 14_0_X and 14_1_X
PRs:
#45978
#45979

FYI @p-masterson @perrotta @PonIlya

@cmsbuild
Copy link
Contributor

cmsbuild commented Sep 11, 2024

cms-bot internal usage

@cmsbuild
Copy link
Contributor

@cmsbuild
Copy link
Contributor

A new Pull Request was created by @JanChyczynski for master.

It involves the following packages:

  • CondTools/SiStrip (db)

@cmsbuild, @consuegs, @francescobrivio, @perrotta, @saumyaphor4252 can you please review it and eventually sign? Thanks.
@JanChyczynski, @PonIlya, @VinInn, @mmusich, @rsreds, @yuanchao this is something you requested to watch as well.
@antoniovilela, @mandrenguyen, @rappoccio, @sextonkennedy you are the release manager for this.

cms-bot commands are listed here

@perrotta
Copy link
Contributor

please test

@cmsbuild
Copy link
Contributor

+1

Size: This PR adds an extra 16KB to repository
Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-65ebe3/41454/summary.html
COMMIT: 7c0c306
CMSSW: CMSSW_14_2_X_2024-09-10-2300/el8_amd64_gcc12
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week0/cms-sw/cmssw/45977/41454/install.sh to create a dev area with all the needed externals and cmssw changes.

The following merge commits were also included on top of IB + this PR after doing git cms-merge-topic:

You can see more details here:
https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-65ebe3/41454/git-recent-commits.json
https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-65ebe3/41454/git-merge-result

Comparison Summary

Summary:

@perrotta
Copy link
Contributor

+db

@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, @sextonkennedy, @mandrenguyen, @antoniovilela (and backports should be raised in the release meeting by the corresponding L2)

@perrotta
Copy link
Contributor

urgent
(in view of backporting the 140X version into a possible next patch release)

@perrotta
Copy link
Contributor

type bug

@mandrenguyen
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