Skip to content

Commit

Permalink
fix variable calls
Browse files Browse the repository at this point in the history
  • Loading branch information
haroldwoo committed Oct 18, 2021
1 parent b5d821c commit 512283c
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 18 deletions.
2 changes: 1 addition & 1 deletion bin/test-parse
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ function inject_failing_dags() {
tee << EOF > ${test_0}
from airflow import DAG
from airflow.models import Variable
Variable(key='non_existent_variable').get('non_existent_variable')
Variable.get('non_existent_variable')
EOF

function cleanup_with_tests() {
Expand Down
18 changes: 9 additions & 9 deletions dags/probe_scraper.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,16 +153,16 @@
location="us-west1",
dag=dag,
env_vars={
"GIT_SSH_KEY_BASE64": Variable(key="looker_repos_secret_git_ssh_key_b64").get("looker_repos_secret_git_ssh_key_b64"),
"GIT_SSH_KEY_BASE64": Variable.get("looker_repos_secret_git_ssh_key_b64"),
"HUB_REPO_URL": "[email protected]:mozilla/looker-hub.git",
"HUB_BRANCH_SOURCE": "base",
"HUB_BRANCH_PUBLISH": "main",
"SPOKE_REPO_URL": "[email protected]:mozilla/looker-spoke-default.git",
"SPOKE_BRANCH_PUBLISH": "main",
"LOOKER_INSTANCE_URI": "https://mozilla.cloud.looker.com",
"LOOKER_API_CLIENT_ID": Variable(key="looker_api_client_id_prod").get("looker_api_client_id_prod"),
"LOOKER_API_CLIENT_SECRET": Variable(key="looker_api_client_secret_prod").get("looker_api_client_secret_prod"),
"GITHUB_ACCESS_TOKEN": Variable(key="dataops_looker_github_secret_access_token").get("dataops_looker_github_secret_access_token"),
"LOOKER_API_CLIENT_ID": Variable.get("looker_api_client_id_prod"),
"LOOKER_API_CLIENT_SECRET": Variable.get("looker_api_client_secret_prod"),
"GITHUB_ACCESS_TOKEN": Variable.get("dataops_looker_github_secret_access_token"),
"UPDATE_SPOKE_BRANCHES": "true",
}
)
Expand All @@ -181,16 +181,16 @@
location="us-west1",
dag=dag,
env_vars={
"GIT_SSH_KEY_BASE64": Variable(key="looker_repos_secret_git_ssh_key_b64").get("looker_repos_secret_git_ssh_key_b64"),
"GIT_SSH_KEY_BASE64": Variable.get("looker_repos_secret_git_ssh_key_b64"),
"HUB_REPO_URL": "[email protected]:mozilla/looker-hub.git",
"HUB_BRANCH_SOURCE": "base",
"HUB_BRANCH_PUBLISH": "main-stage",
"SPOKE_REPO_URL": "[email protected]:mozilla/looker-spoke-default.git",
"SPOKE_BRANCH_PUBLISH": "main-stage",
"LOOKER_INSTANCE_URI": "https://mozillastaging.cloud.looker.com",
"LOOKER_API_CLIENT_ID": Variable(key="looker_api_client_id_staging").get("looker_api_client_id_staging"),
"LOOKER_API_CLIENT_SECRET": Variable(key="looker_api_client_secret_staging").get("looker_api_client_secret_staging"),
"GITHUB_ACCESS_TOKEN": Variable(key="dataops_looker_github_secret_access_token").get("dataops_looker_github_secret_access_token"),
"LOOKER_API_CLIENT_ID": Variable.get("looker_api_client_id_staging"),
"LOOKER_API_CLIENT_SECRET": Variable.get("looker_api_client_secret_staging"),
"GITHUB_ACCESS_TOKEN": Variable.get("dataops_looker_github_secret_access_token"),
"UPDATE_SPOKE_BRANCHES": "true",
}
)
Expand All @@ -203,7 +203,7 @@
# said build.
glean_dictionary_netlify_build = SimpleHttpOperator(
http_conn_id="http_netlify_build_webhook",
endpoint=Variable(key="glean_dictionary_netlify_build_webhook_id").get("glean_dictionary_netlify_build_webhook_id"),
endpoint=Variable.get("glean_dictionary_netlify_build_webhook_id"),
method="POST",
data={},
owner="[email protected]",
Expand Down
4 changes: 2 additions & 2 deletions dags/taar_daily.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
moz_dataproc_jar_runner,
)

TAAR_ETL_STORAGE_BUCKET = Variable(key="taar_etl_storage_bucket").get("taar_etl_storage_bucket")
TAAR_ETL_MODEL_STORAGE_BUCKET = Variable(key="taar_etl_model_storage_bucket").get("taar_etl_model_storage_bucket")
TAAR_ETL_STORAGE_BUCKET = Variable.get("taar_etl_storage_bucket")
TAAR_ETL_MODEL_STORAGE_BUCKET = Variable.get("taar_etl_model_storage_bucket")

# This uses a circleci built docker image from github.com/mozilla/taar_gcp_etl
TAAR_ETL_CONTAINER_IMAGE = "gcr.io/moz-fx-data-airflow-prod-88e0/taar_gcp_etl:0.6.1"
Expand Down
12 changes: 6 additions & 6 deletions dags/taar_weekly.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@
taar_gcpdataproc_conn_id = "google_cloud_airflow_dataproc"
taar_gcpdataproc_project_id = "airflow-dataproc"

TAAR_BIGTABLE_INSTANCE_ID = Variable(key="taar_bigtable_instance_id").get("taar_bigtable_instance_id")
TAAR_ETL_STORAGE_BUCKET = Variable(key="taar_etl_storage_bucket").get("taar_etl_storage_bucket")
TAAR_ETL_MODEL_STORAGE_BUCKET = Variable(key="taar_etl_model_storage_bucket").get("taar_etl_model_storage_bucket")
TAAR_PROFILE_PROJECT_ID = Variable(key="taar_gcp_project_id").get("taar_gcp_project_id")
TAAR_DATAFLOW_SUBNETWORK = Variable(key="taar_dataflow_subnetwork").get("taar_dataflow_subnetwork")
TAAR_DATAFLOW_SERVICE_ACCOUNT = Variable(key="taar_dataflow_service_account_email").get("taar_dataflow_service_account_email")
TAAR_BIGTABLE_INSTANCE_ID = Variable.get("taar_bigtable_instance_id")
TAAR_ETL_STORAGE_BUCKET = Variable.get("taar_etl_storage_bucket")
TAAR_ETL_MODEL_STORAGE_BUCKET = Variable.get("taar_etl_model_storage_bucket")
TAAR_PROFILE_PROJECT_ID = Variable.get("taar_gcp_project_id")
TAAR_DATAFLOW_SUBNETWORK = Variable.get("taar_dataflow_subnetwork")
TAAR_DATAFLOW_SERVICE_ACCOUNT = Variable.get("taar_dataflow_service_account_email")

# This uses a circleci built docker image from github.com/mozilla/taar_gcp_etl
TAAR_ETL_CONTAINER_IMAGE = (
Expand Down

0 comments on commit 512283c

Please sign in to comment.