-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow dev to run alkiln in the playground or something similar #661
Comments
We have a proof of concept! Kiln and puppeteer can run on docassemble, with few caveats that we need to fix:
|
A better articulation of one concern just occurred to me - we're installing npm packages on their server and that's the part that makes me wonder how developers will feel about that. [Maybe we can point them to the lines in the code that install alkiln and (after we shrinkwrap) tell them they can stick to a specific version of alkiln if they want to be extra careful. Would add it as an issue for the documentation about security.] |
Also, here are my notes from the duplicate issue I made about making ALKilnInThePlayground (to be) interview for devs who want to run the tests on their server: The user would install the package on their server and thereafter have access to an interview they could run. At MVP, the interview would allow them to install an available version of ALKiln, pick tags for running the tests, and get the output of the tests. The package needs a better name, but is already being worked on at https://github.com/plocket/docassemble-ALKilnInAPlayground. The finished functionality might be at MVP now. I think the major items missing, if we want to include them in MVP are:
The functionality are MVP includes these:
Things that I think would be nice, but possibly not MVP:
Future features:
|
Also, I'm not clear on what this means:
Does this refer to the puppeteer sandbox? Or another sandbox? |
Non-MVP item 1:
Discussion comments:
Is that the only other env var? Also, might need to test what happens when the server is reloading. Non-MVP item 2:
Discussion comments:
Response: |
IMO, the main purpose of this package is to run npm packages, and that's fairly clear in the naming / functionality. I agree it's good to mention this in the security section, but like you mentioned, there are a lot of other things we can add first, like shrinkwrap, etc.
We talked about this on Teams, but the only time related env vars are the reload timeout seconds (defaults to 30 seconds) and setup seconds (here's a quick search to confirm, but you can also just skim
To get Puppeteer to run we had to turn off the sandbox that uses by default. I don't think this is a good idea to leave on by default; we should make it controlable by a env var until we are able to document a better (and certainly more complicated) way of running Puppeteer in the sandbox (see the first bullet of the comment you quoted).
I looks like you understood that as "devs don't know what projects are and only use the default project", and my intention when I said that was "devs don't know there's any difference between the default project and other projects. It's a weird UX for docassemble to treat them pretty much exactly the same, and then for us to say 'we don't work with the default one'". There is a technical reason behind it, sure, and that's why I don't think it needs to be MVP, but it is going to be confusing, even if documented. |
As one point of interest, I train all of my students to use projects right away (and not to use the default playground for anything). But it's not the most discoverable feature, so someone who learned Docassemble on their own might not know projects exist. I agree the different between the two is a bit abstract, but I wouldn't suggest prioritizing support of the default playground. Mostly because it's something people can get around with a simple extra step and they're already going to be memorizing arbitrary new things to do. |
I think we need to actually spell out/document somewhere our rationale for using |
The best comment about this I found in #614 (comment); IMO the reasons we moved towards
|
* Change cli, session_vars behavior for Playground testing * Try to account for source files that are stored on S3
Just occurred to me that max time per step could also be used for when the test is downloading big files or when it takes a long time to get to the next page. I think they can handle this in a couple ways, though. First, they can give a custom wait time in individual tests. Annoying if you need to do it every time, but still. Second, since devs will now be able to set arbitrary variables, though, they can handle this manually. It might be useful to add that to their config when they first install ALKiln. I'm not sure if it would be necessary to help them update it in the interview - that may complicate the interview unnecessarily. |
The lib has been released and these items copied to SuffolkLITLab/docassemble-ALKilnInThePlayground#8. |
Right now through an interview.
Will add more, but quick note about sandbox: https://github.com/puppeteer/puppeteer/blob/main/docs/troubleshooting.md#setting-up-chrome-linux-sandbox
[Edit:
See list of items to complete below
]
The text was updated successfully, but these errors were encountered: