Commit Graph

176 Commits

Author SHA1 Message Date
Omar Brikaa 12fec39897 Merge master into nix-packages and fix conflicts 2022-07-03 11:39:54 +02:00
Thomas Hobson 0c0be54505
Fix #495 2022-07-02 01:46:44 +12:00
Omar Brikaa 5526071f00 Set jobs permissions on startup 2022-06-30 13:19:44 +02:00
Omar Brikaa 605bef684a Get rid of v3 endpoint 2022-06-28 17:35:32 +02:00
Omar Brikaa 8969ac96fc Include runtime in execution query 2022-06-28 17:29:17 +02:00
Thomas Hobson 09eb9e4d90
Merge pull request #475 from Brikaa/fix-websockets
Clear hanging timeouts and parent processes writables
2022-06-08 11:29:37 +12:00
Omar Brikaa a664cd4d49 Rename runtime priorities to mainstream runtimes 2022-06-05 12:24:56 +02:00
Omar Brikaa b50af13787 Implement runtime priorities 2022-06-04 23:14:11 +02:00
Omar Brikaa d33e47e60a Fix runtime finding in v2 endpoint 2022-06-04 22:53:33 +02:00
Thomas Hobson 450f07c951
Merge pull request #473 from Brikaa/fix-nix-versions
Fix nix runtimes versions
2022-05-10 23:18:28 +12:00
Thomas Hobson 46ab4a4ba4
Merge pull request #457 from Brikaa/dont-run-if-compile-error
Piston-Nix: Don't start run stage if compile stage errored
2022-05-10 23:18:06 +12:00
Omar Brikaa e17783297c Clear hanging timeouts and parent processes writables 2022-05-02 19:39:11 +02:00
Omar Brikaa 3b5d1713e1 Destroy stdin if not destroyed 2022-05-02 19:23:15 +02:00
Omar Brikaa 8bb72837b9 Add trailing newline in stdin if it doesn't exist 2022-05-02 15:33:30 +02:00
Omar Brikaa a749db950f Fix the runtimes versions 2022-05-02 14:36:09 +02:00
Omar Brikaa b381271ba9 Add backward compatibility in v2.js
Set run property to compile if it doesn't exist in v2.js
2022-05-02 13:25:46 +02:00
Thomas Hobson 81e315609d
Use `timeout` as fallback for killing process 2022-04-27 03:05:29 +12:00
Thomas Hobson 0ab66f4f5f
Cleanup all zombie processes
Prevents process table exhaustion
2022-04-27 02:51:10 +12:00
Omar Brikaa 2262618c52 Don't start run stage if compile stage errored 2022-03-06 17:24:28 +02:00
Thomas Hobson f113a18cef
Merge pull request #425 from Brikaa/checksum-app-use
checksum fail message undefined, app.use() duplicate
2022-02-26 10:20:55 +13:00
Thomas Hobson 067cf2692f
Merge pull request #451 from Brikaa/get-rid-of-file-language
Get rid of file language logic, remove unneeded requires
2022-02-26 10:15:07 +13:00
Omar Brikaa 89f4da4858 Get rid of file language logic 2022-02-25 18:12:12 +02:00
Thomas Hobson d244f0138c
Merge pull request #442 from Brikaa/refactor-runtimes
Refactor runtimes
2022-02-24 18:25:52 +13:00
Omar Brikaa 30f49f22b1 Nix Piston: Only pass code files to compiling 2022-02-18 14:50:00 +02:00
Omar Brikaa cb834cff3e Refactor runtimes: no globally shared state 2022-02-12 21:21:41 +02:00
Omar Brikaa d5392eafb8 Naming refactor, remove id getter and use index 2022-02-12 21:21:41 +02: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
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
Omar Brikaa 416ade1b76 Refactor config.js 2022-01-28 17:58:00 +02:00
Omar Brikaa 3372ca1954 checksum fail message undefined, app.use() duplicate 2022-01-22 18:56:33 +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