Skip to content

Commit

Permalink
Update Google Cloud branding (#10615)
Browse files Browse the repository at this point in the history
  • Loading branch information
mik-laj committed Aug 28, 2020
1 parent 725bf33 commit 3867f76
Show file tree
Hide file tree
Showing 85 changed files with 597 additions and 569 deletions.
4 changes: 2 additions & 2 deletions airflow/config_templates/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -623,8 +623,8 @@
default: ""
- name: google_key_path
description: |
Path to GCP Credential JSON file. If omitted, authorization based on `the Application Default
Credentials
Path to Google Cloud Service Account key file (JSON). If omitted, authorization based on
`the Application Default Credentials
<https://cloud.google.com/docs/authentication/production#finding_credentials_automatically>`__ will
be used.
type: string
Expand Down
4 changes: 2 additions & 2 deletions airflow/config_templates/default_airflow.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -339,8 +339,8 @@ fallback_page_limit = 100
# Example: google_oauth2_audience = project-id-random-value.apps.googleusercontent.com
google_oauth2_audience =

# Path to GCP Credential JSON file. If omitted, authorization based on `the Application Default
# Credentials
# Path to Google Cloud Service Account key file (JSON). If omitted, authorization based on
# `the Application Default Credentials
# <https://cloud.google.com/docs/authentication/production#finding_credentials_automatically>`__ will
# be used.
# Example: google_key_path = /files/service-account-json
Expand Down
2 changes: 1 addition & 1 deletion airflow/providers/google/ads/hooks/ads.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ def _get_config(self) -> None:

def _update_config_with_secret(self, secrets_temp: IO[str]) -> None:
"""
Gets GCP secret from connection and saves the contents to the temp file
Gets Google Cloud secret from connection and saves the contents to the temp file
Updates google ads config with file path of the temp file containing the secret
Note, the secret must be passed as a file path for Google Ads API
"""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@

class _SecretManagerClient(LoggingMixin):
"""
Retrieves Secrets object from GCP Secrets Manager. This is a common class reused between SecretsManager
and Secrets Hook that provides the shared authentication and verification mechanisms. This class should
not be used directly, use SecretsManager or SecretsHook instead
Retrieves Secrets object from Google Cloud Secrets Manager. This is a common class reused between
SecretsManager and Secrets Hook that provides the shared authentication and verification mechanisms.
This class should not be used directly, use SecretsManager or SecretsHook instead
:param credentials: Credentials used to authenticate to GCP
Expand Down Expand Up @@ -84,11 +84,11 @@ def get_secret(self, secret_id: str, project_id: str, secret_version: str = 'lat
value = response.payload.data.decode('UTF-8')
return value
except NotFound:
self.log.error("GCP API Call Error (NotFound): Secret ID %s not found.", secret_id)
self.log.error("Google Cloud API Call Error (NotFound): Secret ID %s not found.", secret_id)
return None
except PermissionDenied:
self.log.error(
"""GCP API Call Error (PermissionDenied): No access for Secret ID %s.
"""Google Cloud API Call Error (PermissionDenied): No access for Secret ID %s.
Did you add 'secretmanager.versions.access' permission?""",
secret_id,
)
Expand Down
4 changes: 2 additions & 2 deletions airflow/providers/google/cloud/example_dags/example_dlp.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@

"""
Example Airflow DAG that execute the following tasks using
Cloud DLP service in the Google Cloud Platform:
Cloud DLP service in the Google Cloud:
1) Creating a content inspect template;
2) Using the created template to inspect content;
3) Deleting the template from GCP .
3) Deleting the template from Google Cloud .
"""

import os
Expand Down
8 changes: 4 additions & 4 deletions airflow/providers/google/cloud/hooks/bigquery.py
Original file line number Diff line number Diff line change
Expand Up @@ -921,7 +921,7 @@ def update_dataset(
:type dataset_id: str
:param fields: The properties of ``dataset`` to change (e.g. "friendly_name").
:type fields: Sequence[str]
:param project_id: The GCP Project ID
:param project_id: The Google Cloud Project ID
:type project_id: str
:param retry: How to retry the RPC.
:type retry: google.api_core.retry.Retry
Expand Down Expand Up @@ -955,7 +955,7 @@ def patch_dataset(
in request body.
https://cloud.google.com/bigquery/docs/reference/rest/v2/datasets#resource
:type dataset_resource: dict
:param project_id: The GCP Project ID
:param project_id: The Google Cloud Project ID
:type project_id: str
:rtype: dataset
https://cloud.google.com/bigquery/docs/reference/rest/v2/datasets#resource
Expand Down Expand Up @@ -998,7 +998,7 @@ def get_dataset_tables_list(
:param dataset_id: The BigQuery Dataset ID
:type dataset_id: str
:param project_id: The GCP Project ID
:param project_id: The Google Cloud Project ID
:type project_id: str
:param table_prefix: Tables must begin by this prefix to be returned (case sensitive)
:type table_prefix: str
Expand Down Expand Up @@ -1073,7 +1073,7 @@ def get_dataset(self, dataset_id: str, project_id: Optional[str] = None) -> Data
:param dataset_id: The BigQuery Dataset ID
:type dataset_id: str
:param project_id: The GCP Project ID
:param project_id: The Google Cloud Project ID
:type project_id: str
:return: dataset_resource
Expand Down
12 changes: 8 additions & 4 deletions airflow/providers/google/cloud/hooks/bigquery_dts.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,8 @@ def create_transfer_config(
:param transfer_config: Data transfer configuration to create.
:type transfer_config: Union[dict, google.cloud.bigquery_datatransfer_v1.types.TransferConfig]
:param project_id: The BigQuery project id where the transfer configuration should be
created. If set to None or missing, the default project_id from the GCP connection is used.
created. If set to None or missing, the default project_id from the Google Cloud connection
is used.
:type project_id: str
:param authorization_code: authorization code to use with this transfer configuration.
This is required if new credentials are needed.
Expand Down Expand Up @@ -155,7 +156,8 @@ def delete_transfer_config(
:param transfer_config_id: Id of transfer config to be used.
:type transfer_config_id: str
:param project_id: The BigQuery project id where the transfer configuration should be
created. If set to None or missing, the default project_id from the GCP connection is used.
created. If set to None or missing, the default project_id from the Google Cloud connection
is used.
:type project_id: str
:param retry: A retry object used to retry requests. If `None` is
specified, requests will not be retried.
Expand Down Expand Up @@ -201,7 +203,8 @@ def start_manual_transfer_runs(
`~google.cloud.bigquery_datatransfer_v1.types.Timestamp`
:type requested_run_time: Union[dict, ~google.cloud.bigquery_datatransfer_v1.types.Timestamp]
:param project_id: The BigQuery project id where the transfer configuration should be
created. If set to None or missing, the default project_id from the GCP connection is used.
created. If set to None or missing, the default project_id from the Google Cloud connection
is used.
:type project_id: str
:param retry: A retry object used to retry requests. If `None` is
specified, requests will not be retried.
Expand Down Expand Up @@ -243,7 +246,8 @@ def get_transfer_run(
:param transfer_config_id: ID of transfer config to be used.
:type transfer_config_id: str
:param project_id: The BigQuery project id where the transfer configuration should be
created. If set to None or missing, the default project_id from the GCP connection is used.
created. If set to None or missing, the default project_id from the Google Cloud connection
is used.
:type project_id: str
:param retry: A retry object used to retry requests. If `None` is
specified, requests will not be retried.
Expand Down
10 changes: 5 additions & 5 deletions airflow/providers/google/cloud/hooks/bigtable.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ def get_instance(self, instance_id: str, project_id: str) -> Instance:
:type instance_id: str
:param project_id: Optional, Google Cloud Platform project ID where the
BigTable exists. If set to None or missing,
the default project_id from the GCP connection is used.
the default project_id from the Google Cloud connection is used.
:type project_id: str
"""
instance = self._get_client(project_id=project_id).instance(instance_id)
Expand All @@ -89,7 +89,7 @@ def delete_instance(self, instance_id: str, project_id: str) -> None:
:param project_id: Optional, Google Cloud Platform project ID where the
BigTable exists. If set to None or missing,
the default project_id from the GCP connection is used.
the default project_id from the Google Cloud connection is used.
:type project_id: str
:param instance_id: The ID of the Cloud Bigtable instance.
:type instance_id: str
Expand Down Expand Up @@ -132,7 +132,7 @@ def create_instance(
:type project_id: str
:param project_id: Optional, Google Cloud Platform project ID where the
BigTable exists. If set to None or missing,
the default project_id from the GCP connection is used.
the default project_id from the Google Cloud connection is used.
:type replica_clusters: List[Dict[str, str]]
:param replica_clusters: (optional) A list of replica clusters for the new
instance. Each cluster dictionary contains an id and a zone.
Expand Down Expand Up @@ -215,7 +215,7 @@ def update_instance(
:type project_id: str
:param project_id: Optional, Google Cloud Platform project ID where the
BigTable exists. If set to None or missing,
the default project_id from the GCP connection is used.
the default project_id from the Google Cloud connection is used.
:type instance_display_name: str
:param instance_display_name: (optional) Human-readable name of the instance.
:type instance_type: enums.Instance.Type or enum.IntEnum
Expand Down Expand Up @@ -285,7 +285,7 @@ def delete_table(self, instance_id: str, table_id: str, project_id: str) -> None
:type project_id: str
:param project_id: Optional, Google Cloud Platform project ID where the
BigTable exists. If set to None or missing,
the default project_id from the GCP connection is used.
the default project_id from the Google Cloud connection is used.
"""
table = self.get_instance(instance_id=instance_id, project_id=project_id).table(table_id=table_id)
table.delete()
Expand Down
2 changes: 1 addition & 1 deletion airflow/providers/google/cloud/hooks/cloud_build.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ def create_build(self, body: Dict, project_id: str) -> Dict:
See: https://cloud.google.com/cloud-build/docs/api/reference/rest/v1/projects.builds
:type body: dict
:param project_id: Optional, Google Cloud Project project_id where the function belongs.
If set to None or missing, the default project_id from the GCP connection is used.
If set to None or missing, the default project_id from the Google Cloud connection is used.
:type project_id: str
:return: Dict
"""
Expand Down
22 changes: 11 additions & 11 deletions airflow/providers/google/cloud/hooks/cloud_memorystore.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ def create_instance(
:class:`~google.cloud.redis_v1.types.Instance`
:type instance: Union[Dict, google.cloud.redis_v1.types.Instance]
:param project_id: Project ID of the project that contains the instance. If set
to None or missing, the default project_id from the GCP connection is used.
to None or missing, the default project_id from the Google Cloud connection is used.
:type project_id: str
:param retry: A retry object used to retry requests. If ``None`` is specified, requests will not be
retried.
Expand Down Expand Up @@ -190,8 +190,8 @@ def delete_instance(
:type location: str
:param instance: The logical name of the Redis instance in the customer project.
:type instance: str
:param project_id: Project ID of the project that contains the instance. If set
to None or missing, the default project_id from the GCP connection is used.
:param project_id: Project ID of the project that contains the instance. If set
to None or missing, the default project_id from the Google Cloud connection is used.
:type project_id: str
:param retry: A retry object used to retry requests. If ``None`` is specified, requests will not be
retried.
Expand Down Expand Up @@ -241,7 +241,7 @@ def export_instance(
:class:`~google.cloud.redis_v1.types.OutputConfig`
:type output_config: Union[Dict, google.cloud.redis_v1.types.OutputConfig]
:param project_id: Project ID of the project that contains the instance. If set
to None or missing, the default project_id from the GCP connection is used.
to None or missing, the default project_id from the Google Cloud connection is used.
:type project_id: str
:param retry: A retry object used to retry requests. If ``None`` is specified, requests will not be
retried.
Expand Down Expand Up @@ -285,7 +285,7 @@ def failover_instance(
:type data_protection_mode: google.cloud.redis_v1.gapic.enums.FailoverInstanceRequest
.DataProtectionMode
:param project_id: Project ID of the project that contains the instance. If set
to None or missing, the default project_id from the GCP connection is used.
to None or missing, the default project_id from the Google Cloud connection is used.
:type project_id: str
:param retry: A retry object used to retry requests. If ``None`` is specified, requests will not be
retried.
Expand Down Expand Up @@ -327,8 +327,8 @@ def get_instance(
:type location: str
:param instance: The logical name of the Redis instance in the customer project.
:type instance: str
:param project_id: Project ID of the project that contains the instance. If set
to None or missing, the default project_id from the GCP connection is used.
:param project_id: Project ID of the project that contains the instance. If set
to None or missing, the default project_id from the Google Cloud connection is used.
:type project_id: str
:param retry: A retry object used to retry requests. If ``None`` is specified, requests will not be
retried.
Expand Down Expand Up @@ -372,7 +372,7 @@ def import_instance(
:class:`~google.cloud.redis_v1.types.InputConfig`
:type input_config: Union[Dict, google.cloud.redis_v1.types.InputConfig]
:param project_id: Project ID of the project that contains the instance. If set
to None or missing, the default project_id from the GCP connection is used.
to None or missing, the default project_id from the Google Cloud connection is used.
:type project_id: str
:param retry: A retry object used to retry requests. If ``None`` is specified, requests will not be
retried.
Expand Down Expand Up @@ -416,7 +416,7 @@ def list_instances(
streaming is performed per-page, this determines the maximum number of resources in a page.
:type page_size: int
:param project_id: Project ID of the project that contains the instance. If set
to None or missing, the default project_id from the GCP connection is used.
to None or missing, the default project_id from the Google Cloud connection is used.
:type project_id: str
:param retry: A retry object used to retry requests. If ``None`` is specified, requests will not be
retried.
Expand Down Expand Up @@ -470,8 +470,8 @@ def update_instance(
:type location: str
:param instance_id: The logical name of the Redis instance in the customer project.
:type instance_id: str
:param project_id: Project ID of the project that contains the instance. If set
to None or missing, the default project_id from the GCP connection is used.
:param project_id: Project ID of the project that contains the instance. If set
to None or missing, the default project_id from the Google Cloud connection is used.
:type project_id: str
:param retry: A retry object used to retry requests. If ``None`` is specified, requests will not be
retried.
Expand Down

0 comments on commit 3867f76

Please sign in to comment.