Skip to content
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

Add support for semicolon stripping to DbApiHook, PrestoHook, and TrinoHook #41916

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

Illumaria
Copy link

Closes #34828

Copy link

boring-cyborg bot commented Aug 31, 2024

Congratulations on your first Pull Request and welcome to the Apache Airflow community! If you have any issues or are unsure about any anything please check our Contributors' Guide (https://github.com/apache/airflow/blob/main/contributing-docs/README.rst)
Here are some useful points:

  • Pay attention to the quality of your code (ruff, mypy and type annotations). Our pre-commits will help you with that.
  • In case of a new feature add useful documentation (in docstrings or in docs/ directory). Adding a new operator? Check this short guide Consider adding an example DAG that shows how users should use it.
  • Consider using Breeze environment for testing locally, it's a heavy docker but it ships with a working Airflow and a lot of integrations.
  • Be patient and persistent. It might take some time to get a review or get the final approval from Committers.
  • Please follow ASF Code of Conduct for all communication including (but not limited to) comments on Pull Requests, Mailing list and Slack.
  • Be sure to read the Airflow Coding style.
  • Always keep your Pull Requests rebased, otherwise your build might fail due to changes not related to your commits.
    Apache Airflow is a community-driven project and together we are making it better 🚀.
    In case of doubts contact the developers at:
    Mailing List: dev@airflow.apache.org
    Slack: https://s.apache.org/airflow-slack

@potiuk
Copy link
Member

potiuk commented Sep 1, 2024

You will have to:

  1. bump common.sql minor version (new feature) in airfow/providers/common/sql/provider.yaml
  2. In all modified providers you will have to update dependency in provider yaml to be: common-sql >= THE(_NEW_COMMON_SQL_VERSION

@Illumaria
Copy link
Author

Whoops... Sorry. 🙏🏻

airflow/providers/common/sql/provider.yaml Outdated Show resolved Hide resolved
airflow/providers/presto/provider.yaml Outdated Show resolved Hide resolved
@eladkal
Copy link
Contributor

eladkal commented Sep 6, 2024

@Illumaria can you address the needed changes? I'm hoping to include this PR in the next release

@eladkal
Copy link
Contributor

eladkal commented Sep 6, 2024

needs rebase and resolve conflicts

@Illumaria
Copy link
Author

@eladkal Sure, I’ll do it by the end of the weekend.

@potiuk potiuk requested a review from eladkal September 7, 2024 11:05
@Illumaria
Copy link
Author

@eladkal Hi! Could you please help me understand what I should do to fix the failing tests? :(

@potiuk
Copy link
Member

potiuk commented Sep 9, 2024

@eladkal Hi! Could you please help me understand what I should do to fix the failing tests? :(

There are regular unit tests failing and they should be fixed. For compatibility tests - when they fail, they point you with the link to the documentation that desribes possible approaches and shows some examples how to deal with compatibility tests, and there are a number of examples already implemented in the code:

https://github.com/apache/airflow/blob/main/contributing-docs/testing/unit_tests.rst#compatibility-provider-unit-tests-against-older-airflow-releases

@eladkal
Copy link
Contributor

eladkal commented Sep 11, 2024

@eladkal Hi! Could you please help me understand what I should do to fix the failing tests? :(

=========================== short test summary info ============================ FAILED tests/providers/google/cloud/openlineage/test_mixins.py::TestBigQueryOpenLineageMixin::test_bq_job_information - TypeError: split() got an unexpected keyword argument 'strip_semicolon' FAILED tests/providers/google/cloud/openlineage/test_mixins.py::TestBigQueryOpenLineageMixin::test_bq_script_job_information - TypeError: split() got an unexpected keyword argument 'strip_semicolon' FAILED tests/providers/google/cloud/operators/test_bigquery.py::TestBigQueryInsertJobOperator::test_execute_openlineage_events - TypeError: split() got an unexpected keyword argument 'strip_semicolon' FAILED tests/providers/google/cloud/operators/test_bigquery.py::TestBigQueryInsertJobOperator::test_execute_fails_openlineage_events - TypeError: split() got an unexpected keyword argument 'strip_semicolon' ============ 4 failed, 4159 passed, 63 skipped in 271.27s (0:04:31) ============

@eladkal
Copy link
Contributor

eladkal commented Sep 16, 2024

@Illumaria were you able to work on fixing the test?

@Illumaria
Copy link
Author

@Illumaria were you able to work on fixing the test?

No, not yet. :( I’m away from home now, will be back on September 30th.

Good news is I kinda need these changes for my work, so I won’t leave this request unfinished.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Trino SQL split trailing semi-colon
3 participants