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

Add support for wildcard in EDAlias type field #31269

Merged
merged 3 commits into from
Sep 3, 2020

Conversation

makortel
Copy link
Contributor

PR description:

This PR adds support for wildcard in EDAlias type field, i.e.

alias = cms.EDAlias(
    module = cms.VPSet(
        cms.PSet(
            type = cms.string("*")
        )
    )
)

For the case that the EDAlias should pick all products of a module, the following shorthand is included

alias = cms.EDAlias(
    module = cms.EDAlias.allProducts()
)

Resolves #29847

PR validation:

Framework unit tests pass

Also add a shorthand EDAlias.allProducts()
@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-31269/17950

@cmsbuild
Copy link
Contributor

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

It involves the following packages:

FWCore/Framework
FWCore/Integration
FWCore/ParameterSet

@makortel, @smuzaffar, @cmsbuild, @Dr15Jones can you please review it and eventually sign? Thanks.
@wddgit this is something you requested to watch as well.
@silviodonato, @dpiparo, @qliphy 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 27, 2020

The tests are being triggered in jenkins.

@cmsbuild
Copy link
Contributor

+1
Tested at: c0144f2
https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-d44067/8967/summary.html
CMSSW: CMSSW_11_2_X_2020-08-27-1100
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-d44067/8967/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: 2609667
  • DQMHistoTests: Total failures: 1
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 2609644
  • DQMHistoTests: Total skipped: 22
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 0.0 KiB( 34 files compared)
  • Checked 149 log files, 22 edm output root files, 35 DQM output files

Comment on lines +266 to +273
process.intalias = cms.EDAlias(
intprod = cms.EDAlias.allProducts(),
# can't use allProducts() because the product instance '' would lead to duplicate brances to be aliased
intprod2 = cms.VPSet(
cms.PSet(type = cms.string('*'), fromProductInstance = cms.string('foo2')),
cms.PSet(type = cms.string('*'), fromProductInstance = cms.string('another2')),
)
)
Copy link
Contributor

Choose a reason for hiding this comment

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

does this mean that

alias = cms.EDAlias(
    module = cms.VPSet(
        cms.PSet(
            type = cms.string("*")
        )
    )
)

and the allProducts() shorthand work only if a module does not produce multiple collections with the same type ?

Copy link
Contributor Author

@makortel makortel Aug 28, 2020

Choose a reason for hiding this comment

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

does this mean that ... and the allProducts() shorthand work only if a module does not produce multiple collections with the same type ?

It does not. The first added test

process.intalias = cms.EDAlias(intprod = cms.EDAlias.allProducts())

tests exactly that, creating an EDAlias for a module that produces three edmtest::IntProduct collections.

This test tests a case where products from two modules are aliased-for in a single EDAlias, and that type type wildcard works there as well. Because of my laziness of constructing the test (essentially the intprod and intprod2 producing products of the same type, and both producing a product without product instance name) the simpler

process.intalias = cms.EDAlias(
    intprod = cms.EDAlias.allProducts(),
    intprod2 = cms.EDAlias.allProducts(),
)

would lead to two products of (edmtest::IntProduct, "intalias", "", "TEST"), which is not allowed.

Copy link
Contributor

Choose a reason for hiding this comment

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

Ah, I see, the conflict would be between two modules producing a collection with the same type and label.

@makortel
Copy link
Contributor Author

@wddgit Could you review the changes? Thanks.

@wddgit
Copy link
Contributor

wddgit commented Aug 28, 2020

Yes. I will review it today.

@cmsbuild
Copy link
Contributor

cmsbuild commented Sep 2, 2020

The code-checks are being triggered in jenkins.

@cmsbuild
Copy link
Contributor

cmsbuild commented Sep 2, 2020

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-31269/18104

@cmsbuild
Copy link
Contributor

cmsbuild commented Sep 2, 2020

Pull request #31269 was updated. @makortel, @smuzaffar, @cmsbuild, @Dr15Jones can you please check and sign again.

@makortel
Copy link
Contributor Author

makortel commented Sep 2, 2020

@cmsbuild, please test

@cmsbuild
Copy link
Contributor

cmsbuild commented Sep 2, 2020

The tests are being triggered in jenkins.

@cmsbuild
Copy link
Contributor

cmsbuild commented Sep 2, 2020

+1
Tested at: 5340da8
https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-d44067/9079/summary.html
CMSSW: CMSSW_11_2_X_2020-09-01-2300
SCRAM_ARCH: slc7_amd64_gcc820

@cmsbuild
Copy link
Contributor

cmsbuild commented Sep 2, 2020

Comparison job queued.

@cmsbuild
Copy link
Contributor

cmsbuild commented Sep 2, 2020

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

Comparison Summary:

  • No significant changes to the logs found
  • Reco comparison results: 2 differences found in the comparisons
  • DQMHistoTests: Total files compared: 35
  • DQMHistoTests: Total histograms compared: 2609667
  • DQMHistoTests: Total failures: 5
  • DQMHistoTests: Total nulls: 1
  • DQMHistoTests: Total successes: 2609639
  • DQMHistoTests: Total skipped: 22
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 0.004 KiB( 34 files compared)
  • DQMHistoSizes: changed ( 10224.0 ): 0.004 KiB MessageLogger/Warnings
  • Checked 149 log files, 22 edm output root files, 35 DQM output files

@makortel
Copy link
Contributor Author

makortel commented Sep 2, 2020

+1

@cmsbuild
Copy link
Contributor

cmsbuild commented Sep 2, 2020

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. @silviodonato, @dpiparo, @qliphy (and backports should be raised in the release meeting by the corresponding L2)

@qliphy
Copy link
Contributor

qliphy commented Sep 3, 2020

+1

@cmsbuild cmsbuild merged commit f2d3972 into cms-sw:master Sep 3, 2020
@makortel makortel deleted the edaliasAllProducts branch September 4, 2020 01:38
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.

implement more firendly syntax for using EDAlias
5 participants