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

Consider alternative to Pickle queues? #28

Open
claudijd opened this issue Jul 27, 2018 · 6 comments
Open

Consider alternative to Pickle queues? #28

claudijd opened this issue Jul 27, 2018 · 6 comments

Comments

@claudijd
Copy link
Contributor

claudijd commented Jul 27, 2018

@moz-hwine mentioned on a #risk thread that...

1.) Pickle queues can be a security hole
2.) JSON is much better suited for caching data

So capturing it so it's not lost feedback.

@claudijd
Copy link
Contributor Author

@moz-hwine would you mind pointing to a proof of concept or example of using JSON as a queuing/rotation capability like we're using pickle today?

Basically, we need a way to rotate through team members and make an assignment per run. We also need the script to be able to recognize that the config list has changed, restore to preserve the order, and re-write the new rotation for future runs. The existing assigner.py works this way with pickle, and I welcome feedback on how to do it better/safer.

@gdestuynder
Copy link
Contributor

it doesnt really matter for local data (theres no "security hole" to my knowledge - pickles are eval'ed hence dangerous if used with untrusted data, which isnt the case here)

that said, you can also use a sqlitedb - or with json/yaml you just rewrite the file (please do not rewrite the config file though, config files are to be read-only)

@hwine
Copy link

hwine commented Jul 30, 2018

or even tinydb: you get query access, while data is stored as JSON. (i.e. very accessible from jq, etc)

@claudijd
Copy link
Contributor Author

claudijd commented Aug 6, 2018

I'm not seeing a clear benefit to making this change based on the context above. Closing for now.

@claudijd claudijd closed this as completed Aug 6, 2018
@gdestuynder
Copy link
Contributor

note that if moved to lambda this will have to change regardless

@claudijd
Copy link
Contributor Author

Agreed, reopening for that sake.

@claudijd claudijd reopened this Aug 13, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants