Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

spark-on-k8s sensor logs - properly pass defined namespace to pod log call #11199

Merged
merged 1 commit into from
Nov 23, 2020

Conversation

bbenzikry
Copy link
Contributor

This is a follow up to #10023 - it seems that passing the defined namespace to the log call was missed in one of the rebases done during the PR.
Without this fix, logging will fail when the k8s connection uses a different namespace than the one SparkApplication(s) are actually submitted to.

@mik-laj
Copy link
Member

mik-laj commented Sep 30, 2020

Can you add tests to prevent regression?

@bbenzikry
Copy link
Contributor Author

Hi @mik-laj , I changed the code to get both the pod name and namespace from the returned spec, so it should already be covered with existing tests as create_namespaced_custom_object will throw if namespaces aren't equivalent.

@ashb
Copy link
Member

ashb commented Oct 19, 2020

E           AssertionError: Expected call: get_pod_logs('spark_pi-driver')
E           Actual call: get_pod_logs('spark-pi-2020-02-24-1-driver', namespace='default')

You need to update the unittests.

@bbenzikry
Copy link
Contributor Author

@ashb updated

@kaxil
Copy link
Member

kaxil commented Nov 4, 2020

Can you please rebase your PR on latest Master since we have applied Black and PyUpgrade on Master.

It will help if your squash your commits into single commit first so that there are less conflicts.

@bbenzikry
Copy link
Contributor Author

@kaxil Done, sorry for only getting to it now

@github-actions
Copy link

The PR should be OK to be merged with just subset of tests as it does not modify Core of Airflow. The committers might merge it or can add a label 'full tests needed' and re-run it to run all tests if they see it is needed!

@github-actions github-actions bot added the okay to merge It's ok to merge this PR as it does not require more tests label Nov 23, 2020
@kaxil kaxil merged commit c02a3f5 into apache:master Nov 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
okay to merge It's ok to merge this PR as it does not require more tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants