Skip to content

Conversation

@davlum
Copy link
Contributor

@davlum davlum commented Apr 1, 2021

Before this commit there was a documented but unenforced
limitation that the extra parameter be encoded JSON.
In #15013 this issue garnered attention and motivated
this PR.


^ Add meaningful description above

Read the Pull Request Guidelines for more information.
In case of fundamental code change, 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 UPDATING.md.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mik-laj has suggested we should forbid the case where json.loads(extra) produces a list or primitive

anyone else agree with that?

@davlum davlum force-pushed the upkeep/add-query-parameter-validation-on-connection branch from 275efab to e8ba6e1 Compare April 3, 2021 14:04
@dimberman dimberman self-requested a review April 5, 2021 17:58
@dimberman
Copy link
Contributor

Hey @davlum, been a minute!

Could you add a unit test? After that I'm good to merge.

@dstandish
Copy link
Contributor

dstandish commented Apr 5, 2021

alternatively we could continute to allow users to put arbitrary string in extra, but change extra_dejson so that it returns self.extra in that case (instead of empty dict)

@davlum davlum force-pushed the upkeep/add-query-parameter-validation-on-connection branch from e8ba6e1 to 96c38e3 Compare April 7, 2021 15:58
@davlum
Copy link
Contributor Author

davlum commented Apr 7, 2021

@dimberman waddup!

Added tests but tbh I'm also down for what @dstandish suggested. It would be more backwards compat.

Before this commit there was a documented but unenforced
limitation that the extra parameter be encoded JSON.
In apache#15013 this issue garnered attention and motivated
this PR.
@davlum davlum force-pushed the upkeep/add-query-parameter-validation-on-connection branch from 96c38e3 to 0e99f96 Compare April 8, 2021 14:19
@github-actions
Copy link

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed in 5 days if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the stale Stale PRs per the .github/workflows/stale.yml policy file label May 24, 2021
@github-actions github-actions bot closed this May 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

stale Stale PRs per the .github/workflows/stale.yml policy file

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants