{"id":19493594,"url":"https://github.com/datapane/infra-hiring-challenge","last_synced_at":"2026-03-01T07:35:12.766Z","repository":{"id":41873127,"uuid":"381697987","full_name":"datapane/infra-hiring-challenge","owner":"datapane","description":"Datapane Infrastructure Engineer Hiring Challenge","archived":false,"fork":false,"pushed_at":"2022-04-25T12:04:36.000Z","size":6,"stargazers_count":1,"open_issues_count":1,"forks_count":3,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-02-25T20:24:15.470Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/datapane.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-06-30T12:40:48.000Z","updated_at":"2022-07-05T10:19:40.000Z","dependencies_parsed_at":"2022-08-11T19:50:57.937Z","dependency_job_id":null,"html_url":"https://github.com/datapane/infra-hiring-challenge","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/datapane/infra-hiring-challenge","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/datapane%2Finfra-hiring-challenge","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/datapane%2Finfra-hiring-challenge/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/datapane%2Finfra-hiring-challenge/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/datapane%2Finfra-hiring-challenge/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/datapane","download_url":"https://codeload.github.com/datapane/infra-hiring-challenge/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/datapane%2Finfra-hiring-challenge/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29964181,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-01T06:55:38.174Z","status":"ssl_error","status_checked_at":"2026-03-01T06:53:04.810Z","response_time":124,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-10T21:26:40.827Z","updated_at":"2026-03-01T07:35:12.748Z","avatar_url":"https://github.com/datapane.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# Python Systems / Infrastructure Hiring Challenge\n\n# Introduction\n\nDatapane is an API-driven product for building analytics reports in Python - part of this includes running user's Python scripts and controlling their execution from a central server. This project simulates some of the necessary tasks required in developing such a system.\n\n# Task\n\nFor this task we'll be building a simple API server with a few endpoints that reolve around accepting arbitary Python code and running it \"securely\".\n\nThe system must run on Linux, and can make use of any client/server technologies of your choice.\n\n## Server\n\nThe API server supports a few endpoints.\n\n`/run-file/`\n\nthis takes as a payload an uploaded python script containing the Python code to run\n\n`/run-json/`\n\nas per `run-file` above, but takes a JSON blob with a field called `code` containing the Python code to run\n\n### Results\n\nYou may decide if the `/run-*` endpoints blocks and return a status code, or whether to implement an non-blocking model with a separate `/status/` endpoint to query each run. \n\nEither way, the server should listen for commands from client and act upon them - it should always be able to accept new messages.\n\n## Running Code\n\nYou need to be able to run arbitrary Python code in a clean environment - i.e. each invocation should not affect the others. You will need to make decisions around venvs, installed libraries and dependencies, and more.\n\n## Securing code\n\nThe uploaded Python code needs to be executed as securely as possible and handle code that may be hostile. As such you'll need to provide protections against user code that may attempt to use excess resources, e.g. time, space, cpu, etc.\n\nYou can look at any collection of technologies to perform sandboxing, such as systemd slices/scopes, podman, docker, chroots, seccomp filtering, and/or anything else\n\n## Technologies\n\n- Build systems, tools, and scripts of your choice, e.g. poetry, `setup.py`, docker, etc.\n- The system must run on Linux and be simple to setup and run\n- Any libraries you may find useful to help your task, we prioritise using existing libraries to accomplish tasks rather than building in-house and/or writing custom code that wouldn't scale to larger use-cases\n\n## Requirements\n\n- You do not need to worry about client/server service discovery - the locations of the systems can be hard-coded, provided as env vars, command-line parameters, etc.\n- Instructions should be provided on how to build / bundle / start the system\n- You should aim to use the latest Python language features, ecosystem, tooling, and libraries where possible\n\n### Optional Features\n\n- Defence is depth is a valid strategy, how many of the sandboxing techniques can be combined\n- Consider how you would improve this approach and productise it - what issues do you foresee and how would you attempt to solve them\n- How would you tackle performance, i.e. delays in spinning up a pod on kubernetes, container startup delays, Python VM startup, reusing / caching files?\n- Tests\n\n# Review\n\nPlease don't spend more than 2-4 hours on this - we're looking to see how you approached the problem and the decisions made rather than a complete solution. This should be a fun challenge rather than a stressful endeavour.\n\nThere is no right answer as such, we will mainly be looking at code quality, software architecture skills, completeness of the solution from a software engineering perspective, and clarity of thought.\n\nOnce completed, please create a PR containing your work, send us an email, and schedule a [second follow-up interview](https://calendar.google.com/calendar/selfsched?sstoken=UU1sbG9QV1hfcHlGfGRlZmF1bHR8ODI1ZjRlZWJlZTY0ZTQ1ZTI4MzNkZThhOGQ5MjZkNzg).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdatapane%2Finfra-hiring-challenge","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdatapane%2Finfra-hiring-challenge","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdatapane%2Finfra-hiring-challenge/lists"}