The open and composable observability and data visualization platform. Visualize metrics, logs, and traces from multiple sources like Prometheus, Loki, Elasticsearch, InfluxDB, Postgres and many more.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
grafana/scripts/codeowners-manifest
Kristina 914df157d6
Correlations: Add E2E tests (#119339)
2 months ago
..
README.md Correlations: Add E2E tests (#119339) 2 months ago
constants.js
generate.js
index.js
metadata.js
raw.js
utils.js Tests: Bootstrapping for CI workflow to compare PR test coverage with main (#116500) 4 months ago

README.md

Codeowners Manifest Scripts

Scripts for generating and caching CODEOWNERS manifest data.

Each of these scripts can be run individually if needed, but index.js is most useful because it combines them all.

Usage

# Combined script
node index.js     # Generate complete manifest with caching

# Individual scripts
node metadata.js  # Generate metadata with hashes
node raw.js       # Generate raw audit data
node generate.js  # Process raw data into manifest files

Control flow of index.js

flowchart TD
    A[index.js] --> B[metadata.js: Generate new metadata]
    B --> C{Existing metadata exists?}
    C -->|No| D[Generate all files]
    C -->|Yes| E{Hashes match?}
    E -->|No| D
    E -->|Yes| F[Skip generation]

    D --> G[raw.js: Generate audit data]
    G --> H[generate.js: Process into JSON files]
    H --> I[Save new metadata]
    I --> J[Complete]

    F --> J

    style F fill:#e1f5fe
    style J fill:#e8f5e8

Default output

By default these scripts will write the following files to the /codeowners-manifest/* directory.

  • audit-raw.jsonl - Raw CODEOWNERS audit data in JSONL format (for fast stream processing)
  • teams.json - List of all codeowners (for validating codeowner names)
  • teams-by-filename.json - Files mapped to their respective codeowners
  • filenames-by-team.json - Codeowners mapped to their respective files
  • metadata.json - Hashes for cache validation

Excluded paths

For a list of excluded paths and filenames, see jest.config.codeowner.js.