From 4dbe42fcb44cf4d96adb3842f42950cd5c24aaf2 Mon Sep 17 00:00:00 2001 From: khoaguin Date: Mon, 12 Jun 2023 22:00:48 +0700 Subject: [PATCH 1/3] add approval_time to request after it is approved --- packages/syft/src/syft/service/request/request.py | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/syft/src/syft/service/request/request.py b/packages/syft/src/syft/service/request/request.py index de47002d768..536f9f009ef 100644 --- a/packages/syft/src/syft/service/request/request.py +++ b/packages/syft/src/syft/service/request/request.py @@ -206,6 +206,7 @@ def apply(self, context: AuthedServiceContext) -> Result[SyftSuccess, SyftError] change_status.applied = True self.history.append(change_status) + self.approval_time = DateTime.now() self.save(context=context) return Ok(SyftSuccess(message=f"Request {self.id} changes applied")) From 3c5e8c86f6453c736675033571983ebb2b92b992 Mon Sep 17 00:00:00 2001 From: khoaguin Date: Tue, 13 Jun 2023 16:52:57 +0700 Subject: [PATCH 2/3] change Request.approval_time to updated_at --- packages/syft/src/syft/service/request/request.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/syft/src/syft/service/request/request.py b/packages/syft/src/syft/service/request/request.py index 536f9f009ef..2396df53224 100644 --- a/packages/syft/src/syft/service/request/request.py +++ b/packages/syft/src/syft/service/request/request.py @@ -140,7 +140,7 @@ class Request(SyftObject): requesting_user_verify_key: SyftVerifyKey approving_user_verify_key: Optional[SyftVerifyKey] request_time: DateTime - approval_time: Optional[DateTime] + updated_at: Optional[DateTime] node_uid: UID request_hash: str changes: List[Change] @@ -153,7 +153,7 @@ class Request(SyftObject): __attr_unique__ = ["request_hash"] __attr_repr_cols__ = [ "request_time", - "approval_time", + "updated_at", "status", "changes", "requesting_user_verify_key", @@ -206,7 +206,7 @@ def apply(self, context: AuthedServiceContext) -> Result[SyftSuccess, SyftError] change_status.applied = True self.history.append(change_status) - self.approval_time = DateTime.now() + self.updated_at = DateTime.now() self.save(context=context) return Ok(SyftSuccess(message=f"Request {self.id} changes applied")) From 445a3d1bc45a38afa14aee27cdad73e7151d5707 Mon Sep 17 00:00:00 2001 From: khoaguin Date: Tue, 13 Jun 2023 21:47:41 +0700 Subject: [PATCH 3/3] fixing linting issue --- packages/hagrid/hagrid/manifest_template.yml | 42 ++++++++++---------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/packages/hagrid/hagrid/manifest_template.yml b/packages/hagrid/hagrid/manifest_template.yml index 23b6b64ad6d..473a2ffc735 100644 --- a/packages/hagrid/hagrid/manifest_template.yml +++ b/packages/hagrid/hagrid/manifest_template.yml @@ -9,26 +9,26 @@ files: grid: path: packages/grid/ common: - - rabbitmq/rabbitmq.conf - - redis/redis.conf - - seaweedfs/filer.toml - - seaweedfs/s3config.json - - vpn/config.yaml + - rabbitmq/rabbitmq.conf + - redis/redis.conf + - seaweedfs/filer.toml + - seaweedfs/s3config.json + - vpn/config.yaml docker: - - default.env - - docker-compose.build.yml - - docker-compose.dev.yml - - docker-compose.pull.yml - - docker-compose.test.yml - - docker-compose.tls.yml - - docker-compose.yml - - traefik/docker/dynamic-tls.yml - - traefik/docker/dynamic.yml - - traefik/docker/traefik-tls.template.yml - - traefik/docker/traefik.yml - - vpn/headscale.dockerfile - - vpn/tailscale.dockerfile + - default.env + - docker-compose.build.yml + - docker-compose.dev.yml + - docker-compose.pull.yml + - docker-compose.test.yml + - docker-compose.tls.yml + - docker-compose.yml + - traefik/docker/dynamic-tls.yml + - traefik/docker/dynamic.yml + - traefik/docker/traefik-tls.template.yml + - traefik/docker/traefik.yml + - vpn/headscale.dockerfile + - vpn/tailscale.dockerfile k8s: - - devspace.yaml - - traefik/k8s/dynamic.yml - - traefik/k8s/traefik.yml + - devspace.yaml + - traefik/k8s/dynamic.yml + - traefik/k8s/traefik.yml