-
Notifications
You must be signed in to change notification settings - Fork 107
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
Python (standard library) implementation of update pileup object script #11872
Conversation
Jenkins results:
|
Jenkins results:
|
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.
Thank you for providing this script, Valentin. In addition to the comments made along the code, I forgot to mention that we could have adopted the standard print function statements instead of logging, given that it has no dependency in any other WMCore library. If you still want to change that, please go ahead.
Jenkins results:
|
Jenkins results:
|
Jenkins results:
|
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.
@vkuznet Valentin, these changes look good to me. Before we merge it, I would ask you to:
a) squash all the commits into a single commit
b) test updating one pileup document against your dev k8s cluster (or testbed)
Once you are happy with these tests, we can get it merged. Thanks
bb023ba
to
210cec0
Compare
Jenkins results:
|
Alan, I made an additional change to properly encode passed json data, please review last commit f846361 All other commits are squashed. And, with my last fix I was able to update testbed docs. For that I used the following document located at
and I call the script as following:
I inspected the logger output and it dumped that all documents were updated. I fetched new docs from testbed via curl call to Said that, I can squash last commit after your additional review. It was required since otherwise we were passing Moreover, I realized that this script can be used used ONLY for static change applied to all documents. In other words, if we want to add transition records this script will not be helpful as transition record need a customName equal to pileup name according to your gist section 2. In order to use this script we'll need to add additional code to read record, take its pileup name, and create transition record with it. |
Jenkins results:
|
Looks good to me. Please squash the last 2 commits into a single one. For the transition record, we can update this script once it becomes necessary. Potentially we don't even need to push upstream the transition logic. |
f846361
to
2af6300
Compare
squashing is done |
Jenkins results:
|
Thanks Valentin. |
Fixes #11867
Status
ready
Description
A new replacement of Alan's WMCore/pycurl based Python script introduced in #11868
This script is based on Python standard library and does not require any third party or WMCore dependencies. It uses the MSPileup REST API to fetch all of the pileup documents, update each of them with data provided via a JSON file, then update those documents back in MSPileup (through a PUT http call).
Is it backward compatible (if not, which system it affects?)
YES
Related PRs
#11868
External dependencies / deployment changes