Skip to content

Add DangerBot check for AI logging compliance

David O'Regan requested to merge 481845-ai-logging-danger into master

What does this MR do and why?

This merge request implements a new DangerBot check for AI logging in GitLab, addressing the issue raised in #481845. The main goals are:

  1. Ensure compliance with GitLab's AI data usage policies
  2. Warn developers about potentially non-compliant AI logging
  3. Encourage the use of proper AI logging practices

The changes include:

  • A new Dangerfile (danger/ai_logging/Dangerfile) that checks for AI logging calls
  • Logic to detect usage of GitLab::Llm::Logger.build.info and GitLab::Llm::Logger.build.error
  • Warnings when AI logging is not gated behind the expanded_ai_logging feature flag
  • Addition of relevant labels to merge requests containing AI logging

These changes will help maintain good logging practices across AI features in the GitLab repository and reduce the risk of logging sensitive information.

Screenshots or screen recordings

N/A - This change is related to CI checks and does not affect the UI.

Related to #481845

Edited by David O'Regan

Merge request reports

Loading