Skip to content

Commit

Permalink
remove prefect-cloud storage (#6)
Browse files Browse the repository at this point in the history
  • Loading branch information
jakekaplan authored Feb 5, 2025
1 parent 4434e30 commit 5beed6a
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 139 deletions.
61 changes: 0 additions & 61 deletions src/prefect_cloud/bundle.py

This file was deleted.

37 changes: 0 additions & 37 deletions src/prefect_cloud/client.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
from typing import Any
from uuid import UUID, uuid4

from prefect.client.orchestration import PrefectClient
from prefect.exceptions import ObjectNotFound
Expand Down Expand Up @@ -60,18 +59,6 @@ async def ensure_managed_work_pool(

return work_pool.name

@staticmethod
def create_pull_steps(
storage_id: UUID,
) -> list[dict[str, Any]]:
return [
{
"prefect.deployments.steps.run_shell_script": {
"script": f"uv run https://raw.githubusercontent.com/jakekaplan/prefectx/refs/heads/main/src/prefectx/pull_steps/retrieve_code.py {storage_id}"
}
}
]

async def create_managed_deployment(
self,
deployment_name: str,
Expand All @@ -96,30 +83,6 @@ async def create_managed_deployment(

return deployment_id

async def create_code_storage(self) -> UUID:
response = await self._client.post(
"/mex/storage/",
json={"hash": str(uuid4()), "labels": {}},
)
return UUID(response.json()["id"])

async def upload_code_to_storage(self, storage_id, contents: str):
await self._client.post(
"/mex/storage/upload",
data={"mex_storage_id": str(storage_id)},
files={"file": ("code", contents)},
)

async def download_code_from_storage(self, storage_id: UUID) -> dict[str, str]:
response = await self._client.get(f"/mex/storage/{storage_id}")
return response.json()["data"]

async def set_deployment_id(self, storage_id: UUID, deployment_id: UUID):
await self._client.patch(
f"/mex/storage/set-deployment-id/{storage_id}",
json={"deployment_id": str(deployment_id)},
)

async def create_credentials_secret(self, name: str, credentials: str):
try:
existing_block = await self.read_block_document_by_name(
Expand Down
41 changes: 0 additions & 41 deletions src/prefect_cloud/pull_steps/retrieve_code.py

This file was deleted.

0 comments on commit 5beed6a

Please sign in to comment.