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
Implement strict argument checking #5071
Commits on Nov 29, 2021
-
Add the outline of failing tests
kellysutton committedNov 29, 2021 -
kellysutton committed
Nov 29, 2021 -
Move argument checking into Sidekiq::JobUtil#validate
kellysutton committedNov 29, 2021 -
Refactor acceptable class definition into a constant to cut down on a…
…rray allocations
kellysutton committedNov 29, 2021 -
Improve error message, match raise call formatting to other errors in…
… the class
kellysutton committedNov 29, 2021
Commits on Nov 30, 2021
-
Address feedback in the Pull Request to use the JSON round-trip method
of confirming the safety of job argument payloads. Cleanup commented-out code from a few years back. Co-authored-by: Eda Zhou <eda.zhou@gusto.com>
-
Swap out JSON.load for JSON.parse per the security CI check
Co-authored-by: Eda Zhou <eda.zhou@gusto.com>
-
Add a few more tests cases to build up confidence around our JSON.par…
…se/dump approach and deep structures Co-authored-by: Eda Zhou <eda.zhou@gusto.com>
-
kellysutton committed
Nov 30, 2021 -
Warn when job arguments do not serialize safely and point folks towar…
…d how to enable strict_mode and the best practice
kellysutton committedNov 30, 2021
Commits on Dec 1, 2021
-
Reconfigure the options-hash based approach to a global Sidekiq.stric…
…t_mode! method
kellysutton committedDec 1, 2021 -
Add a note in the raised error on how to disable the error
kellysutton committedDec 1, 2021 -
Let the error message breathe a little bit
kellysutton committedDec 1, 2021 -
Toggle strict_mode! off to suss out a test flake
kellysutton committedDec 1, 2021 -
Capitalize the start of a sentence
kellysutton committedDec 1, 2021
Commits on Dec 2, 2021
-
Rename job_is_json_safe to json_safe?
Co-authored-by: Eda Zhou <eda.zhou@gusto.com>
-
Refactor a few tests to test a single argument at a time
Co-authored-by: Eda Zhou <eda.zhou@gusto.com>
-
Break out test cases to exercise each individual intersting case inst…
…ead of all at once Co-authored-by: Eda Zhou <eda.zhou@gusto.com>
-
Change formatting to be more consistent, tighter when arguments are s…
…imple Co-authored-by: Eda Zhou <eda.zhou@gusto.com>
-
Add a flag to disable the warning message for development warning mes…
…sages Co-authored-by: Eda Zhou <eda.zhou@gusto.com>