Skip to content

Commit

Permalink
Merge branch 'daxa-ai:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
Raj725 authored Sep 16, 2024
2 parents d9646ee + 15857e8 commit 6119125
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 12 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/docker_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
push:
tags:
- "v[0-9].[0-9]+.[0-9]+*"
workflow_dispatch:
jobs:
build-and-push:
name: Build base image
Expand All @@ -21,8 +22,8 @@ jobs:

- name: Get Release Tag
run: |
TAG=$(echo $GITHUB_REF | sed 's/refs\/tags\///')
echo "VERSION=$(echo $TAG | sed 's/v//')" >> $GITHUB_ENV
TAG=$(echo $GITHUB_REF | sed 's/refs\/tags\///')
echo "VERSION=$(echo $TAG | sed 's/v//')" >> $GITHUB_ENV
- name: Build base images
uses: docker/bake-action@v4
Expand All @@ -33,4 +34,5 @@ jobs:
workdir: deploy/docker
targets: base
push: true
no-cache: true

2 changes: 1 addition & 1 deletion deploy/docker/docker-bake.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,5 @@ target "base" {
base_image = "python:3.11"
pebblo_version = "${PEBBLO_VERSION}"
}
platforms = ["linux/amd64", "linux/arm64"]
platforms = ["linux/amd64"]
}
2 changes: 1 addition & 1 deletion pebblo/app/api/req_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ class ReqDiscover(BaseModel):
framework: Framework
chains: Optional[List[ChainInfo]] = None
plugin_version: str
client_version: Framework
client_version: Optional[Framework] = None


class ReqLoaderDoc(BaseModel):
Expand Down
1 change: 1 addition & 0 deletions pebblo/app/models/db_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ class AiBaseApp(BaseModel):
] = [] # list of policy id, title and other details
pebbloServerVersion: Optional[str] = None
pebbloClientVersion: Optional[str] = None
clientVersion: Optional[FrameworkInfo] = None
model_config = ConfigDict(arbitrary_types_allowed=True, use_enum_values=True)


Expand Down
10 changes: 6 additions & 4 deletions pebblo/app/service/discovery/discovery_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,12 @@ def create_app_obj(
current_time = get_current_time()

metadata = Metadata(createdAt=current_time, modifiedAt=current_time)
client_version = FrameworkInfo(
name=self.data.get("client_version", {}).get("name"),
version=self.data.get("client_version", {}).get("version"),
)
client_version = None
if self.data.get("client_version"):
client_version = FrameworkInfo(
name=self.data.get("client_version", {}).get("name"),
version=self.data.get("client_version", {}).get("version"),
)
ai_app_obj = {
"metadata": metadata,
"description": self.data.get("description", "-"),
Expand Down
10 changes: 6 additions & 4 deletions pebblo/app/service/discovery_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,12 @@ def _create_ai_apps_model(
createdAt=self._get_current_datetime(),
modifiedAt=self._get_current_datetime(),
)
client_version = FrameworkInfo(
name=self.data.get("client_version", {}).get("name"),
version=self.data.get("client_version", {}).get("version"),
)
client_version = None
if self.data.get("client_version"):
client_version = FrameworkInfo(
name=self.data.get("client_version", {}).get("name"),
version=self.data.get("client_version", {}).get("version"),
)
ai_apps_model = AiApp(
metadata=metadata,
name=self.data.get("name"),
Expand Down

0 comments on commit 6119125

Please sign in to comment.