Commit Graph

54 Commits

Author SHA1 Message Date
Ethan Roseman 23a3087a38 Sentry issue fixes (#900)
* Catch login failures and raise an exception

* Trying to fix library serialization crap (not working)

* Use validated_data instead of data

* Promments
2023-10-26 03:37:38 +09:00
Robin Lambertz e1c33d47d3 Support libraries in decomp.me (#843)
* Add script to download libraries, and download directx

* Add libraries endpoint

* Allow compiling with a library

* Add new libraries tab in frontend

* Add libraries support in CI

* Better look for the libraries

* Give pretty names to libraries

* Move Libraries to live under CompilerOpts

* typechecking hackery

* Make libraries trigger autorecomp and set the unsaved flag

* Fix libraryVersions

* Add new libraries download script to CI, docker and docs

---------

Co-authored-by: Ethan Roseman <ethteck@gmail.com>
2023-09-30 14:54:40 +09:00
ConorB 962af205a5 Add django-session-timeout (#690)
* Add django-session-timeout

* Copy default SESSION_COOKIE_AGE into .env

---------

Co-authored-by: ConorBobbleHat <c.github@firstpartners.net>
2023-02-25 11:18:40 +09:00
Ethan Roseman 4df3ff8121 sentry 2023-01-30 19:39:35 +09:00
ConorB 906aa4a8a8 Switch timeout mechanism to subprocess.run (#659)
* Switch to subprocess.run for timeouts

* [experiment] Set CI TIMEOUT_SCALE_FACTOR to 1

* supress parameterized.expand error in event of no compilers, change TIMEOUT_SCALE_FACTOR in CI to 2

* Exempt dummy compilers from nsjail bind mounts, disable nsjail time limits

* Don't run timeout test on windows

* Decouple test_compiler_timeout's timeout from global timeout settings, reset TIMEOUT_SCALE_FACTOR to 10

* Have DummyLongRunningCompiler subclass DummyCompiler

* Have a timeout of zero disable timeouts entirely

* Skip test_zero_timeout on windows

* black

Co-authored-by: ConorBobbleHat <c.github@firstpartners.net>
2023-01-21 03:04:27 +09:00
ConorB 721a08ccdf Make exception_on_timeout production-compatible, add more timeouts (#653)
* Force exception_on_timeout to use spawn to make gunicorn happy

* black

* Have test_fpr_reg_names_output and test_giant_compilation test for success as opposed to a lack of output

* Refactor timeouts for:
- compiling
- decompiling
- assembling
- disassembling

* Move m2c timeout wrapper to prevent interfering with StringIO

* Increase default timeouts by an order of magnitude to investigate failing CI tests

* Add timeout scale factor, have CI timeouts be 10x default

Co-authored-by: ConorBobbleHat <c.github@firstpartners.net>
2023-01-15 01:28:48 +09:00
ConorB 560a3d4455 Implement timeouts for m2c and compiler invocations (#628)
As this title suggests, this PR caps the runtime for all compiler / m2c
calls. Currently, the timeout is five seconds for both.

There may well be a better place to put the compile timeout; as ever,
happy to change :)

Co-authored-by: ConorBobbleHat <ConorBobbleHat>
2022-12-26 19:44:44 +09:00
Alex Bates 2e96373ac7 Projects list, creation, settings pages (#542)
* add projects list

* new project page

* mypy

* allow '.' in github identifiers

* implement project create

* project settings

* disallow anons from being project members

* uploadable project icon

* docker attempt

* fix tests

* add tests

* add description form

* refactor to add useEntity and FieldSet

* move FieldSet out of subdirectory

* use same page for project tabs

* scroll up to UnderlineNav when tab changes

* stylelint

* configure vscode mypy extension

* mypy

* fix mypy and dmypy

dmypy does not support follow_imports=silent. Instead we explicitly
disable most checks for asm_differ and m2c, which
has the same effect

* remove redundant mypy flags

* FieldSet style tweaks

* give UnderlineNav horiz padding

* fix swr mutate of project header

* few tweaks to help docker (#550)

* eth changes

* use POST/DELETE rather than PUT for project members

* add migration

* fix pr creation

* simplify project platform derivation

Co-authored-by: Mark Street <22226349+mkst@users.noreply.github.com>
Co-authored-by: Ethan Roseman <ethteck@gmail.com>
2022-10-07 20:12:18 +09:00
Mark Street 0569c48e95 Add nginx to docker-compose + revert to Ubuntu 20.04 (#501) 2022-08-09 01:11:27 +09:00
Ethan Roseman 91131f9b4d Revert "Replace wine with wibo (#484)"
This reverts commit e67c36d5a7.
2022-07-29 11:41:20 -04:00
Ethan Roseman e67c36d5a7 Replace wine with wibo (#484)
* Remove wine from the project and reference WiBo

* Install wibo in ci, readme update

* Update Docker instance to Ubuntu 22.04 (#485)

* wibo 0.1.1

* remove unnecessary build args

* wibo 0.2.1

* wibo 0.2.1 in Dockerfile

Co-authored-by: Mark Street <22226349+mkst@users.noreply.github.com>
2022-07-23 11:59:30 -04:00
Ethan Roseman f50b3c32b8 disallow_untyped_defs for mypy (#477)
* Make mypy happy

* failing tests

* working

* use consistent annotation format

* remove comments
2022-07-03 23:43:59 +09:00
Ethan Roseman eb7534be0d Black (#380)
* Initial format

* action

* git subrepo pull --force backend/asm_differ

subrepo:
  subdir:   "backend/asm_differ"
  merged:   "ee239a2b"
upstream:
  origin:   "https://github.com/simonlindholm/asm-differ"
  branch:   "main"
  commit:   "ee239a2b"
git-subrepo:
  version:  "0.4.3"
  origin:   "https://github.com/ingydotnet/git-subrepo"
  commit:   "2f68596"

* git subrepo pull --force backend/mips_to_c

subrepo:
  subdir:   "backend/mips_to_c"
  merged:   "6704d61f"
upstream:
  origin:   "https://github.com/matt-kempster/mips_to_c"
  branch:   "master"
  commit:   "6704d61f"
git-subrepo:
  version:  "0.4.3"
  origin:   "https://github.com/ingydotnet/git-subrepo"
  commit:   "2f68596"

* vscode

* fix

* .
2022-02-20 23:21:38 +09:00
Alex Bates 1968531ca4 Projects MVP (#292)
Co-authored-by: Matt Kempster <kidpixel@gmail.com>
Co-authored-by: Mark Street <streetster@gmail.com>
2022-02-18 17:48:51 +00:00
Ethan Roseman 7f54b56f48 oopth 2022-02-16 13:18:19 +09:00
MonsterDruide1 d43fdfd5e6 Remove FRONTEND_BASE (#352) 2022-02-11 02:46:20 +09:00
Alex Bates b96dd0315d ScratchViewSet + search box (#285)
* initial scratch viewset impl

* use scratch2 on frontend

* todo

* viewset

* permissions

* fix mypy

* add TerseScratchSerializer

* mypy

* add FRONTEND_BASE

* add search box

* use get_html_url

* scratch default name

* always show search icon

* oops

* add platform icon to search results

* very oops

* improve searchbox stability

* fix requirements

* don't autosave on compiler change

* add Search to ScratchToolbar

* Nav frog padding tweak

* frog hover state

* click away bug

* fix weird search result click bugs

* recompile on visit another scratch
2022-01-04 03:00:12 +09:00
Ethan Roseman f929174399 Dummy compiler + better error handling and reporting (#246)
* Initial work on dummy compiler + better exception / error stuff

* mypy

* Add more dummy functionality, fix some error handling, and organize views

* Imports, suggestion

* force include the dummy compiler

* attempt to fix issues

* Fix docker?

* undo dumb

* suggestion

* sugg2

* Turn off sandbox on winders

* oops

* PR suggestions, a new test, cleanup

* mypy

* Front-end dummy compiler, logging fix

* new prod option that removes dummy

* Cleanup, fixes

* cleanup

* more cleanin

* PROD -> DUMMY_COMPILER, move dummy config out of fs

* DJANGO_LOG_LEVEL as environ setting

* fix Dockerfile

* suggestion

* dummy off
2021-12-26 20:30:21 +09:00
Mark Street fe97842e24 Hide wine's warnings (#210)
* Hide wine's warnings

* this is getting ridiculous

* Correcting backend Dockerfile

* here we go again

* removing 'f' from non-f string

* wine test & gha stuff

* Don't install mesa stuff

* Get wine test passing in Docker

* Backend docker test

* fixup pr.yaml (attempt 1 of N)

* fixup pr.yaml (attempt 2 of N)

* fixup pr.yaml (attempt 3 of N)

* fixup pr.yaml (attempt 4 of N)

* fixup pr.yaml (attempt 5 of N)

* fixup pr.yaml (attempt 6 of N)

* fixup pr.yaml (attempt 7 of N)

* fixup pr.yaml (attempt 8 of N)

* fixup pr.yaml (attempt 9 of N)

* fixup pr.yaml (attempt 10 of N)

* Updating Dockerfile to bullseye to match GHA builder

* Improve tests

* README.md update

Co-authored-by: Ethan Roseman <ethteck@gmail.com>
2021-11-21 23:23:39 +09:00
Ethan Roseman f5468a5c03 2 more things (#211)
* Ram cache for elf_object (fixes #207) and better diff label detecti
on / explanation (fixes #188)

* PR suggestions
2021-11-20 03:51:11 +09:00
Mark Street d320b2eec9 Enable compilers if content found in compiler directory (#181)
* Enable compilers if content found in compiler directory

* PR feedback
2021-10-16 20:53:33 +09:00
Alex Bates 0e8b01841a Frontend improvements + Docker updates (#167, #169)
Co-authored-by: Mark Street <22226349+mkst@users.noreply.github.com>
2021-10-14 12:52:28 +01:00
alex 7757386396 Migrate to Next.js + big style update (#154)
* Backend changes to diff from label rather than 0, also possibly fix #109

* implement diff_label frontend & fix assemble_asm

* Log stack trace if asm-differ fails

* don't return { obj } from api

* slight change in stub func code

* GET /compilers returns arches for compilers

* GET /compilers returns arches for compilers

* keep compiler_ids

* Obtain ido from download script, add comment for permuter api support

* Clean m2c wrapper code, add left pointer style, add test

* fix 3 tests

* list arches from api

* fix cookies in DEBUG

SameSite=None is incompatible with Secure, and this causes some browsers
to ignore the cookie altogether.

* fix test

Regression due to changing API to not return { "user": User } but
rather just the User object itself.

* fix create scratch without glabel

This works around a backend bug

* add label select on scratch creation

* show compilers/presets for current arch only

- fixes #92
- fixes #132

* fix mypy issues

* use react instead of preact

* hold pages in src/pages/

This matches NextJS file structure; the names of files reflect their routing paths.

* migrate to NextJS

* use next-pwa

* statically generate user page

* fix github login

* add loading progress bar

* arch on scratch

* nav redesign

* use .env.local instead of local.env

* fix unset compiler not considering arch

* add discord server to readme

* big styling update

* add footer

* move compiler dir into components

* use lib dir

* fix ts error

* describe deployment

* dont use NEXT_PUBLIC_* in .env

* add storybook

* document storybook

* make AsyncButton loading state pretty

* remove sharp

* custom monaco editor react component

* ci: build frontend

* allow nextjs to build despite ignored typescript errors

* ci

* remove react-loading-skeleton

* oops

* don't request public_repo github scope

* give AsyncButton error popup its arrow back

* try fix monaco problem

* oops

* fix monaco red bg for real this time

Co-authored-by: Ethan Roseman <ethteck@gmail.com>
2021-10-13 00:49:23 +09:00
alex 4e8b07efaa Diff from label (#151)
* Backend changes to diff from label rather than 0, also possibly fix #109

* implement diff_label frontend & fix assemble_asm

* Log stack trace if asm-differ fails

* don't return { obj } from api

* slight change in stub func code

* GET /compilers returns arches for compilers

* GET /compilers returns arches for compilers

* keep compiler_ids

* Obtain ido from download script, add comment for permuter api support

* Clean m2c wrapper code, add left pointer style, add test

* fix 3 tests

* list arches from api

* fix cookies in DEBUG

SameSite=None is incompatible with Secure, and this causes some browsers
to ignore the cookie altogether.

* fix test

Regression due to changing API to not return { "user": User } but
rather just the User object itself.

* fix create scratch without glabel

This works around a backend bug

* add label select on scratch creation

* show compilers/presets for current arch only

- fixes #92
- fixes #132

* fix mypy issues

* arch on scratch

* use .env.local instead of local.env

* fix unset compiler not considering arch

* fix compiler opts not displaying on first load if compiler is not gcc 2.8.1

Co-authored-by: Ethan Roseman <ethteck@gmail.com>
2021-10-12 00:59:33 +09:00
alex 537eff9a95 Merge branch 'main' into dotenv 2021-09-23 13:25:54 +01:00