Not recognizable column in query result

Description

This change in PLFM added a new field in the SelectColumn object: https://github.com/Sage-Bionetworks/Synapse-Repository-Services/pull/3348/files#diff-3391b309663d046c639a8b5ad69aa0d1
The Python client code does not recognize the new field. This cause error running table query against staging in both R and Python client. My test against staging:

If we release staging without a fix, all table queries in the Python client and synapser client will be broken.

Environment

None

Activity

Show:
Kimyen Truong
August 14, 2018, 6:50 PM
Kimyen Truong
August 14, 2018, 7:15 PM
Edited

The last change related to SelectColumn was made 4 years ago: https://github.com/Sage-Bionetworks/synapsePythonClient/blame/master/synapseclient/table.py

Spot checking other places in the client where we use DictObject. The constructor normally also take a **kwargs argument.

Notes on another bad practice that is related to **kwargs. When a function takes **kwargs argument, in many places, we pass this to the next function call. Sometimes, in many level function call, a value would be retrieved from **kwargs argument and used in important logic of the inner function. This makes the code very hard to read.

Kimyen Truong
August 14, 2018, 7:40 PM
Edited

I created to check the entire code base before fixing this issue. I talked to . Since we are going to reverse the change, I will try to eliminate this problem in the future. Hence, I will work on as part of the fix for this problem.

Kimyen Truong
August 14, 2018, 9:23 PM
Edited

Verified that other logic in the Python client also depends on the headers, but will not break:

Where in my test run, I print out:

and see

Which the first line has len 1 (1 dict) and the second has len 3.

Kimyen Truong
August 16, 2018, 12:31 AM

Assignee

Kimyen Truong

Reporter

Kimyen Truong

Labels

None

Validator

Ziming Dong

Development Area

None

Release Version History

None

Fix versions

Priority

Critical
Configure