Closed naveenbussari closed 7 months ago
The issue may not be directly related to the Bitnami container image or Helm chart, but rather to how the application is being utilized or configured in your specific environment.
Having said that, if you think that's not the case and are interested in contributing a solution, we welcome you to create a pull request. The Bitnami team is excited to review your submission and offer feedback. You can find the contributing guidelines here.
Your contribution will greatly benefit the community. Feel free to reach out if you have any questions or need assistance.
If you have any questions about the application itself, customizing its content, or questions about technology and infrastructure usage, we highly recommend that you refer to the forums and user guides provided by the project responsible for the application or technology.
With that said, we'll keep this ticket open until the stale bot automatically closes it, in case someone from the community contributes valuable insights.
For now fixed this issue by changing the spark_kubernetes_operator.py . I've modified the execute method as follows to fail the task when the driver pod ran into Error state
elif event["type"] == "MODIFIED":
pod_status_info = event['object']
self.log.info(f"printing type of object: {type(pod_status_info)}")
self.log.info(f"\n printing the event : {pod_status_info.status.phase}")
if pod_status_info.status.phase == "Succeeded":
self.log.info(f"\n sparkapplication is {name} successfully completed")
break
elif pod_status_info.status.phase == "Failed":
self.log.info(f"\n sparkapplication {name} is failed")
raise AirflowException(f"SparkApplication {name} failed")
else:
continue
else:
break
But still not able to fetch xcom returns though.
This Issue has been automatically marked as "stale" because it has not had recent activity (for 15 days). It will be closed if no further activity occurs. Thanks for the feedback.
Due to the lack of activity in the last 5 days since it was marked as "stale", we proceed to close this Issue. Do not hesitate to reopen it later if necessary.
Name and Version
bitnami/airflow:2.6.0
What architecture are you using?
amd64
What steps will reproduce the bug?
default_args={ 'depends_on_past': False, }
with DAG( 'spark-dag', default_args=default_args, description='sample spark dag', schedule_interval=timedelta(days=1), start_date=datetime(2022, 11, 17), catchup=False, tags=['maps'] ) as dag: t1 = SparkKubernetesOperator( task_id='sample-spark', application_file="spark/sample-spark/sample-spark.yaml", namespace="incentives", do_xcom_push=True, dag=dag )
t2 = SparkKubernetesSensor( task_id='spark-sensor', namespace="incentives", application_name="{{ task_instance.xcom_pull(task_ids='sample-spark')['metadata']['name'] }}", attach_log=True, poke_interval=5, dag=dag ) t1 >> t2
these dag and spark.yaml were working fine in the 2.0.2 version of airflow
Are you using any custom parameters or values?
No.
What is the expected behavior?
Expecting behaviour would be sparkKubernetesOperator task fails when sparkjob fails. At least the the xcom should return something related to the task.
What do you see instead?
We see a null value in xcom. SparkKubernetesOperator task succeeds even though the sparkjob failed.