All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
0.1.0-rc.8 - 2024-12-27
- Added
HOST
andPORT
settings to allow overriding the host and port of the service. - Added
LOG_LEVEL
setting to allow overriding the log level of the service.
- Fixed logging configuration for
daiv_sandbox
logger, no logs where being written to the console. - Fixed
SENTRY_ENABLE_TRACING
setting to be a boolean or an integer.
0.1.0-rc.7 - 2024-12-16
- Added
ping
method toSandboxDockerSession
to check if the Docker client is responding.
- Changed
health
endpoint to check if the Docker client is responding and avoid starting the service if it is not responding. - Changed default
DOCKER_GID
to991
.
0.1.0-rc.6 - 2024-12-12
- Added
SENTRY_ENABLE_TRACING
configuration to enable Sentry tracing. - Added
EXPOSE 8000
to theDockerfile
to explicitly expose the port.
- Updated dependencies:
ipython
from 8.29 to 8.30pyopenssl
from 24.2.1 to 24.3.0ruff
from 0.8.0 to 0.8.2
0.1.0-rc.5 - 2024-12-11
- Added
Dockerfile
args to allow overriding the application UID and GID, and docker GID.
- Fixed the
Dockerfile
to create theapp
user with the correct group and user IDs to avoid permission issues. - Fixed the
Dockerfile
to create thedocker
group with the correct GID to allow theapp
user to access the docker socket.
0.1.0-rc.4 - 2024-12-07
- Added
HEALTHCHECK
to theDockerfile
.
- Fixed
Dockerfile
to create theapp
user with the correct home directory defined.
- Changed
/health/
endpoint to/-/health/
. - Changed
/version/
endpoint to/-/version/
.
0.1.0-rc.3 - 2024-12-07
- Improved
Dockerfile
for production use. - Updated dependencies:
fastapi
;pydantic
;sentry-sdk
.
- Fixed issue on
run_id
being passed as anUUID
to theSandboxDockerSession
class instead of astr
. - Fixed missing
curl
dependency onDockerfile
for healthcheck.
0.1.0-rc.2 - 2024-11-26
- Added endpoint to run python code.
- Improved
README.md
to include required security configuration options to usegVisor
as the container runtime. - Changed folder where runs are stored to
/runs
instead of/tmp
. - Changed
execute_command
to extract changed files even if the command fails. - Changed
execute_command
to allow conditionally extracting changed files. - Renamed
ForbiddenError
toErrorMessage
to be more generic. - Updated dependencies:
ruff
from 0.7.4 to 0.8.0pydantic
from 2.10.0 to 2.10.2sentry-sdk
from 2.18.0 to 2.19.0
- Removed
mounts
parameter fromSandboxDockerSession
because it was not being used.
0.1.0-rc.1 - 2024-11-20
- Added logging to the application.
- Added
__version__
to the project. - Added
health
endpoint to check if the service is healthy. - Added
version
endpoint to get the version of the service. - Added API Key authentication to command run endpoint.
- Added more metadata to the OpenAPI schema.
- Added support to pass a
workdir
to the command run endpoint. - Added to settings
KEEP_TEMPLATE
to allow keeping image templates after command execution. - Added to settings
RUNTIME
to allow choosing the container runtime.
- Changed
Pydantic
models to specificschemas.py
file. - Changed way to declare
root_path
of endpoints to be more maintainable. - Changed the way to extract changed files from the container, now it returns changed files by the executed command.
- Changed
README.md
to include usage examples, security information and configuration options. - Changed
settings
to support loading secrets from/run/secrets
directory. - Changed
settings
to prefix all environment variables withDAIV_SANDBOX_
. - Moved
ipython
dependency todev-dependencies
.
- Removed
--workers
from theCMD
in theDockerfile
to allow scaling using docker replicas. - Removed
PROJECT_NAME
from the configuration. - Removed
get-docker-secret
dependency. - Removed
python-decouple
dependency. - Removed
python-multipart
dependency.
- Fixed issue on command quoting using
shlex.quote
, which was causing double quoting of the command. - Fixed issue on extracting changed files from the container, it was returning a
tar
inside anothertar
. - Fixed Docker image with
latest
tag not being pushed to the repository.
0.1.0-alpha.2 - 2024-11-18
- Changed
execute_command
method to use/bin/sh -c
to properly handle shell quoting.
- Fixed issue extracting changed files from the container when command exited with non-zero code.
- Fixed
containers.run
method to usetty=True
to properly handle interactive sessions.
0.1.0-alpha - 2024-11-16
- Initial release of the daiv-sandbox project.
- Implemented core functionalities for sandbox sessions using Docker.
- Added API endpoint to run commands in a sandboxed container.