Skip to content

New script to use protected or customized area markers

Guhapriya Balasubramanian requested to merge feature/refactor_and_add_tests into main

https://internal-tracker.builder.ai/#/projects/3651?storyId=1953304

This MR contains the following changes to the code validator image

  1. Removal of the unused .sh scripts
  2. New code validator script validator_with_flags.py that is intended to be used for code validation using Protected Areas for the BE code. The new script is a copy of the old script (the functionality has remained the same) with some modularisation and restructuring
  3. The new script validator_with_flags.py will only allow the use of 2 flags : --protected-area-mode for the BE, --customizable-area-mode for the FE
  4. End to end tests have been added to verify the use of both protected and customized area markers.
  5. Unit tests have been written to verify functionality for protected area markers

The changes have been tested with Ruby and React projects. The MRs below for the BE project, show the pipeline with the validation stage, correctly marking the code change valid or invalid. https://gitlab.builder.ai/builder/builder-bx/Bx/assembler_projects/stg/autobxengpro03077094-42803-ruby/-/merge_requests The MRs below for the FE project, show the pipeline with the validation stage, correctly marking the code change valid or invalid. Note that this uses the old script validator.py but has been tested to ensure nothing is broken with the new image. https://gitlab.builder.ai/builder/builder-bx/Bx/assembler_projects/stg/autobxengpro03077094-42803-react/-/merge_requests

The changes to the pipeline scripts can be found at https://gitlab.builder.ai/public-tools/deploy-templates/-/merge_requests/486

The changes to add notes to the MR based on the validator diff will be taken up as the next activity.

Edited by Guhapriya Balasubramanian

Merge request reports