You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2020/03/03 15:14:59 UTC
[GitHub] [airflow] potiuk commented on a change in pull request #7506:
[AIRFLOW-6877] [WIP] check cross providers dependencies depends on
[AIRFLOW-6663]
potiuk commented on a change in pull request #7506: [AIRFLOW-6877] [WIP] check cross providers dependencies depends on [AIRFLOW-6663]
URL: https://github.com/apache/airflow/pull/7506#discussion_r387087889
##########
File path: airflow/providers/google/marketing_platform/operators/campaign_manager.py
##########
@@ -20,16 +20,23 @@
"""
import tempfile
import uuid
+import warnings
from typing import Any, Dict, List, Optional
from googleapiclient import http
from airflow.exceptions import AirflowException
from airflow.models import BaseOperator
-from airflow.providers.google.cloud.hooks.gcs import GCSHook
from airflow.providers.google.marketing_platform.hooks.campaign_manager import GoogleCampaignManagerHook
from airflow.utils.decorators import apply_defaults
+try:
+ from airflow.providers.google.cloud.hooks.gcs import GCSHook
+except ImportError:
+ warnings.warn("The package google-cloud must be installed to use the operator.",
Review comment:
OK. I found an easy way - i can use the hashmap from the setup_backport_opertors to define what are the packages. Without adding any extra mapping. This way we can still keep the "google" related packages in a single "backport package" but with internal "cloud/marketing/suite" structure. Updated PR shortly and I will make all the try/except corrections and rebase to make it ready for review.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services