mik-laj commented on a change in pull request #6299: [AIRFLOW-5631] Change way 
of running GCP system tests
URL: https://github.com/apache/airflow/pull/6299#discussion_r333479014
 
 

 ##########
 File path: airflow/gcp/hooks/base.py
 ##########
 @@ -323,8 +341,63 @@ def provide_gcp_credential_file_as_context(self):
                     pass
                 yield conf_file
             finally:
-                if current_env_state is None:
-                    if CREDENTIALS in os.environ:
-                        del os.environ[CREDENTIALS]
-                else:
-                    os.environ[CREDENTIALS] = current_env_state
+                self.restore_env_variable(current_env_state)
+
+    @staticmethod
+    def build_gcp_conn(
+        key_file_path: Optional[str] = None,
+        scopes: Optional[Sequence[str]] = None,
+        project_id: Optional[str] = None,
 
 Review comment:
   It's a hook method, so it should read a project_id from hook also.

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to