Skip to content
This repository has been archived by the owner on Sep 8, 2020. It is now read-only.

Data schema validation in CircleCI builds #37

Open
nareddyt opened this issue Mar 25, 2018 · 0 comments
Open

Data schema validation in CircleCI builds #37

nareddyt opened this issue Mar 25, 2018 · 0 comments
Labels
enhancement New feature or request good first issue Good for beginners

Comments

@nareddyt
Copy link
Owner

nareddyt commented Mar 25, 2018

Due to the size of the json data files (for both discover deals and cashback rewards), it's hard to detect when the files are changed manually. For example, someone may accidentally delete a character in the file, making the file an invalid json. Or a malicious developer could add a link to their own website in a random deal, and then send a pull request with the modified data (claiming they updated the data with the latest discover data).

Our CircleCI build phase should parse the json data files and perform schema validation. If anything unexpected occurs, it should fail the build with an informative error message.

Example schema validations:

  • Ensure file is a valid JSON
  • Ensure file does not contain empty values
  • Ensure links are all referencing Discover-owned domains
  • Ensure each json object contains the expected keys
@nareddyt nareddyt added enhancement New feature or request good first issue Good for beginners labels Mar 25, 2018
@nareddyt nareddyt changed the title [Low Priority] Data schema validation in CircleCI builds Data schema validation in CircleCI builds Apr 1, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request good first issue Good for beginners
Projects
None yet
Development

No branches or pull requests

1 participant