antlr / antlr4-lab

A client/server for trying out and learning about ANTLR
MIT License
39 stars 11 forks source link

Baseline version of share API. #50

Closed hanjoes closed 2 years ago

hanjoes commented 2 years ago

8

Adding a "share" API which generates a UUID and stores the page content in CloudStorage. Will follow up with more changes:

  1. frontend change to display a url with the UUID - maybe just directly go to clipboard.
  2. recover the content using the url generated by share.
  3. README changes to update instructions on boot the server with correct permissions.
  4. ..etc.
hanjoes commented 2 years ago

The current UUID generator is quite naive, we can also try to extend it in the future to reduce the number of UUIDs needed if the content are the same (can temporarily mitigated by adding TTL for the CloudStorage data).

parrt commented 2 years ago

Looks great. Will look in detail soon. One nit: "Persistent" as in PersistentLayer should probably be Persistence :)

ericvergnaud commented 2 years ago

The current UUID generator is quite naive, we can also try to extend it in the future to reduce the number of UUIDs needed if the content are the same (can temporarily mitigated by adding TTL for the CloudStorage data).

Yes TTL is necessary, otherwise Ter will become livid as the S3 bill grows....

parrt commented 2 years ago

Yes TTL is necessary, otherwise Ter will become livid as the S3 bill grows....

haha true! Gotta keep thinking about size. Maybe not just TTL but also max size of storage before we start deleting most ancient.

hanjoes commented 2 years ago

image Yup..already had 30 day retention setup ;) will send more PRs for follow-ups.

parrt commented 1 year ago

I wonder if we don't need a way to persist forever in order for people to submit bug reports using this sharing link. But that opens this up to abuse. dang.

ericvergnaud commented 1 year ago

Can't they attach the stuff to the bug report itself ?

parrt commented 1 year ago

Yes but this makes it easier as they don't have to cut and paste a bunch of times and it's easier for us because we can just click on the link and see the results without having to run it manually through antlr.

An unpleasant solution to throttling is to require people to register an account with lab :(

ericvergnaud commented 1 year ago

we could, from the lab, fetch the attachment by pasting a link to it. Then the 'source' remains attached to the bug report forever, where it belongs ?

parrt commented 1 year ago

Yeah best to have grammar/input/etc... attached to a bug. Actually yeah, how about a button on the lab that contacted your github account and submits a new issue to antlr/antlr4 repo?

ericvergnaud commented 1 year ago

that would be great!