pankajkoti commented on code in PR #39365:
URL: https://github.com/apache/airflow/pull/39365#discussion_r1587600098


##########
tests/system/providers/pinecone/example_pinecone_openai.py:
##########
@@ -75,15 +74,15 @@
     start_date=datetime(2023, 1, 1),
     catchup=False,
 ) as dag:
-
-    @setup
-    @task
-    def create_index():
-        from airflow.providers.pinecone.hooks.pinecone import PineconeHook
-
-        hook = PineconeHook()
-        hook.create_index(index_name=index_name, dimension=1536)

Review Comment:
   Given your point about using an operator instead of the hook method, could 
you also verify if the hook requires any adjustments? If 
hook.create_index(index_name=index_name, dimension=1536) is no longer 
functioning, we should investigate what might be causing the issue, as that 
could be the actual solution. Is it due to missing arguments? In that case, 
those missing arguments should be incorporated into the hook. They could either 
be positional arguments, and we could illustrate here in the example the 
possible values those positional arguments could take. Alternatively, we could 
designate them as keyword arguments and provide default values that are 
acceptable.
   
   While altering the example DAG might resolve the issue temporarily, it 
suggests that there could be other potential issues users might encounter if 
they fail to provide the required arguments to either the hook method or the 
operator. I believe the interface itself requires refinement rather than just 
adjusting the example DAG.



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to