Skip to content

Conversation

@tnyz
Copy link
Contributor

@tnyz tnyz commented Oct 1, 2021

Update parameter to reflect expected usage while maintaining backwards compatibility.

^ 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.

@tnyz tnyz requested a review from turbaszek as a code owner October 1, 2021 17:18
@boring-cyborg boring-cyborg bot added area:providers provider:google Google (including GCP) related issues labels Oct 1, 2021
@github-actions github-actions bot added the okay to merge It's ok to merge this PR as it does not require more tests label Oct 1, 2021
@github-actions
Copy link

github-actions bot commented Oct 1, 2021

The PR is likely OK to be merged with just subset of tests for default Python and Database versions without running the full matrix of tests, because it does not modify the core of Airflow. If the committers decide that the full tests matrix is needed, they will add the label 'full tests needed'. Then you should rebase to the latest main or amend the last commit of the PR, and push it with --force-with-lease.

Comment on lines +1149 to +1152
if not bucket:
raise ValueError("`bucket` is required when not using `table_resource`.")
if not source_objects:
raise ValueError("`source_objects` is required when not using `table_resource`.")
Copy link
Member

Choose a reason for hiding this comment

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

These should be TypeError IMO.

Copy link
Member

Choose a reason for hiding this comment

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

I think ValueError is more correct.

Passing arguments of the wrong type (e.g. passing a list when an int is expected) should result in a TypeError, but passing arguments with the wrong value (e.g. a number outside expected boundaries) should result in a ValueError.

This case is more of "wrong arguments" not "arguments types".

Copy link
Member

Choose a reason for hiding this comment

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

Agree with Tomek. Value error is good here.

@potiuk potiuk closed this Oct 9, 2021
@potiuk potiuk reopened this Oct 9, 2021
@potiuk
Copy link
Member

potiuk commented Oct 9, 2021

Reopened to rebuild

@potiuk
Copy link
Member

potiuk commented Oct 9, 2021

Static checks failing

@tnyz tnyz closed this Oct 11, 2021
@tnyz tnyz reopened this Oct 11, 2021
@tnyz
Copy link
Contributor Author

tnyz commented Oct 22, 2021

can someone with write access review and close this pr? thanks

@tnyz tnyz requested review from potiuk and uranusjr October 27, 2021 16:54
@uranusjr uranusjr merged commit e4aa377 into apache:main Oct 28, 2021
@tnyz tnyz deleted the improve-gcp-bq-external-table-operator-parameter branch November 1, 2021 17:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:providers okay to merge It's ok to merge this PR as it does not require more tests provider:google Google (including GCP) related issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants