-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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 site-local-config.xml parsing when subsite tag has no element #39727
Fix site-local-config.xml parsing when subsite tag has no element #39727
Conversation
@nhduongvn, CMSSW_12_6_X branch is closed for direct updates. cms-bot is going to move this PR to master branch. |
+code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-39727/32566
|
A new Pull Request was created by @nhduongvn for master. It involves the following packages:
@cmsbuild, @smuzaffar, @Dr15Jones, @makortel can you please review it and eventually sign? Thanks. cms-bot commands are listed here |
@cmsbuild, please test |
+1 Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-2b4b57/28242/summary.html Comparison Summary@slava77 comparisons for the following workflows were not done due to missing matrix map:
Summary:
|
filename_storage = siteconfig_path + "/../../" + aDataCatalog.storageSite + "/storage.json"; | ||
filename_storage = siteconfig_path + "/../../" + aDataCatalog.storageSite; | ||
} | ||
filename_storage = filename_storage.string() + "/storage.json"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about
filename_storage = filename_storage.string() + "/storage.json"; | |
filename_storage /= "storage.json"; |
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, it is better
cms::Exception ex("SiteLocalConfigService"); | ||
ex << "Fail to convert path to the storage description, " << filename_storage.string() | ||
<< ", to the canonical absolute path" | ||
<< ". Path exists?"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it be useful to include e.what()
in the exception message?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see e.what()
just says "std::exception" when path does not exist, which try
catches. I see no benefit of including e.what()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok.
@@ -341,7 +350,7 @@ namespace edm { | |||
// The Site Config has the following format | |||
// <site-local-config> | |||
// <site name="FNAL"> | |||
// <subsite name="FNAL_SUBSITE"> | |||
// <subsite name="FNAL_SUBSITE"/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(commenting in somewhat random place)
How about adding a check that the subsite
element has no children?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, we can add extra guard for wrong format of site-local-config.xml
efe8149
to
848f930
Compare
+code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-39727/32602
|
Pull request #39727 was updated. @cmsbuild, @smuzaffar, @Dr15Jones, @makortel can you please check and sign again. |
@cmsbuild, please test |
848f930
to
9202779
Compare
+code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-39727/32617
|
Pull request #39727 was updated. @cmsbuild, @smuzaffar, @Dr15Jones, @makortel can you please check and sign again. |
@cmsbuild, please test |
+1 Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-2b4b57/28343/summary.html Comparison SummarySummary:
|
+1 |
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, @rappoccio (and backports should be raised in the release meeting by the corresponding L2) |
+1 |
PR description:
This PR fixes site-local-config.xml parsing when subsite tag has no element:
<site name=...>
<subsite name=.../>
...
<site/>
This PR is related to #37278 where subsite tag is extracted to locate storage description, storage.json. The extraction here uses subsite tag containing all elements (<data-access>, <local-stage-out>....).
The symbolic links in path to the storage.json is also resolved using filesystem::path::canonical
PR validation:
All tests in FWCore/Services/test are performed (scram b runtests)