Fix LookerHook serialize missing 1 argument error #34678
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a ticket open for this back in March (#30169), it was closed out due to inactivity and there was a comment that it was related to an upstream issue in
looker_sdk
. I took a look at the issue inlooker_sdk
and it didn't quite seem like the same thing.After digging in, I believe this is simply a typo in the hook's
get_looker_sdk()
method and the40
was left off by mistake. Adding the40
back on here fixes the issues in my local environment. I can't seem to find any reason it would be desirable to useserialize.serialize
there, and in fact looker_sdk usesserialize40
here.You can see here in the
looker_sdk
repo that during init we useserialize.serialize40
, whereas inLookerHook
we useserialize.serialize
.serialize.serialize
points here, where it expects aconverter
to be passed in.serialize.serialize40
points here, where there is a defaultconverter
set.This becomes problematic when you want to do something with the sdk from
LookerHook
when calling a method usingpost
, likecreate_query
.An example - when we try to do something like this, we get an error due to the missing
converter
:This generates the error:
TypeError: serialize() missing 1 required keyword-only argument: 'converter'
^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in a newsfragment file, named
{pr_number}.significant.rst
or{issue_number}.significant.rst
, in newsfragments.