allow `TriggerResultsFilter` to throw for invalid `HLTPathStatus` patterns
PR description:
This PR updates the TriggerResultsFilter plugin to spot patterns without any valid matches when HLTPathStatus collections are used (i.e. when usePathStatus=True).
Up to now throw=True had no effect if usePathStatus=True, even if triggerConditions contained patterns with no valid matches amongst the Paths in the job.
All TriggerResultsFilter instances in the central HLT menus use throw=True, and since many use usePathStatus=True, those could in principle silently return False due to invalid patterns (in practise, those patterns are often controlled by the ConfDB GUI, so should be correct).
After this PR, invalid patterns for HLTPathStatus collections will lead to an exception if throw=True.
While testing these changes, small updates were applied to the unit-tests for TriggerResultsFilter. In particular, TriggerResultsFilter modules with valid patterns now use throw=True, while those with invalid patterns are those with throw=False.
Thanks to @fwyzard for much help with the implementation; I tag him to review these changes.
PR validation:
Private tests with the relevant unit-tests.
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:
A backport to 12_4_X is not necessary, but might be useful.
+code-checks
Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-39044/31534
- This PR adds an extra 20KB to repository
A new Pull Request was created by @missirol (Marino Missiroli) for master.
It involves the following packages:
- HLTrigger/HLTcore (hlt)
- HLTrigger/HLTfilters (hlt)
@cmsbuild, @missirol, @Martin-Grunewald can you please review it and eventually sign? Thanks. @Martin-Grunewald, @silviodonato, @fwyzard this is something you requested to watch as well. @perrotta, @dpiparo, @qliphy, @rappoccio you are the release manager for this.
cms-bot commands are listed here
+code-checks
Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-39044/31745
- This PR adds an extra 20KB to repository
Pull request #39044 was updated. @cmsbuild, @missirol, @Martin-Grunewald can you please check and sign again.
type bugfix
A small fix, but a fix nonetheless. TSG asked to eventually backport this to 12_4_X.
please test
The last push
- rebases the PR after the integration of #39108,
- includes the update to test cfgs discussed in https://github.com/cms-sw/cmssw/pull/39044#discussion_r945686075,
- and adds one additional update discussed in https://github.com/cms-sw/cmssw/pull/39044#discussion_r953173707.
+1
Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-5b5fbc/27036/summary.html
COMMIT: e355f21d36c73b01e3e1a286c7da202048600602
CMSSW: CMSSW_12_5_X_2022-08-23-2300/el8_amd64_gcc10
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week1/cms-sw/cmssw/39044/27036/install.sh to create a dev area with all the needed externals and cmssw changes.
Comparison Summary
Summary:
- No significant changes to the logs found
- Reco comparison results: 0 differences found in the comparisons
- DQMHistoTests: Total files compared: 51
- DQMHistoTests: Total histograms compared: 3693084
- DQMHistoTests: Total failures: 2
- DQMHistoTests: Total nulls: 0
- DQMHistoTests: Total successes: 3693060
- DQMHistoTests: Total skipped: 22
- DQMHistoTests: Total Missing objects: 0
- DQMHistoSizes: Histogram memory added: 0.0 KiB( 50 files compared)
- Checked 212 log files, 49 edm output root files, 51 DQM output files
- TriggerResults: no differences found
+hlt
- updates
TriggerResultsFilterto throw an exception as expected (ifthrow=True) ifusePathStatus=Trueand the specified trigger-results patterns have no matches - in addition, if
throw=True,TriggerResultsFilterwill now throw an exception if the parsing of the trigger-results expression fails (up to now, this only led to a warning)
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. @perrotta, @dpiparo, @qliphy, @rappoccio (and backports should be raised in the release meeting by the corresponding L2)
+1