Skip to content
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

Record and Playback #68

Open
cswales opened this issue Nov 11, 2022 · 6 comments
Open

Record and Playback #68

cswales opened this issue Nov 11, 2022 · 6 comments
Assignees
Labels
2 MediumPriority - chromatik nice to fix but can go live without it

Comments

@cswales
Copy link
Collaborator

cswales commented Nov 11, 2022

Need to be able to save a recording, and then play it back.

Would very much like to have the ability to specify via command line which recording to play back. I think that the first pass on this feature automatically picks up a file with a pre-defined name, which is going to cause some amount of wailing and gnashing of teeth when files get overwritten.

(We could try to fix this by modifying the run script, and just copying files in the script)

@mcslee
Copy link
Collaborator

mcslee commented Nov 11, 2022

For reference, autoplay block of code is here:
https://github.com/squaredproject/Entwined/blob/chromatik/chromatik/src/main/java/entwined/plugin/Entwined.java#L280

Leave it to you guys to change it as you see fit. I've been hesitant to pass all the LX CLI args to plugins, this feels like a potential security issue. I guess I could add some explicit plugin args.

It seems simpler to me that you guys just have your own headless.sh and then you can write whatever kind of CLI-arg parsing you want. And I definitely encourage putting your production files in a read-only dir and having your launch scripts copy them somewhere else so you don't have to worry about them getting destroyed.

e.g. headless.sh --autoplay path/to/whatever.lxr looks nice to me from the CLI and will make the CLI-user happy. Behind the scenes it can quietly make a copy of path/to/whatever.lxr and put it where the code will look for it.

If you set things up that way, I don't think you will have to worry about someone going "oh I'm gonna call java -cp blah.jar --etc --etc directly myself and run it in a way that might overwrite files.

@cswales
Copy link
Collaborator Author

cswales commented Nov 12, 2022

@mcslee - yep, I'm good with putting that stuff in our our own headless.sh

@bbulkow
Copy link
Collaborator

bbulkow commented Nov 13, 2022

Will take on moving the files around. I think it's actually fine with a single well known name.

@bbulkow bbulkow self-assigned this Nov 13, 2022
@bbulkow bbulkow added the 2 MediumPriority - chromatik nice to fix but can go live without it label Nov 13, 2022
@cswales cswales added this to the On Site Testing milestone Nov 15, 2022
@bbulkow
Copy link
Collaborator

bbulkow commented Nov 16, 2022

The files have all been moved around, we run out of the Chromatik directory now.
However, the "--autoplay foo.lxr" has not yet been added or tested. The LXR files are being copied though.

@bbulkow
Copy link
Collaborator

bbulkow commented Nov 19, 2022

Hi Mark, I'd like to use the autoplay option like you've discussed.

I have tested with the current code, it works, and the script is trivial in Mac/Linux, it's just Powershell doesn't make changing working directories back after a crash trivial (at least I haven't found it yet)

I looked at the code, and happy to add it in the plugin, but I don't think I get access to all the cmd line options, right?

Please advise.

@mcslee
Copy link
Collaborator

mcslee commented Nov 20, 2022

Is this enough?
1419299

Merge that if you like. It'll look for autoplay in the ~/Chromatik folder instead of CWD. So you shouldn't need to do any funky stuff. The only potential gotcha with this is that you'll want to make sure to delete any file with that name before running in the case that you don't want autoplay.

Let me know if this is supremely annoying, I can also go ahead and pass some selective args to plugins.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2 MediumPriority - chromatik nice to fix but can go live without it
Projects
None yet
Development

No branches or pull requests

3 participants