-
Notifications
You must be signed in to change notification settings - Fork 108
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 MSTransferor typo calling getName method #11031
Conversation
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.
That's perfect!
Thanks @amaltaro
Jenkins results:
|
I discussed this with Imran and he agreed to get this tested in production, before cutting a new release. It does fix the problem, but now we hit another issue when creating the alert with the alert manager tool:
|
@amaltaro , this is typical error in Go when someone provide wrong data type. There is some data structure in alert manager which is used to marshal your data. The error message specifies it correctly: "json: cannot unmarshal number into Go struct field Alert.labels of type model.LabelValue". It means that your POST data contains a value which is not a number, e.g. you pass string as integer, etc. To identify the problem you should find, and better add to your traceback, the POST payload data. Then it would be clear to see which JSON attribute has a wrong data type. |
Thanks for looking into it, Valentin. I was indeed about to tag you. I fail to see any changes related to the way we create these alerts and/or anything in the underlying layer (AlertManagerAPI and pycurl_manager). Was there any change on the other side when handling these alerts? Just for the record, one can reproduce this problem from the ms-transferor pod, with the following recipe:
then in the python interpreter, something like:
Hmm, perhaps a minor pycurl upgrade that we had in the last weeks is affecting this... debugging. |
@vkuznet dumping the json passed to pycurl_manager (RequestHandler), here it is:
are you able to spot any problem with this data structure? |
I think I know what the problem is, likely with the |
We moved from positional + keyword arguments (in an old WMCore tag): to a positional-only mode: thus, setting the wrong parameters on the |
@amaltaro , sorry I was resolving another disaster on k8s cluster. I'm glad you spot the issue, but the main problem is really lack of data-type checking in Python. |
I think the proper way is to check each data type you use, but it will require additional coding and checking all attributes of data structure. If 'tag' is a string, then you should check its values to be string, etc. |
Fixes #11030
Status
ready
Description
The title says it all, correct the method name called for the
Workflow
object, which should begetName()
.Is it backward compatible (if not, which system it affects?)
YES
Related PRs
Complement to #10959
External dependencies / deployment changes
None