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

Fix product labels for tokens in VolumeBasedMagneticFieldESProducer #27751

Merged

Conversation

makortel
Copy link
Contributor

PR description:

The PR #27412 that migrated VolumeBasedMagneticFieldESProducer to use ESGetToken introduced two bugs (thanks to @cvuosalo for reporting): the product labels for the cpvToken_ and paramFieldToken_ were left unset while the corresponding get() calls did have values before #27412. This PR adds the labels back (and is part of #26748).

PR validation:

Code compiles.

These were in the get() calls before the consumes migration
@cmsbuild
Copy link
Contributor

The code-checks are being triggered in jenkins.

@cmsbuild
Copy link
Contributor

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-27751/11401

  • This PR adds an extra 12KB to repository

@cmsbuild
Copy link
Contributor

A new Pull Request was created by @makortel (Matti Kortelainen) for master.

It involves the following packages:

MagneticField/GeomBuilder

@perrotta, @cmsbuild, @slava77 can you please review it and eventually sign? Thanks.
@namapane this is something you requested to watch as well.
@davidlange6, @slava77, @fabiocos you are the release manager for this.

cms-bot commands are listed here

@makortel
Copy link
Contributor Author

@cmsbuild, please test

@cmsbuild
Copy link
Contributor

cmsbuild commented Aug 12, 2019

The tests are being triggered in jenkins.
https://cmssdt.cern.ch/jenkins/job/ib-run-pr-tests/1973/console Started: 2019/08/12 17:54

@cvuosalo
Copy link
Contributor

@makortel: What tests have been or will be done to validate this change? I ask because I would like to know the best way to test this code. I wrote a test config in my PR #27674:

https://github.com/cms-sw/cmssw/pull/27674/files#diff-9221e02eecfe8f14258a20b915321e23

Do you think my test config is correctly written, or do you have a better one?

@cmsbuild
Copy link
Contributor

@cmsbuild
Copy link
Contributor

Comparison job queued.

@makortel
Copy link
Contributor Author

@cvuosalo

What tests have been or will be done to validate this change?

As I wrote in the PR description, I only tested that the code compiles. Beyond that I'm relying on our e-mail discussion some weeks ago.

I ask because I would like to know the best way to test this code. I wrote a test config in my PR #27674:
https://github.com/cms-sw/cmssw/pull/27674/files#diff-9221e02eecfe8f14258a20b915321e23

Do you think my test config is correctly written, or do you have a better one?

I don't know, I'm not an expert in magnetic field. I did, however, took your configuration file
https://github.com/cms-sw/cmssw/blob/60f787da5de2abe5822decb59f3800c0a2a09587/MagneticField/GeomBuilder/test/python/testMagGeometryOldDD.py
and it ran fine with this PR.

@namapane
Copy link
Contributor

That's enough; however, to answer Carlo's question, the best test is MagneticField/Engine/test/regression.py (which by default uses the map builder from xml, so would require no modifications to test this PR).
This is a test of the full MF and not only of the geomery part (that's why it is not under GeomBuilder).

@makortel
Copy link
Contributor Author

That's enough; however, to answer Carlo's question, the best test is MagneticField/Engine/test/regression.py (which by default uses the map builder from xml, so would require no modifications to test this PR).
This is a test of the full MF and not only of the geomery part (that's why it is not under GeomBuilder).

@namapane Thanks for pointing out that test. I can confirm that with this PR that configuration works (while without it does not). Would it make sense to make that configuration to be run as part of the unit tests? If it were, the problems in #27412 would have been found earlier through IBs.

@namapane
Copy link
Contributor

I'm not sure, what we are testing here is a special producer that is in place for development and special use cases only and not used in production. We could add it to unit tests but we should probably add the corresponding tests for the default producer as well. Before doing that I would prefer to complete the clean-up that is discussed in #27674.

@cmsbuild
Copy link
Contributor

Comparison is ready
https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-42c93a/1973/summary.html

Comparison Summary:

  • No significant changes to the logs found
  • Reco comparison results: 4 differences found in the comparisons
  • DQMHistoTests: Total files compared: 34
  • DQMHistoTests: Total histograms compared: 2939508
  • DQMHistoTests: Total failures: 2
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 2939165
  • DQMHistoTests: Total skipped: 341
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 0.0 KiB( 33 files compared)
  • Checked 142 log files, 14 edm output root files, 34 DQM output files

@slava77
Copy link
Contributor

slava77 commented Aug 15, 2019

+1

for #27751 53a4e54

  • code changes are in line with the PR description
  • jenkins tests pass and comparisons with the baseline show no differences

@namapane which workflow would actually show some differences?
Is it going to show up in 0T?

@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. @davidlange6, @slava77, @smuzaffar, @fabiocos (and backports should be raised in the release meeting by the corresponding L2)

@cvuosalo
Copy link
Contributor

@slava77: I don't think this producer is used in any workflow. It is only called from certain test scripts, like the MagneticField/Engine/test/regression.py mentioned above. It is not called by the unit tests.

@makortel
Copy link
Contributor Author

I don't think this producer is used in any workflow. It is only called from certain test scripts, like the MagneticField/Engine/test/regression.py mentioned above. It is not called by the unit tests.

If this esproducer would be tested in any IB tests, the infinite recursion etc caused by omitting the labels would have been caught earlier...

@slava77
Copy link
Contributor

slava77 commented Aug 15, 2019

If this esproducer would be tested in any IB tests, the infinite recursion etc caused by omitting the labels would have been caught earlier...

I somehow thought that the ES get will give you a record with a label silently, if that's the only known/registered record for a given payload type.

@makortel
Copy link
Contributor Author

If this esproducer would be tested in any IB tests, the infinite recursion etc caused by omitting the labels would have been caught earlier...

I somehow thought that the ES get will give you a record with a label silently, if that's the only known/registered record for a given payload type.

Nope, the product label is used in the product look-up in addition to the product type and the record (and an empty label is still a label).

The module label, on the other hand, is not used in the product look-up, but if it is non-empty in the consuming ESInputTag, the label is checked after the product has been found (and an exception is thrown if they are not equal).

@fabiocos
Copy link
Contributor

+1

although this is not creating issues in the usual test workflows it is anyway a fix for an incorrect behaviour to be added

@cmsbuild cmsbuild merged commit 605abf9 into cms-sw:master Aug 15, 2019
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

6 participants