Skip to content

Conversation

@ferruzzi
Copy link
Contributor

Does what it says on the tin; adds sample dag and docs for an existing transfer.

Part of a project to simplify and standardize AWS sample dags and docs in preparation for adding System Testing.

Related: #21523
Related: #21475
Related: #21828
Related: #21920
etc...


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

Choose a reason for hiding this comment

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

I've removed this from others as I go through them, but in this case I thought it was a nice touch to add a disclaimer that the DAG won't run without prior setup. I can remove it if we would rather keep it uniform.

@ferruzzi ferruzzi force-pushed the ferruzzi/docs-update/hive-to-dynamo branch from 1dc40ec to 9b17c38 Compare March 24, 2022 23:32
@ferruzzi
Copy link
Contributor Author

ferruzzi commented Mar 25, 2022

Gah. PyCharm flagged that as a warning but it passed the local CI (./scripts/ci/testing/ci_run_airflow_testing.sh) so I thought it should pass here. Is there another way to use the task decorator in this case or should I convert it to a PythonOperator?

@ferruzzi
Copy link
Contributor Author

Looks like chain() doesn't like @task decorated methods. Posted to the Slack server to discuss fix: https://apache-airflow.slack.com/archives/CCPRP7943/p1648498867915099

Option1) Convert the @tasks to PythonOperators.
Option 2) Replace chain() with the bitwise notation.
Option 3) "Fix" chain so it accepts the @task notated methods.
Option 4) Something else I haven't considered.

@potiuk
Copy link
Member

potiuk commented Mar 29, 2022

Option 2) Replace chain() with the bitwise notation.

Followed by

Option 3) "Fix" chain so it accepts the @task notated methods.

In separate PR :)

@ferruzzi
Copy link
Contributor Author

Created an Issue for it. If someone else gets to it before me then even better: #22594

@ferruzzi ferruzzi force-pushed the ferruzzi/docs-update/hive-to-dynamo branch from 012beeb to d1a1490 Compare March 29, 2022 19:10
@ferruzzi
Copy link
Contributor Author

Rebased and fixed the chain() notation to bitwise for 2.1 compatibility.

Comment on lines 125 to 129
Copy link
Contributor

Choose a reason for hiding this comment

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

Should convert this to TaskFlow API as well.

Copy link
Contributor Author

@ferruzzi ferruzzi Mar 30, 2022

Choose a reason for hiding this comment

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

I couldn't figure out a way to do it with the trigger_rule. I had tried @task(trigger_rule='all_done') as seen in 36368e96d3543e5ae873f135808d50f29cbfbcb6 but that fails static checks.

See: https://apache-airflow.slack.com/archives/CCPRP7943/p1648228076933559

Copy link
Contributor

Choose a reason for hiding this comment

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

Wasn't that because using chain()with TaskFlow API was not compatible with Airflow 2.1? You should be able to pass a trigger_rule directly to the decorator like you're trying to do with Airflow 2.1+

Copy link
Contributor Author

@ferruzzi ferruzzi Mar 30, 2022

Choose a reason for hiding this comment

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

Alright, I'll revert that and see. Maybe I just misread the error message. I'm in a meeting, but should have it pushed within the hour

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That didn't age well. 😛 Rebased and pushed reversion.

@ferruzzi ferruzzi force-pushed the ferruzzi/docs-update/hive-to-dynamo branch from d1a1490 to 04ef561 Compare March 30, 2022 21:10
@ferruzzi ferruzzi closed this Mar 31, 2022
@ferruzzi ferruzzi reopened this Mar 31, 2022
@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 Mar 31, 2022
@github-actions
Copy link

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.

@ferruzzi
Copy link
Contributor Author

CI is green. That concludes this little adventure in misreading error messages. Thanks for the help Jarek and Josh.

@potiuk
Copy link
Member

potiuk commented Mar 31, 2022

@ferruzzi - your adventure was very, vey little. Read THIS #22548 (comment)

@potiuk potiuk merged commit 898d31e into apache:main Mar 31, 2022
@ferruzzi
Copy link
Contributor Author

@potiuk It was an adventure, not an Oddesy 😛

@ferruzzi ferruzzi deleted the ferruzzi/docs-update/hive-to-dynamo branch March 31, 2022 20:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:providers kind:documentation okay to merge It's ok to merge this PR as it does not require more tests provider:amazon AWS/Amazon - related issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants