Commit Graph

228 Commits

Author SHA1 Message Date
Omar Brikaa a013613a59 Use Docker volumes and nodemon in development 2022-02-18 13:17:10 +02:00
Omar Brikaa c238ff6254 Add none in runtime sets 2022-02-18 13:17:10 +02:00
Dan Vargas 54a4acd5da Merge branch 'nix-packages' of https://github.com/engineer-man/piston into add-nix-packages 2022-02-07 15:43:59 -07:00
Omar Brikaa 7de631383f Add master features in V3 API, refactor 2022-02-05 15:30:44 +02:00
Omar Brikaa cdd87ca9a1 Refactor config.js 2022-02-05 14:31:29 +02:00
Omar Brikaa 3d61d10373 Merge master 2022-02-05 14:17:46 +02:00
Omar Brikaa 2bdd4768cd RUNTIME_SET env choice in start-dev, websockets 2022-02-04 19:42:57 +02:00
Dan Vargas 9cbec53580 add perl-rename to container and update related runtime scripts 2022-02-04 09:34:01 -07:00
Thomas Hobson ddab59ccdd
add limit overrides to runtime definitions 2022-01-31 17:47:27 +13:00
Thomas Hobson 83e4a1a136
Fix issues after merging upstream
Implements a simple container builder for runtime sets
2022-01-31 17:01:28 +13:00
Thomas Hobson e022e34a37
Add nix runtime testing and pre-installing runtimes 2022-01-31 14:43:54 +13:00
Thomas Hobson 564da5a7eb
BREAKING: replace custom build scripts with nix
General:
- Switched to yarn to better work with nix-based tooling
- Switched package system to use nix. This stops double dependencies and slow cloud compile times, while providing more compile/runtime support to the Nix project
- Removed container builder in favor of internal container tooling
- Package versions no-longer need to be SemVer compliant
- Removed "piston package spec" files, replaced with nix-flake based runtimes
- Exported nosocket and piston-api as packages within the nix-flake
- Removed repo container
- Switched docker building to nix-based container outputting
- Removed docker compose as this is a single container
- Removed package commands from CLI

Packages:
- Move bash, clojure, cobol, node, python2, python3 to new format
- Remainder of packages still need to be moved

v2 API:
- Removed "version" specifier. To select specific versions, use the v3 api
- Removed "/package" endpoints as this doesn't work with the new nix-based system

v3 API:
- Duplicate of v2 API, except instead of passing in a language name an ID is used intead.
2022-01-31 14:42:12 +13:00
Omar Brikaa 9760f8fcf9 config.js: index by key, bug fix and more refactoring 2022-01-30 13:35:16 +02:00
Thomas Hobson e06b59d82c
dockerfile to manage mounting of /nix 2022-01-30 22:32:12 +13:00
Thomas Hobson e2f37b7493
install API in container 2022-01-30 22:32:12 +13:00
Omar Brikaa 416ade1b76 Refactor config.js 2022-01-28 17:58:00 +02:00
Thomas Hobson 142e7912fa
api(config): respect $PORT as used by heroku if no explicit bind address provided 2021-11-26 02:32:28 +13:00
Thomas Hobson c091c117c7
api(job): Decrease safe_call CPU time
By increasing the niceness value of child processes, the scheduler gives less CPU Time to them.
This allows the node process to get more CPU time, and can work through the event queue faster.
2021-11-11 21:34:30 +13:00
Thomas Hobson c7efa5372a
api(job): Switch process cleanup to sync
The system used to use async.
This would result in execution is handed off to other processes.
In the case of a forkbomb was used, it could circumvent the janitor as it consumed more CPU time which would prevent the process janitor from reading the process information in.
2021-11-11 19:27:54 +13:00
Brikaa 19252467cb Use some() instead of filter() in v2.js 2021-10-16 11:50:07 +02:00
Brikaa 64833a0408 pkg(file-0.0.1): Run executable 2021-10-16 11:49:59 +02:00
Brikaa 6ca9606f81 Adhere to project let, const practices in my code 2021-10-16 11:01:17 +02:00
Thomas Hobson 7e5844bcb1
require arleast 1 utf-8 encoded file 2021-10-15 16:14:06 +13:00
Thomas Hobson 0faea205db
Only compile/run files in utf8 encoding 2021-10-14 01:36:29 +13:00
Thomas Hobson 24a352699d
Support for uploading files in base64/hex format 2021-10-14 00:46:49 +13:00
Thomas Hobson 94a5568121
Merge pull request #371 from Brikaa/timeout
-1 for no timeout (infinite timeout)
2021-10-13 23:15:29 +13:00
Thomas Hobson e97b6d426d
Merge pull request #367 from Brikaa/constraints-bug
Fix important constraints bug
2021-10-13 06:43:26 +13:00
Brikaa afd71cc82d Fix env_val bug 2021-10-10 22:08:55 +02:00
Brikaa 2f114d6e54 Fix important constraints bug 2021-10-10 19:20:17 +02:00
Brikaa f973ecf281 Add infinite timeout 2021-10-10 17:18:31 +02:00
Brikaa f2c91acbe6 Piston lint 2021-10-09 18:10:58 +02:00
Brikaa adae6fde2f pkg(dotnet-5.0.201): Added F#.net, F# interactive and VB.net 2021-10-04 17:25:11 +02:00
Brikaa a5c3858100 Add per-language constraint overrides 2021-10-04 17:11:46 +02:00
Brikaa c0f203537c config.js: timeout, overrides 2021-10-04 17:11:46 +02:00
Brikaa 883d584c15 pkg(iverilog-11.0.0): Added iverilog 11.0.0 2021-10-04 17:11:46 +02:00
Thomas Hobson 36d72383a5 rework process janitor
Old process janitor required starting a `ps` process.
This was problematic, as `ps` requires another entry in the process table, which in some cases was impossible as it was exhausted.
2021-10-04 17:11:46 +02:00
Thomas Hobson 5d392effcc api: maximum concurrent jobs and potential fix for gcc 2021-10-04 17:11:46 +02:00
Dan Vargas 15e2e81d96 fix stdin for normal execute 2021-09-22 16:39:26 -05:00
Thomas Hobson 7d05f4e305
Merge branch 'master' into websocket 2021-09-22 08:21:31 +12:00
Brikaa 1250cf213a pkg(rscript-4.1.1): Added R 4.1.1 2021-09-12 14:38:57 +02:00
Thomas Hobson 2386684a05
api: fix file cleanup edge case
Processes could still be spawned writing files after the app has cleaned the dir out, and is ready to clear it out.
Dumb edge case, but oh well.
2021-08-20 01:05:13 +12:00
Thomas Hobson 5cd84ae816
api: allow paths when writing files (#302) 2021-07-22 14:58:41 +12:00
Thomas Hobson 230cb3abe1
bump versions major 2021-07-17 01:00:44 +12:00
Thomas Hobson 5ace2bf0e4
api: websocket init timeout 2021-07-17 00:25:19 +12:00
Thomas Hobson 3436648add
api: signaling process via ws 2021-07-17 00:22:55 +12:00
Thomas Hobson de89acb617
api: Implement Websocket transport for live data 2021-07-16 23:10:44 +12:00
Thomas Hobson c71aea6166
compute hash in chunks.
Previously we were loading the entire package file into memory, then
updating the hash. Now we update the hash with chunks of the data as it is read in.
Should fix #259
2021-05-18 21:07:40 +12:00
Thomas Hobson 543cb11e69
Change package manager request signature 2021-05-08 12:41:41 +12:00
Thomas Hobson b3be57e0b4
lint like rest of codebase 2021-05-08 12:30:40 +12:00
Thomas Hobson 1b7504a191
switch back to startsWith
This is because application/json;charset=utf8 is perfectly valid!
2021-05-08 12:25:04 +12:00