Skip to content

Latest commit

 

History

History
21 lines (13 loc) · 1.6 KB

File metadata and controls

21 lines (13 loc) · 1.6 KB

Interactive Monitor

The interactive Monitor attempts to spot and label new/unknown interactives. There are a few ways to identify interactives:

  1. It has been generated from an interactive template, typically these repos will start with interactive-atom-template. Currently this part of the GitHub API is not exposed via cloudquery, so we are using the GitHub API directly until we can commit an upstream change to cloudquery itself.
  2. Objects/artifacts generated by this repository have been spotted in S3. These repos have a config.json or cfg/s3.json. The path field in that file, will correspond to prefixes in an S3 bucket. This indicates that an interactive has gone live.
  3. As above, with a JS file called project.config.js.

These checks can take a while to run, so for now, they live in their own lambda. When we are able to use cloudquery to search for repos generated from templates, and once the numbers have come down a bit, we can move this into repocop proper.

Running locally

On AWS, this lambda is triggered when SNS submits an event to it. Typically, for local development, we don't want a process that involved, so we run the assessRepo function directly, using an example repo. This repo is configurable in src/run-locally.ts.

The lambda is stage aware, and will not attempt to make any changes to repos outside of a PROD environment.

Steps

  1. Navigate to the root of the service-catalogue repo
  2. Run ./script/setup.sh, and follow any prompts it gives you. We are particularly interested in the GitHub setup.
  3. Run npm run start -w interactive-monitor and observe the output.