prefect: 3.2.7 -> 3.2.13

This commit is contained in:
happysalada
2025-03-19 16:13:44 -04:00
parent bb3980abc0
commit 78c6f86712
2 changed files with 64 additions and 103 deletions
@@ -1,42 +0,0 @@
From a97d5f501ff3125d96e6c64dfa498ca1a598a4bd Mon Sep 17 00:00:00 2001
From: happysalada <raphael@megzari.com>
Date: Sun, 2 Mar 2025 08:30:36 -0500
Subject: [PATCH] feat: ensure ui files are writeable On startup prefect copies
over files from the ui into the ui directory. If for any reason the ui files
were not writeable, the whole setup will fail. This PR ensures that the
copied files are writeable. To give a bit more context, I am currently
packaging Prefect for nixos. Nix having a little bit of a strict build
system, makes sure that the built package has only read-only files. this is
to ensure the build is deterministic. I understand that this might appear as
a detail related to nix build system only. I can patch the source when
building the nix package, but I thought I would try to contribute the patch.
No hard feelings if you are not interested in this patch. Thank you for
developping prefect!
fix formatting
---
src/prefect/server/api/server.py | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/src/prefect/server/api/server.py b/src/prefect/server/api/server.py
index e5b64d527..ac64616ef 100644
--- a/src/prefect/server/api/server.py
+++ b/src/prefect/server/api/server.py
@@ -250,8 +250,14 @@ def copy_directory(directory: str, path: str) -> None:
if os.path.exists(destination):
shutil.rmtree(destination)
shutil.copytree(source, destination, symlinks=True)
+ # ensure copied files are writeable
+ for root, dirs, files in os.walk(destination):
+ for f in files:
+ os.chmod(os.path.join(root, f), 0o600)
else:
shutil.copy2(source, destination)
+ # Ensure copied file is writeable
+ os.chmod(destination, 0o600)
async def custom_internal_exception_handler(
--
2.48.1
+64 -61
View File
@@ -7,7 +7,7 @@
python3Packages.buildPythonApplication rec {
pname = "prefect";
version = "3.2.7";
version = "3.2.13";
pyproject = true;
# Trying to install from source is challenging
@@ -16,13 +16,9 @@ python3Packages.buildPythonApplication rec {
# Source will be missing sdist, uv.lock, ui artefacts ...
src = fetchPypi {
inherit pname version;
hash = "sha256-4kwGrKvDihBi6Gcvcf6ophNI6GGd+M4qR0nnu/AUK1Q=";
hash = "sha256-NJL3KTvSIzUX1JMa/Lfpx2UzsAgqjU/mbndnkG2evTA=";
};
patches = [
./make_ui_files_writeable_on_startup.patch
];
pythonRelaxDeps = [
"websockets"
];
@@ -32,61 +28,68 @@ python3Packages.buildPythonApplication rec {
versioningit
];
dependencies = with python3Packages; [
aiosqlite
alembic
anyio
apprise
asgi-lifespan
asyncpg
cachetools
click
cloudpickle
coolname
cryptography
dateparser
docker
exceptiongroup
fastapi
fsspec
graphviz
griffe
httpcore
httpx
humanize
importlib-metadata
jinja2
jinja2-humanize-extension
jsonpatch
jsonschema
opentelemetry-api
orjson
packaging
pathspec
pendulum
prometheus-client
pydantic
pydantic-core
pydantic-extra-types
pydantic-settings
python-dateutil
python-slugify
python-socks
pytz
pyyaml
readchar
rfc3339-validator
rich
ruamel-yaml
sniffio
sqlalchemy
toml
typer
typing-extensions
ujson
uvicorn
websockets
];
dependencies =
with python3Packages;
[
aiosqlite
alembic
apprise
asyncpg
click
cryptography
dateparser
docker
graphviz
jinja2
jinja2-humanize-extension
humanize
pytz
readchar
sqlalchemy
typer
# client dependencies
anyio
asgi-lifespan
cachetools
cloudpickle
coolname
exceptiongroup
fastapi
fsspec
# graphviz already included
griffe
httpcore
httpx
jsonpatch
jsonschema
opentelemetry-api
orjson
packaging
pathspec
pendulum
prometheus-client
pydantic
pydantic-core
pydantic-extra-types
pydantic-settings
python-dateutil
python-slugify
python-socks
pyyaml
rfc3339-validator
rich
ruamel-yaml
sniffio
toml
typing-extensions
ujson
uvicorn
websockets
uv
]
++ sqlalchemy.optional-dependencies.asyncio
++ httpx.optional-dependencies.http2
++ python-socks.optional-dependencies.asyncio;
optional-dependencies = with python3Packages; {
aws = [