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

Implement strict argument checking #5071

Merged
merged 20 commits into from Dec 7, 2021

Commits on Nov 29, 2021

  1. Add the outline of failing tests

    kellysutton committed Nov 29, 2021
    Copy the full SHA
    18eb9ac View commit details
    Browse the repository at this point in the history
  2. Implement argument checking

    kellysutton committed Nov 29, 2021
    Copy the full SHA
    0152412 View commit details
    Browse the repository at this point in the history
  3. Move argument checking into Sidekiq::JobUtil#validate

    kellysutton committed Nov 29, 2021
    Copy the full SHA
    bc41eec View commit details
    Browse the repository at this point in the history
  4. Refactor acceptable class definition into a constant to cut down on a…

    …rray allocations
    kellysutton committed Nov 29, 2021
    Copy the full SHA
    7e258b7 View commit details
    Browse the repository at this point in the history
  5. Improve error message, match raise call formatting to other errors in…

    … the class
    kellysutton committed Nov 29, 2021
    Copy the full SHA
    fbe4884 View commit details
    Browse the repository at this point in the history

Commits on Nov 30, 2021

  1. 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>
    kellysutton and edamamez committed Nov 30, 2021
    Copy the full SHA
    5c63649 View commit details
    Browse the repository at this point in the history
  2. Swap out JSON.load for JSON.parse per the security CI check

    Co-authored-by: Eda Zhou <eda.zhou@gusto.com>
    kellysutton and edamamez committed Nov 30, 2021
    Copy the full SHA
    8512cb0 View commit details
    Browse the repository at this point in the history
  3. 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 and edamamez committed Nov 30, 2021
    Copy the full SHA
    9b4ebc1 View commit details
    Browse the repository at this point in the history
  4. Improve test case description

    kellysutton committed Nov 30, 2021
    Copy the full SHA
    29556fe View commit details
    Browse the repository at this point in the history
  5. Warn when job arguments do not serialize safely and point folks towar…

    …d how to enable strict_mode and the best practice
    kellysutton committed Nov 30, 2021
    Copy the full SHA
    279440f View commit details
    Browse the repository at this point in the history

Commits on Dec 1, 2021

  1. Reconfigure the options-hash based approach to a global Sidekiq.stric…

    …t_mode! method
    kellysutton committed Dec 1, 2021
    Copy the full SHA
    9c6d075 View commit details
    Browse the repository at this point in the history
  2. Copy the full SHA
    13b7b77 View commit details
    Browse the repository at this point in the history
  3. Let the error message breathe a little bit

    kellysutton committed Dec 1, 2021
    Copy the full SHA
    7639a5e View commit details
    Browse the repository at this point in the history
  4. Toggle strict_mode! off to suss out a test flake

    kellysutton committed Dec 1, 2021
    Copy the full SHA
    ef45a30 View commit details
    Browse the repository at this point in the history
  5. Capitalize the start of a sentence

    kellysutton committed Dec 1, 2021
    Copy the full SHA
    d784272 View commit details
    Browse the repository at this point in the history

Commits on Dec 2, 2021

  1. Rename job_is_json_safe to json_safe?

    Co-authored-by: Eda Zhou <eda.zhou@gusto.com>
    kellysutton and edamamez committed Dec 2, 2021
    Copy the full SHA
    7010bbc View commit details
    Browse the repository at this point in the history
  2. Refactor a few tests to test a single argument at a time

    Co-authored-by: Eda Zhou <eda.zhou@gusto.com>
    kellysutton and edamamez committed Dec 2, 2021
    Copy the full SHA
    417d656 View commit details
    Browse the repository at this point in the history
  3. 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>
    kellysutton and edamamez committed Dec 2, 2021
    Copy the full SHA
    c5b377c View commit details
    Browse the repository at this point in the history
  4. Change formatting to be more consistent, tighter when arguments are s…

    …imple
    
    Co-authored-by: Eda Zhou <eda.zhou@gusto.com>
    kellysutton and edamamez committed Dec 2, 2021
    Copy the full SHA
    f13214c View commit details
    Browse the repository at this point in the history
  5. Add a flag to disable the warning message for development warning mes…

    …sages
    
    Co-authored-by: Eda Zhou <eda.zhou@gusto.com>
    kellysutton and edamamez committed Dec 2, 2021
    Copy the full SHA
    d26808b View commit details
    Browse the repository at this point in the history