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/02/27 21:25:55 UTC
[GitHub] [airflow] ashb opened a new pull request #7575: [AIRFLOW-6949]
Respect explicit `spark.kubernetes.namespace` conf to SparkSubmitOperator
ashb opened a new pull request #7575: [AIRFLOW-6949] Respect explicit `spark.kubernetes.namespace` conf to SparkSubmitOperator
URL: https://github.com/apache/airflow/pull/7575
This means the value from the Operator/dag file takes precedence over
the connection
The previous behaviour was to emit one line from the conf arg, but then
a later one from the connection:
```
--conf spark.kubernetes.namespace=airflow \
--conf spark.kubernetes.namespace=default \
```
---
Issue link: WILL BE INSERTED BY [boring-cyborg](https://github.com/kaxil/boring-cyborg)
Make sure to mark the boxes below before creating PR: [x]
- [x] Description above provides context of the change
- [x] Commit message/PR title starts with `[AIRFLOW-NNNN]`. AIRFLOW-NNNN = JIRA ID<sup>*</sup>
- [x] Unit tests coverage for changes (not needed for documentation changes)
- [x] Commits follow "[How to write a good git commit message](http://chris.beams.io/posts/git-commit/)"
- [x] Relevant documentation is updated including usage instructions.
- [x] I will engage committers as explained in [Contribution Workflow Example](https://github.com/apache/airflow/blob/master/CONTRIBUTING.rst#contribution-workflow-example).
<sup>*</sup> For document-only changes commit message can start with `[AIRFLOW-XXXX]`.
---
In case of fundamental code change, Airflow Improvement Proposal ([AIP](https://cwiki.apache.org/confluence/display/AIRFLOW/Airflow+Improvements+Proposals)) is needed.
In case of a new dependency, check compliance with the [ASF 3rd Party License Policy](https://www.apache.org/legal/resolved.html#category-x).
In case of backwards incompatible changes please leave a note in [UPDATING.md](https://github.com/apache/airflow/blob/master/UPDATING.md).
Read the [Pull Request Guidelines](https://github.com/apache/airflow/blob/master/CONTRIBUTING.rst#pull-request-guidelines) for more information.
----------------------------------------------------------------
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
[GitHub] [airflow] Fokko commented on issue #7575: [AIRFLOW-6949] Respect
explicit `spark.kubernetes.namespace` conf to SparkSubmitOperator
Posted by GitBox <gi...@apache.org>.
Fokko commented on issue #7575: [AIRFLOW-6949] Respect explicit `spark.kubernetes.namespace` conf to SparkSubmitOperator
URL: https://github.com/apache/airflow/pull/7575#issuecomment-592462121
Also pushed this onto 1.10 branch: https://github.com/apache/airflow/commit/7978bf778fb26f3393fa6456ca5594635a870877
Cherry-picking was impossible due to the moving of the files.
----------------------------------------------------------------
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
[GitHub] [airflow] Fokko edited a comment on issue #7575: [AIRFLOW-6949]
Respect explicit `spark.kubernetes.namespace` conf to SparkSubmitOperator
Posted by GitBox <gi...@apache.org>.
Fokko edited a comment on issue #7575: [AIRFLOW-6949] Respect explicit `spark.kubernetes.namespace` conf to SparkSubmitOperator
URL: https://github.com/apache/airflow/pull/7575#issuecomment-592462121
Also pushed this onto 1.10 branch: ~https://github.com/apache/airflow/commit/7978bf778fb26f3393fa6456ca5594635a870877~ https://github.com/apache/airflow/commit/f8a83a718
Cherry-picking was impossible due to the moving of the files.
----------------------------------------------------------------
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
[GitHub] [airflow] ashb commented on issue #7575: [AIRFLOW-6949] Respect
explicit `spark.kubernetes.namespace` conf to SparkSubmitOperator
Posted by GitBox <gi...@apache.org>.
ashb commented on issue #7575: [AIRFLOW-6949] Respect explicit `spark.kubernetes.namespace` conf to SparkSubmitOperator
URL: https://github.com/apache/airflow/pull/7575#issuecomment-592469592
Thanks Fokko! I usually use `git commit --reuse-message=$orig-sha` when doing this so message, author and timestamp are kept. (I've force pushed v1-10 with that updated)
----------------------------------------------------------------
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
[GitHub] [airflow] codecov-io commented on issue #7575: [AIRFLOW-6949]
Respect explicit `spark.kubernetes.namespace` conf to SparkSubmitOperator
Posted by GitBox <gi...@apache.org>.
codecov-io commented on issue #7575: [AIRFLOW-6949] Respect explicit `spark.kubernetes.namespace` conf to SparkSubmitOperator
URL: https://github.com/apache/airflow/pull/7575#issuecomment-592215039
# [Codecov](https://codecov.io/gh/apache/airflow/pull/7575?src=pr&el=h1) Report
> Merging [#7575](https://codecov.io/gh/apache/airflow/pull/7575?src=pr&el=desc) into [master](https://codecov.io/gh/apache/airflow/commit/d031f844517a8d12e7d90af0c472ca00c64b8963?src=pr&el=desc) will **increase** coverage by `<.01%`.
> The diff coverage is `100%`.
[![Impacted file tree graph](https://codecov.io/gh/apache/airflow/pull/7575/graphs/tree.svg?width=650&token=WdLKlKHOAU&height=150&src=pr)](https://codecov.io/gh/apache/airflow/pull/7575?src=pr&el=tree)
```diff
@@ Coverage Diff @@
## master #7575 +/- ##
==========================================
+ Coverage 86.56% 86.56% +<.01%
==========================================
Files 896 896
Lines 42622 42623 +1
==========================================
+ Hits 36896 36897 +1
Misses 5726 5726
```
| [Impacted Files](https://codecov.io/gh/apache/airflow/pull/7575?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [...rflow/providers/apache/spark/hooks/spark\_submit.py](https://codecov.io/gh/apache/airflow/pull/7575/diff?src=pr&el=tree#diff-YWlyZmxvdy9wcm92aWRlcnMvYXBhY2hlL3NwYXJrL2hvb2tzL3NwYXJrX3N1Ym1pdC5weQ==) | `84.67% <100%> (+0.05%)` | :arrow_up: |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/airflow/pull/7575?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/airflow/pull/7575?src=pr&el=footer). Last update [d031f84...c2a16db](https://codecov.io/gh/apache/airflow/pull/7575?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
----------------------------------------------------------------
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
[GitHub] [airflow] zhongjiajie commented on a change in pull request #7575:
[AIRFLOW-6949] Respect explicit `spark.kubernetes.namespace` conf to
SparkSubmitOperator
Posted by GitBox <gi...@apache.org>.
zhongjiajie commented on a change in pull request #7575: [AIRFLOW-6949] Respect explicit `spark.kubernetes.namespace` conf to SparkSubmitOperator
URL: https://github.com/apache/airflow/pull/7575#discussion_r385598273
##########
File path: airflow/providers/apache/spark/hooks/spark_submit.py
##########
@@ -208,6 +208,9 @@ def _resolve_connection(self):
self._conn_id, conn_data['master']
)
+ if 'spark.kubernetes.namespace' in self._conf:
+ conn_data['namespace'] = self._conf['spark.kubernetes.namespace']
Review comment:
Get 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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [airflow] ashb commented on a change in pull request #7575:
[AIRFLOW-6949] Respect explicit `spark.kubernetes.namespace` conf to
SparkSubmitOperator
Posted by GitBox <gi...@apache.org>.
ashb commented on a change in pull request #7575: [AIRFLOW-6949] Respect explicit `spark.kubernetes.namespace` conf to SparkSubmitOperator
URL: https://github.com/apache/airflow/pull/7575#discussion_r385590748
##########
File path: airflow/providers/apache/spark/hooks/spark_submit.py
##########
@@ -208,6 +208,9 @@ def _resolve_connection(self):
self._conn_id, conn_data['master']
)
+ if 'spark.kubernetes.namespace' in self._conf:
+ conn_data['namespace'] = self._conf['spark.kubernetes.namespace']
Review comment:
It's too long a line (would be 147 chars long once we have it indented right), so we'd have to wrap it anyway, at which point the benefit of using a ternary operator goes away.
----------------------------------------------------------------
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
[GitHub] [airflow] Fokko merged pull request #7575: [AIRFLOW-6949] Respect
explicit `spark.kubernetes.namespace` conf to SparkSubmitOperator
Posted by GitBox <gi...@apache.org>.
Fokko merged pull request #7575: [AIRFLOW-6949] Respect explicit `spark.kubernetes.namespace` conf to SparkSubmitOperator
URL: https://github.com/apache/airflow/pull/7575
----------------------------------------------------------------
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
[GitHub] [airflow] zhongjiajie commented on a change in pull request #7575:
[AIRFLOW-6949] Respect explicit `spark.kubernetes.namespace` conf to
SparkSubmitOperator
Posted by GitBox <gi...@apache.org>.
zhongjiajie commented on a change in pull request #7575: [AIRFLOW-6949] Respect explicit `spark.kubernetes.namespace` conf to SparkSubmitOperator
URL: https://github.com/apache/airflow/pull/7575#discussion_r385480964
##########
File path: airflow/providers/apache/spark/hooks/spark_submit.py
##########
@@ -208,6 +208,9 @@ def _resolve_connection(self):
self._conn_id, conn_data['master']
)
+ if 'spark.kubernetes.namespace' in self._conf:
+ conn_data['namespace'] = self._conf['spark.kubernetes.namespace']
Review comment:
Maybe better change line 204, WDYT
```py
conn_data['namespace'] = self._conf['spark.kubernetes.namespace'] if 'spark.kubernetes.namespace' in self._conf else extra.get('namespace')
```
----------------------------------------------------------------
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
[GitHub] [airflow] ashb commented on a change in pull request #7575:
[AIRFLOW-6949] Respect explicit `spark.kubernetes.namespace` conf to
SparkSubmitOperator
Posted by GitBox <gi...@apache.org>.
ashb commented on a change in pull request #7575: [AIRFLOW-6949] Respect explicit `spark.kubernetes.namespace` conf to SparkSubmitOperator
URL: https://github.com/apache/airflow/pull/7575#discussion_r385590748
##########
File path: airflow/providers/apache/spark/hooks/spark_submit.py
##########
@@ -208,6 +208,9 @@ def _resolve_connection(self):
self._conn_id, conn_data['master']
)
+ if 'spark.kubernetes.namespace' in self._conf:
+ conn_data['namespace'] = self._conf['spark.kubernetes.namespace']
Review comment:
It's too long a line, so we'd have to wrap it anyway, at which point the benefit of using a ternary operator goes away.
----------------------------------------------------------------
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