Skip to content

Commit

Permalink
fix(coordinator): Minor fix for coordinator (#4331)
Browse files Browse the repository at this point in the history
Some minor bug fix for coordinator.
  • Loading branch information
zhanglei1949 authored Nov 28, 2024
1 parent c3e9e21 commit 1d118e9
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 4 deletions.
2 changes: 2 additions & 0 deletions charts/graphscope-store/templates/portal/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,8 @@ spec:
value: {{ .Values.portal.runtimePath | quote }}
- name: STUDIO_WRAPPER_ENDPOINT
value: {{ .Values.portal.studioWrapperEndpoint | quote }}
- name: BASEID
value: {{ .Values.portal.baseId | quote }}
- name: SOLUTION
value: "GRAPHSCOPE_INSIGHT"
{{- range $key, $value := .Values.env }}
Expand Down
3 changes: 3 additions & 0 deletions charts/graphscope-store/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,9 @@ portal:
## Request for data loading
##
studioWrapperEndpoint: ""
##
## baseId is the id used for creating odps dataloading job
baseId: ""
## @param hostIPC Specify if host IPC should be enabled for pods
##
hostIPC: false
Expand Down
13 changes: 9 additions & 4 deletions coordinator/gscoordinator/flex/core/insight/job.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
import datetime
import http.client
import json
import logging
import time
import urllib.parse

Expand All @@ -35,6 +36,7 @@
from gscoordinator.flex.core.utils import encode_datetime
from gscoordinator.flex.models import JobStatus

logger = logging.getLogger("graphscope")

class FetchDataloadingJobStatus(object):
def __init__(self, graph, status: JobStatus):
Expand Down Expand Up @@ -307,12 +309,14 @@ def run(self):
json.dumps(configini),
headers={"Content-type": "application/json"},
)
r = conn.getresponse()
if r.status > 400 and r.status < 600:
resp = conn.getresponse()
data = resp.read().decode("utf-8")
if resp.status != 200:
logger.error("Failed to submit dataloading job, code: ", resp.status, ", data: ", data)
raise RuntimeError(
"Failed to submit dataloading job: " + r.read().decode("utf-8")
"Failed to submit dataloading job, code: ", resp.status, ", data: ", data
)
rlt = json.loads(r.read().decode("utf-8"))
rlt = json.loads(data)
if rlt["success"]:
self._jobid = rlt["data"]
status = self.generate_job_status(
Expand All @@ -325,6 +329,7 @@ def run(self):
log=rlt["message"],
)
except Exception as e:
logger.error("Exception occured: ", str(e))
status = self.generate_job_status(
status="FAILED", end_time=datetime.datetime.now(), log=str(e)
)
Expand Down

0 comments on commit 1d118e9

Please sign in to comment.