Skip to content

Commit e506366

Browse files
authored
chore(controller): describe deployment add startup_probe field and volumes empty content verify
1 parent 8545710 commit e506366

2 files changed

Lines changed: 7 additions & 1 deletion

File tree

rootfs/api/models/app.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -451,6 +451,7 @@ def describe_deployment(self, deployment_name):
451451
"image": container["image"],
452452
"command": container.get("command", []),
453453
"args": container.get("args", []),
454+
"startup_probe": container.get("startupProbe", {}),
454455
"liveness_probe": container.get("livenessProbe", {}),
455456
"readiness_probe": container.get("readinessProbe", {}),
456457
"limits": limits,

rootfs/api/views.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -867,7 +867,10 @@ def get_client(self):
867867
def list(self, request, **kwargs):
868868
path = request.query_params.get('path', '')
869869
client = self.get_client()
870-
results = client.get(path, params={"action": "list"}).json()
870+
response = client.get(path, params={"action": "list"})
871+
if response.status_code != 200:
872+
raise DryccException(response.text.replace("\n", ""))
873+
results = response.json()
871874
# fake out pagination for now
872875
pagination = {'results': results, 'count': len(results)}
873876
return Response(data=pagination)
@@ -877,6 +880,8 @@ def retrieve(self, request, **kwargs):
877880
client = self.get_client()
878881
chunk_size = 1024 * 1024 * 2
879882
response = client.get(path, stream=True, params={"action": "get"})
883+
if response.status_code != 200:
884+
raise DryccException(response.text.replace("\n", ""))
880885
return FileResponse(
881886
status=response.status_code,
882887
headers=response.headers,

0 commit comments

Comments
 (0)