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 2022/07/25 12:29:57 UTC
[GitHub] [airflow] Lazloo opened a new issue, #25286: Error descript cannot be shown
Lazloo opened a new issue, #25286:
URL: https://github.com/apache/airflow/issues/25286
### Apache Airflow version
2.3.3 (latest released)
### What happened
Unfortunately, I cannot get further information about my actual error because of the following KeyError
```
Traceback (most recent call last):
File "/usr/local/airflow/dags/common/databricks/operator.py", line 59, in execute
_handle_databricks_operator_execution(self, hook, self.log, context)
File "/usr/local/lib/python3.9/site-packages/airflow/providers/databricks/operators/databricks.py", line 64, in _handle_databricks_operator_execution
notebook_error = run_output['error']
KeyError: 'error'
```
### What you think should happen instead
_No response_
### How to reproduce
_No response_
### Operating System
I Assume some Linux distribution
### Versions of Apache Airflow Providers
Astronomer Certified:[ v2.3.3.post1 ](https://www.astronomer.io/downloads/ac/v2-3-3)based on Apache Airflow v2.3.3
Git Version: .release:2.3.3+astro.1+4446ad3e6781ad048c8342993f7c1418db225b25
### Deployment
Astronomer
### Deployment details
_No response_
### Anything else
_No response_
### Are you willing to submit PR?
- [ ] Yes I am willing to submit a PR!
### Code of Conduct
- [X] I agree to follow this project's [Code of Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md)
--
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.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] Lazloo commented on issue #25286: Error description cannot be shown
Posted by GitBox <gi...@apache.org>.
Lazloo commented on issue #25286:
URL: https://github.com/apache/airflow/issues/25286#issuecomment-1194008577
Regarding the Deployment. I currently do not find the concrete version but it is a legacy version (**not** E2)
--
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
[GitHub] [airflow] Lazloo commented on issue #25286: Error description cannot be shown
Posted by GitBox <gi...@apache.org>.
Lazloo commented on issue #25286:
URL: https://github.com/apache/airflow/issues/25286#issuecomment-1194018706
it is based on quay.io/astronomer/ap-airflow:2.3.3-onbuild
Does this help?
--
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
[GitHub] [airflow] Lazloo commented on issue #25286: Error description cannot be shown
Posted by GitBox <gi...@apache.org>.
Lazloo commented on issue #25286:
URL: https://github.com/apache/airflow/issues/25286#issuecomment-1194004837
Here the code that run the deployment:
```
from airflow import AirflowException
from airflow.models import Variable
from airflow.providers.databricks.operators.databricks import (
DatabricksRunNowOperator,
XCOM_RUN_ID_KEY,
XCOM_RUN_PAGE_URL_KEY,
_handle_databricks_operator_execution
)
class DatabricksRunNowAttachOperator(DatabricksRunNowOperator):
"""
Custom operator extending the existing DatabricksRunNowOperator.
The difference is, that it stores the the run_id in a airflow variable and
uses this to attach to the run if the operator is restarted
This pattern avoids newly started jobs in case the operator is restarted, e.g. because of a scheduler restart.
"""
def execute(self, context):
variable_key = f"{context['task_instance_key_str']}_{XCOM_RUN_ID_KEY}"
existing_job_run = Variable.get(key=variable_key, default_var=None)
hook = self._get_hook()
if existing_job_run is None:
self.log.info("No job run found for this task, starting new run in Databricks.")
self.run_id = hook.run_now(self.json)
self.log.debug(f"Job started. Writing run id to job variable {variable_key}")
Variable.set(key=variable_key, value=self.run_id)
else:
self.log.info(f"Found existing job run {existing_job_run} for this task. Attaching to this run.")
self.run_id = existing_job_run
try:
_handle_databricks_operator_execution(self, hook, self.log, context)
except AirflowException as e:
if "failed with terminal state" in str(e):
self.log.debug(f"Databricks job failed. Cleaning job variable {variable_key}")
Variable.delete(key=variable_key)
raise e
self.log.debug(f"Databricks job terminated. Cleaning job variable {variable_key}")
Variable.delete(key=variable_key)
DatabricksRunNowAttachOperator(
task_id=job_config.name,
job_id=job_config.id,
polling_period_seconds=job_config.polling_period_seconds,
retries=job_config.retries
)
```
--
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
[GitHub] [airflow] alexott commented on issue #25286: Error description cannot be shown
Posted by GitBox <gi...@apache.org>.
alexott commented on issue #25286:
URL: https://github.com/apache/airflow/issues/25286#issuecomment-1194010109
what is the version of `apache-airflow-providers-databricks` ? latest?
--
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
[GitHub] [airflow] alexott commented on issue #25286: Error description cannot be shown
Posted by GitBox <gi...@apache.org>.
alexott commented on issue #25286:
URL: https://github.com/apache/airflow/issues/25286#issuecomment-1193999419
What is the version of the Databricks provider? Can you also provide an example of the code - what operator are you using, etc.?
--
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
[GitHub] [airflow] alexott commented on issue #25286: Error description cannot be shown
Posted by GitBox <gi...@apache.org>.
alexott commented on issue #25286:
URL: https://github.com/apache/airflow/issues/25286#issuecomment-1194043765
it looks like it's caused by this PR: https://github.com/apache/airflow/pull/21709/files - I'll investigate 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
[GitHub] [airflow] boring-cyborg[bot] commented on issue #25286: Error descript cannot be shown
Posted by GitBox <gi...@apache.org>.
boring-cyborg[bot] commented on issue #25286:
URL: https://github.com/apache/airflow/issues/25286#issuecomment-1193987650
Thanks for opening your first issue here! Be sure to follow the issue template!
--
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
[GitHub] [airflow] alexott commented on issue #25286: Error description cannot be shown
Posted by GitBox <gi...@apache.org>.
alexott commented on issue #25286:
URL: https://github.com/apache/airflow/issues/25286#issuecomment-1195517678
I know the culprit (linked PR), but I need to get time to fix it (most probably around weekend...)
--
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
[GitHub] [airflow] potiuk commented on issue #25286: Error description cannot be shown
Posted by GitBox <gi...@apache.org>.
potiuk commented on issue #25286:
URL: https://github.com/apache/airflow/issues/25286#issuecomment-1198280762
assigned you then :)
--
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
[GitHub] [airflow] potiuk closed issue #25286: Error description cannot be shown
Posted by GitBox <gi...@apache.org>.
potiuk closed issue #25286: Error description cannot be shown
URL: https://github.com/apache/airflow/issues/25286
--
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
[GitHub] [airflow] potiuk commented on issue #25286: Error description cannot be shown
Posted by GitBox <gi...@apache.org>.
potiuk commented on issue #25286:
URL: https://github.com/apache/airflow/issues/25286#issuecomment-1193993554
Hey @alexott - maybe you or someone from your team can help ?
--
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
[GitHub] [airflow] alexott commented on issue #25286: Error description cannot be shown
Posted by GitBox <gi...@apache.org>.
alexott commented on issue #25286:
URL: https://github.com/apache/airflow/issues/25286#issuecomment-1193995202
What is the version of the Databricks provider?
--
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
[GitHub] [airflow] Lazloo commented on issue #25286: Error description cannot be shown
Posted by GitBox <gi...@apache.org>.
Lazloo commented on issue #25286:
URL: https://github.com/apache/airflow/issues/25286#issuecomment-1194027044
Before we used quay.io/astronomer/ap-airflow:2.2.5-onbuild. After the update we got this error
--
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
[GitHub] [airflow] Lazloo commented on issue #25286: Error description cannot be shown
Posted by GitBox <gi...@apache.org>.
Lazloo commented on issue #25286:
URL: https://github.com/apache/airflow/issues/25286#issuecomment-1195510578
@alexott Could you already find something out?
--
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