-
Notifications
You must be signed in to change notification settings - Fork 6.6k
cleanup: Upgrade Composer samples to Airflow 2.0 #5782
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
Merged
Merged
Changes from all commits
Commits
Show all changes
31 commits
Select commit
Hold shift + click to select a range
442e4bc
modify dag_test_utils to point to branch; add airflow 2 changes
leahecole 1358f27
upgrade airflow_db_cleanup to Airflow 2.0
leahecole 5f99c94
upgrade hadoop tutorial to Airflow 2.0
leahecole 3b7c119
upgrade kubernetespodoperator to Airflow 2.0
leahecole 5a73d13
upgrade dataproc workflow template to Airflow 2.0
leahecole 861a7aa
remove bashoperator python2 example
leahecole bb69630
upgrade DataflowTemplateOperator tutorial to 2.0
leahecole 1412737
WIP: upgrade bq_notify to Airflow 2
leahecole 14943c4
upgrade bq_copy_across_locations to Airflow 2.0
leahecole f3cc166
upgrade connections to Airflow 2
leahecole 8ebece8
more airflow 2.0 migration
leahecole 95c842b
db reset update
leahecole cdc0fcc
copy constraints from Airflow
leahecole c9db1ee
update noxfile config
leahecole 916823d
update constraints to py-3.8
leahecole b1b4f21
add pip version override
leahecole c8f0936
upgrade simple to airflow 2
leahecole 3a33687
fix lint
leahecole 127379c
bqnotify cleanup
leahecole 2f31bf8
add blog/ conftest
leahecole 50d4b77
fix license header
leahecole 5c681f4
more license header fixes
leahecole f7bf625
license again
leahecole 466755a
remove unused import from blog conftest
leahecole 6b72bb7
remove unused requirements
leahecole be47adf
remove script used by dag deleted in this PR
leahecole 6f43148
Add clarifying comment about email operator
leahecole 5fbad11
add newline back to csv
leahecole f9447fa
fix presumed typo
leahecole dffb45a
Merge branch 'master' into airflow_migration
dinagraves 7574007
Merge branch 'master' into airflow_migration
leahecole File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
8000
div>
Diff view
Diff view
Diff view
Diff view
There are no files selected for viewing
39 changes: 39 additions & 0 deletions
39
composer/blog/gcp-tech-blog/unit-test-dags-cloud-build/conftest.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# Copyright 2021 Google LLC | ||
|
||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
|
||
# https://www.apache.org/licenses/LICENSE-2.0 | ||
|
||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
|
||
import os | ||
|
||
import pytest | ||
|
||
|
||
# this fixture initializes the Airflow DB once per session | ||
# it is used by DAGs in this blog post code only | ||
@pytest.fixture(scope="session") | ||
def airflow_database(): | ||
import airflow.utils.db | ||
|
||
# We use separate directory for local db path per session | ||
# by setting AIRFLOW_HOME env var, which is done in noxfile_config.py. | ||
|
||
assert('AIRFLOW_HOME' in os.environ) | ||
|
||
airflow_home = os.environ["AIRFLOW_HOME"] | ||
airflow_db = f"{airflow_home}/airflow.db" | ||
|
||
# reset both resets and initializes a new database | ||
airflow.utils.db.resetdb(rbac=None) | ||
|
||
# Making sure we are using a data file there. | ||
assert(os.path.isfile(airflow_db)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
Source, Target | ||
nyc-tlc:green.trips_2014,nyc_tlc_EU.trips_2014 | ||
nyc-tlc:green.trips_2015,nyc_tlc_EU.trips_2015 | ||
nyc-tlc.green.trips_2014,nyc_tlc_EU.trips_2014 | ||
nyc-tlc.green.trips_2015,nyc_tlc_EU.trips_2015 |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.