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 2021/03/05 16:55:08 UTC

[GitHub] [airflow] Pverheijen commented on issue #14619: json.decoder.JSONDecodeError: Expecting property name enclosed in double quotes: line 1 column 2 (char 1)

Pverheijen commented on issue #14619:
URL: https://github.com/apache/airflow/issues/14619#issuecomment-791547020


   Hey @ashb, thank you for the quick reply. My apologies for not adding all required information I incorrectly presumed it would be helpful. 
   
   The DAG that caused the error was the example_python_operator from the docs (https://airflow.apache.org/docs/apache-airflow/1.10.4/_modules/airflow/example_dags/example_python_operator.html).
   
   Different DAG such as the new API (https://airflow.apache.org/docs/apache-airflow/stable/tutorial_taskflow_api.html) also gave the same error unfortunately.
   
   For completeness sake:
   
   My starting point was a helm chart that used the Puckel image for Airflow with some annotations.
   
   I've got another dag that gave an error that it the worker pod didn't have access to the logs. 
   And the example_python_operator DAG used to work on the older version of Airflow that I was running (1.10.3).
   
   Not sure if it's related but here's the error:
   ```
   *** Trying to get logs (last 100 lines) from worker pod  ***
   
   *** Unable to fetch logs from worker pod  ***
   (400)
   Reason: Bad Request
   HTTP response headers: HTTPHeaderDict({'Cache-Control': 'no-cache, private', 'Content-Type': 'application/json', 'Date': 'Tue, 20 Oct 2020 16:29:32 GMT', 'Content-Length': '136'})
   HTTP response body: b'{"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"name must be provided","reason":"BadRequest","code":400}\n'
   ```
   
   Role yaml specification:
   ```
   {{ if .Values.rbac.create }}
   apiVersion: rbac.authorization.k8s.io/v1
   kind: Role
   metadata:
     name: {{ template "airflow.fullname" . }}
     labels:
       app: {{ template "airflow.name" . }}
       chart: {{ template "airflow.chart" . }}
       release: {{ .Release.Name }}
       heritage: {{ .Release.Service }}
   rules:
     - apiGroups:
         - ""
       resources:
         - "pods/log"
       verbs:
         - "get"
         - "list"
     - apiGroups:
         - ""
       resources:
         - "pods"
       verbs:
         - "create"
         - "list"
         - "get"
         - "patch"
         - "watch"
         - "delete"
     - apiGroups:
         - ""
       resources:
         - "pods/exec"
       verbs:
         - "create"
         - "get"
     - apiGroups:
         - ""
       resources:
         - "events"
       verbs:
         - "list"
   {{ end }}
   ```
   
   RoleBinding yaml specification:
   ```
   {{ if .Values.rbac.create }}
   apiVersion: rbac.authorization.k8s.io/v1
   kind: RoleBinding
   metadata:
     name: {{ template "airflow.fullname" . }}
     labels:
       app: {{ template "airflow.name" . }}
       chart: {{ template "airflow.chart" . }}
       release: {{ .Release.Name }}
       heritage: {{ .Release.Service }}
   roleRef:
     apiGroup: rbac.authorization.k8s.io
     kind: Role
     name: {{ template "airflow.fullname" . }}
   subjects:
   - kind: ServiceAccount
     name: {{ template "airflow.serviceAccountName" . }}
     namespace: {{ .Release.Namespace }}
   {{ end }}
   ```
   
   I based the specifications on https://github.com/apache/airflow/issues/11696 
   Different formatting that I hope isn't the problem but if it is, please 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.

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