You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "alextgu (via GitHub)" <gi...@apache.org> on 2023/04/20 23:00:09 UTC
[GitHub] [airflow] alextgu opened a new pull request, #30781: Add template field to S3ToRedshiftOperator
alextgu opened a new pull request, #30781:
URL: https://github.com/apache/airflow/pull/30781
<!--
Thank you for contributing! Please make sure that your code changes
are covered with tests. And in case of new features or big changes
remember to adjust the documentation.
Feel free to ping committers for the review!
In case of an existing issue, reference it using one of the following:
closes: #ISSUE
related: #ISSUE
How to write a good git commit message:
http://chris.beams.io/posts/git-commit/
-->
Add template field for `method` for `S3ToRedshiftOperator`
---
**^ Add meaningful description above**
Read the **[Pull Request Guidelines](https://github.com/apache/airflow/blob/main/CONTRIBUTING.rst#pull-request-guidelines)** for more information.
In case of fundamental code changes, an Airflow Improvement Proposal ([AIP](https://cwiki.apache.org/confluence/display/AIRFLOW/Airflow+Improvement+Proposals)) is needed.
In case of a new dependency, check compliance with the [ASF 3rd Party License Policy](https://www.apache.org/legal/resolved.html#category-x).
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](https://github.com/apache/airflow/tree/main/newsfragments).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] boring-cyborg[bot] commented on pull request #30781: Add template field to S3ToRedshiftOperator
Posted by "boring-cyborg[bot] (via GitHub)" <gi...@apache.org>.
boring-cyborg[bot] commented on PR #30781:
URL: https://github.com/apache/airflow/pull/30781#issuecomment-1517039161
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 Contribution Guide (https://github.com/apache/airflow/blob/main/CONTRIBUTING.rst)
Here are some useful points:
- Pay attention to the quality of your code (ruff, mypy and type annotations). Our [pre-commits]( https://github.com/apache/airflow/blob/main/STATIC_CODE_CHECKS.rst#prerequisites-for-pre-commit-hooks) 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](https://github.com/apache/airflow/blob/main/docs/apache-airflow/howto/custom-operator.rst) Consider adding an example DAG that shows how users should use it.
- Consider using [Breeze environment](https://github.com/apache/airflow/blob/main/BREEZE.rst) 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](https://www.apache.org/foundation/policies/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]( https://github.com/apache/airflow/blob/main/CONTRIBUTING.rst#coding-style-and-best-practices).
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
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] o-nikolas merged pull request #30781: Add template field to S3ToRedshiftOperator
Posted by "o-nikolas (via GitHub)" <gi...@apache.org>.
o-nikolas merged PR #30781:
URL: https://github.com/apache/airflow/pull/30781
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] josh-fell commented on a diff in pull request #30781: Add template field to S3ToRedshiftOperator
Posted by "josh-fell (via GitHub)" <gi...@apache.org>.
josh-fell commented on code in PR #30781:
URL: https://github.com/apache/airflow/pull/30781#discussion_r1173227629
##########
airflow/providers/amazon/aws/transfers/s3_to_redshift.py:
##########
@@ -76,6 +76,7 @@ class S3ToRedshiftOperator(BaseOperator):
"column_list",
"copy_options",
"redshift_conn_id",
+ "method",
Review Comment:
The validation in the constructor of `self.method` against `AVAILABLE_METHODS` will need to move to the `execute()` method of this operator. Templated values are not rendered until _right before_ the `execute()` method is called. So, if a `method`arg is a Jinja expression or an XComArg, those explicit values will be checked against `AVAILABLE_METHODS` instead of the rendered value and the task will fail.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] boring-cyborg[bot] commented on pull request #30781: Add template field to S3ToRedshiftOperator
Posted by "boring-cyborg[bot] (via GitHub)" <gi...@apache.org>.
boring-cyborg[bot] commented on PR #30781:
URL: https://github.com/apache/airflow/pull/30781#issuecomment-1535467623
Awesome work, congrats on your first merged pull request! You are invited to check our [Issue Tracker](https://github.com/apache/airflow/issues) for additional contributions.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] o-nikolas commented on pull request #30781: Add template field to S3ToRedshiftOperator
Posted by "o-nikolas (via GitHub)" <gi...@apache.org>.
o-nikolas commented on PR #30781:
URL: https://github.com/apache/airflow/pull/30781#issuecomment-1535411710
I patched the tests so that the build is green. @vincbeck or @josh-fell can you have a very quick look?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] eladkal commented on a diff in pull request #30781: Add template field to S3ToRedshiftOperator
Posted by "eladkal (via GitHub)" <gi...@apache.org>.
eladkal commented on code in PR #30781:
URL: https://github.com/apache/airflow/pull/30781#discussion_r1195659348
##########
airflow/providers/amazon/aws/transfers/s3_to_redshift.py:
##########
@@ -76,6 +76,7 @@ class S3ToRedshiftOperator(BaseOperator):
"column_list",
"copy_options",
"redshift_conn_id",
+ "method",
Review Comment:
We need to complete https://github.com/apache/airflow/issues/29069 so that test suite will notify us about these issues automatically but so far no one had the time to complete it.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] alextgu commented on a diff in pull request #30781: Add template field to S3ToRedshiftOperator
Posted by "alextgu (via GitHub)" <gi...@apache.org>.
alextgu commented on code in PR #30781:
URL: https://github.com/apache/airflow/pull/30781#discussion_r1178501991
##########
airflow/providers/amazon/aws/transfers/s3_to_redshift.py:
##########
@@ -76,6 +76,7 @@ class S3ToRedshiftOperator(BaseOperator):
"column_list",
"copy_options",
"redshift_conn_id",
+ "method",
Review Comment:
Thanks @josh-fell, I moved the check to the `execute()` method
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] o-nikolas commented on a diff in pull request #30781: Add template field to S3ToRedshiftOperator
Posted by "o-nikolas (via GitHub)" <gi...@apache.org>.
o-nikolas commented on code in PR #30781:
URL: https://github.com/apache/airflow/pull/30781#discussion_r1174138535
##########
airflow/providers/amazon/aws/transfers/s3_to_redshift.py:
##########
@@ -76,6 +76,7 @@ class S3ToRedshiftOperator(BaseOperator):
"column_list",
"copy_options",
"redshift_conn_id",
+ "method",
Review Comment:
Fantastic catch Josh :+1:
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] josh-fell commented on pull request #30781: Add template field to S3ToRedshiftOperator
Posted by "josh-fell (via GitHub)" <gi...@apache.org>.
josh-fell commented on PR #30781:
URL: https://github.com/apache/airflow/pull/30781#issuecomment-1524369718
@alextgu Can you take a look at the failing tests when you get a chance?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org