You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "ghostp13409 (via GitHub)" <gi...@apache.org> on 2023/10/12 15:13:40 UTC

[PR] 34838 adding propertyfiles option [airflow]

ghostp13409 opened a new pull request, #34894:
URL: https://github.com/apache/airflow/pull/34894

   <!--
    Licensed to the Apache Software Foundation (ASF) under one
    or more contributor license agreements.  See the NOTICE file
    distributed with this work for additional information
    regarding copyright ownership.  The ASF licenses this file
    to you under the Apache License, Version 2.0 (the
    "License"); you may not use this file except in compliance
    with the License.  You may obtain a copy of the License at
   
      http://www.apache.org/licenses/LICENSE-2.0
   
    Unless required by applicable law or agreed to in writing,
    software distributed under the License is distributed on an
    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    KIND, either express or implied.  See the License for the
    specific language governing permissions and limitations
    under the License.
    -->
   
   <!--
   Thank you for contributing! Please make sure that your code changes
   are covered with tests. And in case of new features or big changes
   remember to adjust the documentation.
   
   Feel free to ping committers for the review!
   
   In case of an existing issue, reference it using one of the following:
   
   closes: #ISSUE
   related: #ISSUE
   
   How to write a good git commit message:
   http://chris.beams.io/posts/git-commit/
   -->
   
   
   
   <!-- Please keep an empty line above the dashes. -->
   ---
   Hi @Bowrna 
   
   closes: #34838 
   
   I've added property-files operator in the spark submit operator.
   As I'm a newcomer to this industry I'm not sure if I need to do any other changes other than this. please let me know if there is a need to do any additional changes.
   


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Adding property files option in the Spark Submit command [airflow]

Posted by "ghostp13409 (via GitHub)" <gi...@apache.org>.
ghostp13409 commented on PR #34894:
URL: https://github.com/apache/airflow/pull/34894#issuecomment-1849833336

   > https://github.com/apache/airflow/pull/36164
   > will be replacing  this PR
   > @ghostp13409 I have pulled your commits in, so your contribution will be counted as well.
   > we can close this PR.
   
   @pateash thanks


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Adding property files option in the Spark Submit command [airflow]

Posted by "ghostp13409 (via GitHub)" <gi...@apache.org>.
ghostp13409 commented on PR #34894:
URL: https://github.com/apache/airflow/pull/34894#issuecomment-1759904842

   > can this be tested with unit test?
   
   Hi @eladkal,
   
   As I mentioned above, I am a newcomer to open source and a also the development as a whole. So I haven't done any testing yet. However I would love to do so if you can guide me on how to do it.


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Adding property files option in the Spark Submit command [airflow]

Posted by "Bowrna (via GitHub)" <gi...@apache.org>.
Bowrna commented on PR #34894:
URL: https://github.com/apache/airflow/pull/34894#issuecomment-1809548982

   hi @ghostp13409 any update on this? if you are struck in this let me know... i will see if i can support you. also some static checks are failing. you may need to fix those parts too.


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Adding property files option in the Spark Submit command [airflow]

Posted by "Bowrna (via GitHub)" <gi...@apache.org>.
Bowrna commented on code in PR #34894:
URL: https://github.com/apache/airflow/pull/34894#discussion_r1357074531


##########
airflow/providers/apache/spark/operators/spark_submit.py:
##########
@@ -160,6 +160,11 @@ def on_kill(self) -> None:
             self._hook = self._get_hook()
         self._hook.on_kill()
 
+    def property_files(self) -> None:
+        if self.hook is None:
+            self._hook = self._get_hook()
+        self._hook.property_files()
+
     def _get_hook(self) -> SparkSubmitHook:

Review Comment:
   you have to accept the property_files param value as one of the parameters that can be used when creating SparkSubmitOperator. This code doesn't involve those changes.



-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Adding property files option in the Spark Submit command [airflow]

Posted by "Bowrna (via GitHub)" <gi...@apache.org>.
Bowrna commented on PR #34894:
URL: https://github.com/apache/airflow/pull/34894#issuecomment-1759958599

   > > can this be tested with unit test?
   > 
   > Hi @eladkal,
   > 
   > As I mentioned above, I am a newcomer to open source and a also the development as a whole. So I haven't done any testing yet. However I would love to do so if you can guide me on how to do it.
   
   Please check if you can add relevant test in the test_spark_submit.py file for the changes you have done in spark_submit.py file. @ghostp13409 


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Adding property files option in the Spark Submit command [airflow]

Posted by "ghostp13409 (via GitHub)" <gi...@apache.org>.
ghostp13409 commented on code in PR #34894:
URL: https://github.com/apache/airflow/pull/34894#discussion_r1357751380


##########
airflow/providers/apache/spark/operators/spark_submit.py:
##########
@@ -160,6 +160,11 @@ def on_kill(self) -> None:
             self._hook = self._get_hook()
         self._hook.on_kill()
 
+    def property_files(self) -> None:
+        if self.hook is None:
+            self._hook = self._get_hook()
+        self._hook.property_files()
+
     def _get_hook(self) -> SparkSubmitHook:

Review Comment:
   Okay will try to add that as well



-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Adding property files option in the Spark Submit command [airflow]

Posted by "eladkal (via GitHub)" <gi...@apache.org>.
eladkal commented on PR #34894:
URL: https://github.com/apache/airflow/pull/34894#issuecomment-1759809180

   can this be tested with unit test?


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Adding property files option in the Spark Submit command [airflow]

Posted by "Bowrna (via GitHub)" <gi...@apache.org>.
Bowrna commented on PR #34894:
URL: https://github.com/apache/airflow/pull/34894#issuecomment-1811813274

   can you point out where you posted the question? @ghostp13409 


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Adding property files option in the Spark Submit command [airflow]

Posted by "ghostp13409 (via GitHub)" <gi...@apache.org>.
ghostp13409 commented on PR #34894:
URL: https://github.com/apache/airflow/pull/34894#issuecomment-1814172175

   > can you point out where you posted the question? @ghostp13409
   
   I posted my question on [#troubleshooting](https://apache-airflow.slack.com/archives/CCQ7EGB1P/p1697895028537189) and [#random](https://apache-airflow.slack.com/archives/CCR6P6JRL/p1697111516154339).


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Adding property files option in the Spark Submit command [airflow]

Posted by "ghostp13409 (via GitHub)" <gi...@apache.org>.
ghostp13409 commented on PR #34894:
URL: https://github.com/apache/airflow/pull/34894#issuecomment-1829593518

   yeah sure, that would be very helpful.
   ________________________________
   From: Ashish Patel ***@***.***>
   Sent: Tuesday, November 28, 2023 2:41 PM
   To: apache/airflow ***@***.***>
   Cc: ghostp13409 ***@***.***>; Mention ***@***.***>
   Subject: Re: [apache/airflow] Adding property files option in the Spark Submit command (PR #34894)
   
   
   Hi,
   I have a related issue #35911<https://github.com/apache/airflow/issues/35911>,
   @ghostp13409<https://github.com/ghostp13409> if you are stuck, I can pull your branch into mine and merge both changes and raise a PR.
   let me know if that works.
   cc. @eladkal<https://github.com/eladkal> @Bowrna<https://github.com/Bowrna>
   
   —
   Reply to this email directly, view it on GitHub<https://github.com/apache/airflow/pull/34894#issuecomment-1829393995>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/BDGJQGQJJU2PGWOY6TQI4OTYGWTF5AVCNFSM6AAAAAA55Y7DG2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMRZGM4TGOJZGU>.
   You are receiving this because you were mentioned.Message ID: ***@***.***>
   


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Adding property files option in the Spark Submit command [airflow]

Posted by "ghostp13409 (via GitHub)" <gi...@apache.org>.
ghostp13409 commented on code in PR #34894:
URL: https://github.com/apache/airflow/pull/34894#discussion_r1358698178


##########
airflow/providers/apache/spark/operators/spark_submit.py:
##########
@@ -160,6 +160,11 @@ def on_kill(self) -> None:
             self._hook = self._get_hook()
         self._hook.on_kill()
 
+    def property_files(self) -> None:
+        if self.hook is None:
+            self._hook = self._get_hook()
+        self._hook.property_files()
+
     def _get_hook(self) -> SparkSubmitHook:

Review Comment:
   I've added properties-file param to Operator and Hook files. However, I haven't added the default file path handling logic as it seems to be already handled by `spark-submit` command as per the [docs](https://books.japila.pl/apache-spark-internals/tools/spark-submit/#driver-cores). I will follow up with the test case changes in the next commit. let me know if there is any feedback or concern.
   
   > you have to accept the property_files param value as one of the parameters that can be used when creating SparkSubmitOperator. This code doesn't involve those changes.
   
   



-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Adding property files option in the Spark Submit command [airflow]

Posted by "ghostp13409 (via GitHub)" <gi...@apache.org>.
ghostp13409 commented on PR #34894:
URL: https://github.com/apache/airflow/pull/34894#issuecomment-1810255498

   > hi @ghostp13409 any update on this? if you are struck in this let me know... i will see if i can support you. also some static checks are failing. you may need to fix those parts too.
   
   HI @Bowrna,
   
   thanks for reaching out.
   
   A possible way to make the text more professional is:
   
   I am working on setting up the dev environment, but I am encountering an error while installing breeze. I have tried different platforms (Windows and Linux) and versions of python and pyenv, but the error persists. I would appreciate your guidance on how to resolve this issue, as I have already asked about it on the slack community.


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Adding property files option in the Spark Submit command [airflow]

Posted by "Bowrna (via GitHub)" <gi...@apache.org>.
Bowrna commented on PR #34894:
URL: https://github.com/apache/airflow/pull/34894#issuecomment-1844867253

   @pateash @ghostp13409 if you need any help to push the fix for this issue, let me know. 


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Adding property files option in the Spark Submit command [airflow]

Posted by "pateash (via GitHub)" <gi...@apache.org>.
pateash commented on PR #34894:
URL: https://github.com/apache/airflow/pull/34894#issuecomment-1829393995

   Hi,
   I have a related issue #35911,
   @ghostp13409 if you are stuck, I can pull your branch into mine and merge both changes and raise a PR.
   let me know if that works.
   cc. @eladkal @Bowrna 


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Adding property files option in the Spark Submit command [airflow]

Posted by "pateash (via GitHub)" <gi...@apache.org>.
pateash commented on PR #34894:
URL: https://github.com/apache/airflow/pull/34894#issuecomment-1849607706

   https://github.com/apache/airflow/pull/36164
   will be replace this
   @ghostp13409 I have pulled your commits in, so your contribution will be counted as well.
   we can close this PR.


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Adding property files option in the Spark Submit command [airflow]

Posted by "eladkal (via GitHub)" <gi...@apache.org>.
eladkal closed pull request #34894: Adding property files option in the Spark Submit command
URL: https://github.com/apache/airflow/pull/34894


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org