[{"data":1,"prerenderedAt":832},["ShallowReactive",2],{"/en-us/blog/developing-gitlab-duo-blending-ai-and-root-cause-analysis-to-fix-ci-cd":3,"navigation-en-us":47,"banner-en-us":458,"footer-en-us":468,"blog-post-authors-en-us-Rutvik Shah|Michael Friedrich":707,"blog-related-posts-en-us-developing-gitlab-duo-blending-ai-and-root-cause-analysis-to-fix-ci-cd":733,"blog-promotions-en-us":770,"next-steps-en-us":822},{"id":4,"title":5,"authorSlugs":6,"authors":9,"body":12,"category":13,"categorySlug":13,"config":14,"content":18,"date":22,"description":19,"extension":29,"externalUrl":30,"featured":16,"heroImage":21,"isFeatured":16,"meta":31,"navigation":16,"path":32,"publishedDate":22,"rawbody":33,"seo":34,"slug":15,"stem":40,"tagSlugs":41,"tags":45,"template":17,"updatedDate":30,"__hash__":46},"blogPosts/en-us/blog/developing-gitlab-duo-blending-ai-and-root-cause-analysis-to-fix-ci-cd.yml","Developing GitLab Duo: Blending AI and Root Cause Analysis to fix CI/CD pipelines",[7,8],"rutvik-shah","michael-friedrich",[10,11],"Rutvik Shah","Michael Friedrich","___Generative AI marks a monumental shift in the software development industry, making it easier to develop, secure, and operate software. Our new blog series, written by our product and engineering teams, gives you an inside look at how we create, test, and deploy the AI features you need integrated throughout the enterprise. Get to know new capabilities within GitLab Duo and how they will help DevSecOps teams deliver better results for customers.___\n\nHave you ever encountered a broken [CI/CD](https://about.gitlab.com/topics/ci-cd/benefits-continuous-integration/) pipeline and had to halt your DevSecOps workflow, or even delay software deployment, as you try to figure out the root cause? Traditionally, when something goes wrong in the process of creating software, developers have to troubleshoot, dig through log files, and often do a lot of trial and error development. [GitLab Duo Root Cause Analysis](https://about.gitlab.com/gitlab-duo-agent-platform/), part of our suite of AI-powered features, removes the guesswork by determining the root cause for a failed CI/CD pipeline. In this article, you'll learn what Root Cause Analysis is and how to apply the AI-powered GitLab Duo feature to your DevSecOps workflow.\n\n> Discover the future of AI-driven software development with our GitLab 17 virtual launch event. [Watch today!](https://about.gitlab.com/eighteen/)\n\n### What is Root Cause Analysis?\n\nGitLab Duo Root Cause Analysis is an AI-powered feature that assists you in determining a root cause and suggesting a fix for a CI/CD job log failure by analyzing the logs.\n\nWhile Root Cause Analysis is often seen in product incident management, its workflows and debugging practices can be found in any DevSecOps workflow. Ops teams, administrators, and platform engineers are challenged by infrastructure-as-code (IaC) deployment errors, Kubernetes and GitOps problems, and long stack traces while investigating pipeline failures.\n\nGitLab Duo Root Cause Analysis keeps everyone in the same interface and uses AI-powered help to summarize, analyze, and propose fixes so that organizations can release secure software faster.\n\nA pipeline can encounter failures for a variety of reasons, including syntax errors in the code, missing dependencies that the pipeline relies on, test failures during the build process, Kubernetes and IaC deployment timeouts, and numerous other potential issues. When such failures occur, it becomes the responsibility of everyone to meticulously review the logs generated by the pipeline. This job log review process involves scrutinizing the detailed output to identify the specific errors and pinpoint the root cause of the pipeline failure. For example, the following pipeline has multiple job failures that need to be investigated and fixed.\n\n![Image depicting multiple job failures](https://res.cloudinary.com/about-gitlab-com/image/upload/v1750097332/Blog/Content%20Images/Blog/Content%20Images/image3_aHR0cHM6_1750097332601.png)\n\nThe duration required to fix these failures can vary significantly and is largely influenced by several factors such as:\n- the developer's familiarity with the project\n- their level of experience in dealing with similar issues\n- their overall skill level in troubleshooting and problem-solving within the context of the pipeline.\n\nManual analysis can be exceedingly challenging and time-consuming, given that log data consists of application logs and system messages with a wide variety of potential sources of failures. A typical pipeline fix can consist of several iterations and context switching. The complexity and the unstructured nature of the logs is a perfect fit for speeding up the task using generative AI.  Using AI can reduce the time to identify and fix a pipeline error significantly and also lower the barrier of expertise that would be needed to fix a pipeline such as the above.\n\nWatch GitLab Duo Root Cause Analysis in action:\n\n\u003C!-- blank line -->\n\n\u003Cfigure class=\"video_container\">\n\n \u003Ciframe src=\"https://www.youtube.com/embed/sTpSLwX5DIs?si=J6-0Bf6PtYjrHX1K\" frameborder=\"0\" allowfullscreen=\"true\"> \u003C/iframe>\n\n\u003C/figure>\n\n\u003C!-- blank line -->\n\n### How does Root Cause Analysis work?\n\n[Root Cause Analysis](https://docs.gitlab.com/user/ai_experiments/#root-cause-analysis) works by forwarding a portion of the CI/CD job log to the [GitLab AI Gateway](https://docs.gitlab.com/architecture/blueprints/ai_gateway/). GitLab ensures that the portion sent will fit inside the large language model (LLM) token limits alongside a prompt that has been pre-crafted to provide insights into why the job might have failed. The prompt also instructs the LLM to provide an example of how a user might fix a broken job.\n\nHere are two example scenarios where Root Cause Analysis can provide assistance.\n\n#### 1. Analyze a Python dependency error\n\nA Python application can import package modules with functionality that is not provided in the standard library. The project [Challenge - Root Cause Analysis - Python Config](https://gitlab.com/gitlab-da/use-cases/ai/ai-workflows/gitlab-duo-challenges/root-cause-analysis/challenge-root-cause-analysis-python-config) implements an application that parses configuration and initializes an SQLite database, which both work well without any dependencies. It uses best practices in CI/CD with a Python environment and caching. The latest feature implementation adds a Redis caching client, and now the CI/CD build is failing for some reason.\nBy using Root Cause Analysis, you can immediately learn that the `ModuleNotFoundError` text means that the module is actually not installed in the Python environment. GitLab Duo also suggests an example fix: Installing the Redis module through the PIP package manager.\n![Image depicting 'modulenotfounderror' and GL Duo suggested resolution](https://res.cloudinary.com/about-gitlab-com/image/upload/v1750097332/Blog/Content%20Images/Blog/Content%20Images/image2_aHR0cHM6_1750097332602.png)\n\nThe failing pipeline can be viewed [here](https://gitlab.com/gitlab-da/use-cases/ai/ai-workflows/gitlab-duo-challenges/root-cause-analysis/challenge-root-cause-analysis-python-config/-/jobs/6992716398).\nThe Root Cause Analysis prompt provides a summary of the problem, which seems to be a problem with a missing `redis` module. Let's try to fix the problem by installing the `redis` module. You can either call `pip install redis` in the CI/CD job `script` section, or use a more sophisticated approach with the `requirements.txt` file. The latter is useful for a single source of truth for dependencies installed in the development environment and CI/CD pipelines.\n\n```yaml\ntest:\n  extends: [.python-req]\n  stage: test   before_script:\n    # [🦊] hint: Root cause analysis.\n    # Solution 1: Install redis using pip\n    - pip install redis\n    # Solution 2: Add redis to requirements.txt, use pip\n    - pip install -r requirements.txt\n  script:\n    - python src/main.py\n```\n\nAfter fixing the missing Python dependency, the CI/CD job fails again. Use Root Cause Analysis again to learn that no Redis service is running in the job. Switch to using GitLab Duo Chat and use the prompt `How to start a Redis service in CI/CD` to learn how to configure the `services` attribute in the CI/CD job.\n\n![Depicts the prompt for how to start a Redis service](https://res.cloudinary.com/about-gitlab-com/image/upload/v1750097333/Blog/Content%20Images/Blog/Content%20Images/image6_aHR0cHM6_1750097332602.png)\n\nModify the `.gitlab-ci.yml` with the `test` job, and specify the `redis` service.\n\n```yaml\ntest:\n  extends: [.python-req]\n  stage: test   before_script:\n    # [🦊] hint: Root cause analysis.\n    # Solution 1: Install redis using pip\n    - pip install redis\n    # Solution 2: Add redis to requirements.txt, use pip\n    - pip install -r requirements.txt\n  script:\n    - python src/main.py\n\n  # Solution 3 - Running Redis\n  services:\n    - redis\n```\n\nRunning the Redis server allows you to successfully execute the Python application, and print its output into the CI/CD job log.\n\n![output of Python application](https://res.cloudinary.com/about-gitlab-com/image/upload/v1750097332/Blog/Content%20Images/Blog/Content%20Images/image4_aHR0cHM6_1750097332603.png)\n\nThe solution is provided in the [solution/ directory](https://gitlab.com/gitlab-da/use-cases/ai/ai-workflows/gitlab-duo-challenges/root-cause-analysis/challenge-root-cause-analysis-python-config/-/tree/main/solution?ref_type=heads).\n\n**Tip:** You can also ask [GitLab Duo Chat](https://docs.gitlab.com/user/gitlab_duo_chat/) to follow up on potential future problems:\n\n```markdown\nHow to lint Python code? Which tools are recommended for CI/CD.\nHow to pin a package version in Python requirements file?\t\nWhat are possible ways that this exception stacktrace is triggered in the future?\nAre there ways to prevent the application from failing?\n```\nThe next example is more advanced and includes multiple failures.\n#### 2. Analyze missing Go runtime\n\nCI/CD jobs can be executed in containers, spawned from the contributed `image` attribute. If the container does not provide a programming language runtime, the executed `script` sections referencing the `go` binary fail. For example, the error message `/bin/sh: eval: line 149: go: not found` needs to be understood and fixed.\nIf the `go` command is not found in the container's runtime context, this can have multiple reasons:\n\n1. The job uses a minimal container image, for example `alpine`, and the Go language runtime was not installed.\n1. The job uses the wrong default container image, for example, specified on top of the CI/CD configuration, or using the `default` keyword.\n1. The job does not use a container image but the shell executor. The host operating system does not have the Go language runtime installed, or it is otherwise broken/not configured.\n\nThe project [Challenge - Root Cause Analysis - Go GitLab Release Fetcher](https://gitlab.com/gitlab-da/use-cases/ai/ai-workflows/gitlab-duo-challenges/root-cause-analysis/challenge-root-cause-analysis-go-gitlab-release-fetcher) provides an exercise challenge to analyze and fix CI/CD problems with a GitLab release fetcher application, written in Go. The `build` and `docker-build` CI/CD jobs are failing. Fixing the problem requires different scopes: Understanding why the Go runtime is not installed, and learning about the `Dockerfile` syntax.\n![Screenshot showing Change Docker Label job failed](https://res.cloudinary.com/about-gitlab-com/image/upload/v1750097332/Blog/Content%20Images/Blog/Content%20Images/image5_aHR0cHM6_1750097332603.png)\n\nThe [`solution/` directory](https://gitlab.com/gitlab-da/use-cases/ai/ai-workflows/gitlab-duo-challenges/root-cause-analysis/challenge-root-cause-analysis-go-gitlab-release-fetcher) provides two possible solutions after Root Cause Analysis.\n## Practice using Root Cause Analysis\n\nHere are some scenarios to use to practice using Root Cause Analysis.\n\n- When you are running into Kubernetes deployment errors or timeouts.\n- With OpenTofu or Terraform IaC pipelines failing to provision your cloud resources.\n\n- When the Ansible playbook fails with a cryptic permission error in CI/CD.\n\n- When the Java stack trace is 10 pages long.\n\n- With a shell script highlighting an execution error.\n\n- When a Perl script fails in a single line, which is the only line in the script.\n\n- When the CI/CD job times out and it is unclear which section would cause this.\n\n- When a network connection timeout is reached, and you think it cannot be DNS.\n\n### What is next for GitLab Duo Root Cause Analysis?\n\nWe want to help our users to get their pipelines back to passing in fewer iterations. The Root Cause Analysis will open and show the response in GitLab Duo Chat, our AI assistant. Users can build on the recommendation to generate a more precise fix by asking specific questions (e.g., programming language-specific fixes) or asking for alternative fixes based on the root cause.\n\nFor example, here is the Root Cause Analysis for a failing job:\n\n![Root Cause Analysis response](https://res.cloudinary.com/about-gitlab-com/image/upload/v1750097332/Blog/Content%20Images/Blog/Content%20Images/image1_aHR0cHM6_1750097332603.png)\n\nUsers can ask follow-up questions that build upon the AI-generated response.\n\n- I do not want to create my own Docker image. Please explain different ways to fix the problem.\n\n- I don't have access to the Docker image creation. It seems that the Go binary is missing. Are there alternative images you can suggest?\n\nGitLab also will be running quality benchmarks for the generated responses and shipping usability improvements.\n\nPlease see our [Root Cause Analysis GA epic](https://gitlab.com/groups/gitlab-org/-/epics/13080) for more details. We would also love your feedback on the feature. Please leave a comment on our [Root Cause Analysis feedback issue](https://gitlab.com/groups/gitlab-org/-/epics/13872).\n\n## Get started with Root Cause Analysis\n\nPlease see our [documentation](https://docs.gitlab.com/user/ai_experiments/#root-cause-analysis) on how to enable the feature available to our GitLab Ultimate customers. Also, GitLab Duo Root Cause Analysis will soon be coming to GitLab self-managed and GitLab Dedicated.\n\nNot a GitLab Ultimate customer? Start [a free trial](https://gitlab.com/-/trial_registrations/new?glm_source=about.gitlab.com/blog&glm_content=default-saas-trial) today.\n## Read more of our \"Developing GitLab Duo\" series\n\n- [Developing GitLab Duo: How we validate and test AI models at scale](https://about.gitlab.com/blog/developing-gitlab-duo-ai-impact-analytics-dashboard-measures-the-roi-of-ai/)\n\n- [Developing GitLab Duo: AI Impact analytics dashboard measures the ROI of AI](https://about.gitlab.com/blog/developing-gitlab-duo-ai-impact-analytics-dashboard-measures-the-roi-of-ai/)\n\n- [Developing GitLab Duo: How we are dogfooding our AI features](https://about.gitlab.com/blog/developing-gitlab-duo-ai-impact-analytics-dashboard-measures-the-roi-of-ai/)\n\n- [Developing GitLab Duo: Secure and thoroughly test AI-generated code](https://about.gitlab.com/blog/how-gitlab-duo-helps-secure-and-thoroughly-test-ai-generated-code/)","ai-ml",{"slug":15,"featured":16,"template":17},"developing-gitlab-duo-blending-ai-and-root-cause-analysis-to-fix-ci-cd",true,"BlogPost",{"title":5,"description":19,"authors":20,"heroImage":21,"date":22,"body":12,"category":13,"tags":23},"Discover how we've infused Root Cause Analysis with AI to help remedy broken CI/CD pipelines, including example scenarios and take-away exercises.",[10,11],"https://res.cloudinary.com/about-gitlab-com/image/upload/v1750097321/Blog/Hero%20Images/Blog/Hero%20Images/blog-hero-banner-1-0178-820x470-fy25_7JlF3WlEkswGQbcTe8DOTB_1750097321081.png","2024-06-06",[24,25,26,27,28],"AI/ML","tutorial","DevSecOps","DevSecOps platform","features","yml",null,{},"/en-us/blog/developing-gitlab-duo-blending-ai-and-root-cause-analysis-to-fix-ci-cd","seo:\n  title: >-\n    GitLab Duo: AI-powered CI/CD pipeline root cause analysis\n  description: >-\n    Discover how we've infused Root Cause Analysis with AI to help remedy broken\n    CI/CD pipelines, including example scenarios and take-away exercises.\n  ogTitle: >-\n    GitLab Duo: AI-powered CI/CD pipeline root cause analysis\n  ogDescription: >-\n    Discover how we've infused Root Cause Analysis with AI to help remedy broken\n    CI/CD pipelines, including example scenarios and take-away exercises.\n  noIndex: false\n  ogImage: >-\n    https://res.cloudinary.com/about-gitlab-com/image/upload/v1750097321/Blog/Hero%20Images/Blog/Hero%20Images/blog-hero-banner-1-0178-820x470-fy25_7JlF3WlEkswGQbcTe8DOTB_1750097321081.png\n  ogUrl: >-\n    https://about.gitlab.com/blog/developing-gitlab-duo-blending-ai-and-root-cause-analysis-to-fix-ci-cd\n  ogSiteName: https://about.gitlab.com\n  ogType: article\n  canonicalUrls: >-\n    https://about.gitlab.com/blog/developing-gitlab-duo-blending-ai-and-root-cause-analysis-to-fix-ci-cd\n\ncontent:\n  title: >-\n    Developing GitLab Duo: Blending AI and Root Cause Analysis to fix CI/CD\n    pipelines\n  description: >-\n    Discover how we've infused Root Cause Analysis with AI to help remedy broken\n    CI/CD pipelines, including example scenarios and take-away exercises.\n  authors:\n    - Rutvik Shah\n    - Michael Friedrich\n  heroImage: >-\n    https://res.cloudinary.com/about-gitlab-com/image/upload/v1750097321/Blog/Hero%20Images/Blog/Hero%20Images/blog-hero-banner-1-0178-820x470-fy25_7JlF3WlEkswGQbcTe8DOTB_1750097321081.png\n  date: '2024-06-06'\n  body: \"___Generative AI marks a monumental shift in the software development\n    industry, making it easier to develop, secure, and operate software. Our new\n    blog series, written by our product and engineering teams, gives you an\n    inside look at how we create, test, and deploy the AI features you need\n    integrated throughout the enterprise. Get to know new capabilities within\n    GitLab Duo and how they will help DevSecOps teams deliver better results for\n    customers.___\n\n\n    Have you ever encountered a broken\n    [CI/CD](https://about.gitlab.com/topics/ci-cd/benefits-continuous-integrati\\\n    on/) pipeline and had to halt your DevSecOps workflow, or even delay\n    software deployment, as you try to figure out the root cause? Traditionally,\n    when something goes wrong in the process of creating software, developers\n    have to troubleshoot, dig through log files, and often do a lot of trial and\n    error development. [GitLab Duo Root Cause\n    Analysis](https://about.gitlab.com/gitlab-duo-agent-platform/), part of our suite of\n    AI-powered features, removes the guesswork by determining the root cause for\n    a failed CI/CD pipeline. In this article, you'll learn what Root Cause\n    Analysis is and how to apply the AI-powered GitLab Duo feature to your\n    DevSecOps workflow.\n\n\n    > Discover the future of AI-driven software development with our GitLab 17\n    virtual launch event. [Watch today!](https://about.gitlab.com/eighteen/)\n\n\n    ### What is Root Cause Analysis?\n\n\n    GitLab Duo Root Cause Analysis is an AI-powered feature that assists you in\n    determining a root cause and suggesting a fix for a CI/CD job log failure by\n    analyzing the logs.\n\n\n    While Root Cause Analysis is often seen in product incident management, its\n    workflows and debugging practices can be found in any DevSecOps workflow.\n    Ops teams, administrators, and platform engineers are challenged by\n    infrastructure-as-code (IaC) deployment errors, Kubernetes and GitOps\n    problems, and long stack traces while investigating pipeline failures.\n\n\n    GitLab Duo Root Cause Analysis keeps everyone in the same interface and uses\n    AI-powered help to summarize, analyze, and propose fixes so that\n    organizations can release secure software faster.\n\n\n    A pipeline can encounter failures for a variety of reasons, including syntax\n    errors in the code, missing dependencies that the pipeline relies on, test\n    failures during the build process, Kubernetes and IaC deployment timeouts,\n    and numerous other potential issues. When such failures occur, it becomes\n    the responsibility of everyone to meticulously review the logs generated by\n    the pipeline. This job log review process involves scrutinizing the detailed\n    output to identify the specific errors and pinpoint the root cause of the\n    pipeline failure. For example, the following pipeline has multiple job\n    failures that need to be investigated and fixed.\n\n\n    ![Image depicting multiple job\n    failures](https://res.cloudinary.com/about-gitlab-com/image/upload/v1750097\\\n    332/Blog/Content%20Images/Blog/Content%20Images/image3_aHR0cHM6_17500973326\\\n    01.png)\n\n\n    The duration required to fix these failures can vary significantly and is\n    largely influenced by several factors such as:\n\n    - the developer's familiarity with the project\n\n    - their level of experience in dealing with similar issues\n\n    - their overall skill level in troubleshooting and problem-solving within\n    the context of the pipeline.\n\n\n    Manual analysis can be exceedingly challenging and time-consuming, given\n    that log data consists of application logs and system messages with a wide\n    variety of potential sources of failures. A typical pipeline fix can consist\n    of several iterations and context switching. The complexity and the\n    unstructured nature of the logs is a perfect fit for speeding up the task\n    using generative AI.  Using AI can reduce the time to identify and fix a\n    pipeline error significantly and also lower the barrier of expertise that\n    would be needed to fix a pipeline such as the above.\n\n\n    Watch GitLab Duo Root Cause Analysis in action:\n\n\n    \u003C!-- blank line -->\n\n\n    \u003Cfigure class=\\\"video_container\\\">\n\n\n    \\ \u003Ciframe\n    src=\\\"https://www.youtube.com/embed/sTpSLwX5DIs?si=J6-0Bf6PtYjrHX1K\\\"\n    frameborder=\\\"0\\\" allowfullscreen=\\\"true\\\"> \u003C/iframe>\n\n\n    \u003C/figure>\n\n\n    \u003C!-- blank line -->\n\n\n    ### How does Root Cause Analysis work?\n\n\n    [Root Cause\n    Analysis](https://docs.gitlab.com/user/ai_experiments/#root-cause-an\\\n    alysis) works by forwarding a portion of the CI/CD job log to the [GitLab AI\n    Gateway](https://docs.gitlab.com/architecture/blueprints/ai_gateway/).\n    GitLab ensures that the portion sent will fit inside the large language\n    model (LLM) token limits alongside a prompt that has been pre-crafted to\n    provide insights into why the job might have failed. The prompt also\n    instructs the LLM to provide an example of how a user might fix a broken\n    job.\n\n\n    Here are two example scenarios where Root Cause Analysis can provide\n    assistance.\n\n\n    #### 1. Analyze a Python dependency error\n\n\n    A Python application can import package modules with functionality that is\n    not provided in the standard library. The project [Challenge - Root Cause\n    Analysis - Python\n    Config](https://gitlab.com/gitlab-da/use-cases/ai/ai-workflows/gitlab-duo-c\\\n    hallenges/root-cause-analysis/challenge-root-cause-analysis-python-config)\n    implements an application that parses configuration and initializes an\n    SQLite database, which both work well without any dependencies. It uses best\n    practices in CI/CD with a Python environment and caching. The latest feature\n    implementation adds a Redis caching client, and now the CI/CD build is\n    failing for some reason.\\\n\n\n    By using Root Cause Analysis, you can immediately learn that the\n    `ModuleNotFoundError` text means that the module is actually not installed\n    in the Python environment. GitLab Duo also suggests an example fix:\n    Installing the Redis module through the PIP package manager.\\\n\n\n    ![Image depicting 'modulenotfounderror' and GL Duo suggested\n    resolution](https://res.cloudinary.com/about-gitlab-com/image/upload/v17500\\\n    97332/Blog/Content%20Images/Blog/Content%20Images/image2_aHR0cHM6_175009733\\\n    2602.png)\n\n\n    The failing pipeline can be viewed\n    [here](https://gitlab.com/gitlab-da/use-cases/ai/ai-workflows/gitlab-duo-ch\\\n    allenges/root-cause-analysis/challenge-root-cause-analysis-python-config/-/\\\n    jobs/6992716398).\\\n\n\n    The Root Cause Analysis prompt provides a summary of the problem, which\n    seems to be a problem with a missing `redis` module. Let's try to fix the\n    problem by installing the `redis` module. You can either call `pip install\n    redis` in the CI/CD job `script` section, or use a more sophisticated\n    approach with the `requirements.txt` file. The latter is useful for a single\n    source of truth for dependencies installed in the development environment\n    and CI/CD pipelines.\n\n\n    ```yaml\n\n    test:\n\n    \\  extends: [.python-req]\n\n    \\  stage: test\\\n\n    \\  before_script:\n\n    \\    # [🦊] hint: Root cause analysis.\n\n    \\    # Solution 1: Install redis using pip\n\n    \\    - pip install redis\n\n    \\    # Solution 2: Add redis to requirements.txt, use pip\n\n    \\    - pip install -r requirements.txt\\\n\n\n    \\  script:\n\n    \\    - python src/main.py\n\n    ```\n\n\n    After fixing the missing Python dependency, the CI/CD job fails again. Use\n    Root Cause Analysis again to learn that no Redis service is running in the\n    job. Switch to using GitLab Duo Chat and use the prompt `How to start a\n    Redis service in CI/CD` to learn how to configure the `services` attribute\n    in the CI/CD job.\n\n\n    ![Depicts the prompt for how to start a Redis\n    service](https://res.cloudinary.com/about-gitlab-com/image/upload/v17500973\\\n    33/Blog/Content%20Images/Blog/Content%20Images/image6_aHR0cHM6_175009733260\\\n    2.png)\n\n\n    Modify the `.gitlab-ci.yml` with the `test` job, and specify the `redis`\n    service.\n\n\n    ```yaml\n\n    test:\n\n    \\  extends: [.python-req]\n\n    \\  stage: test\\\n\n    \\  before_script:\n\n    \\    # [🦊] hint: Root cause analysis.\n\n    \\    # Solution 1: Install redis using pip\n\n    \\    - pip install redis\n\n    \\    # Solution 2: Add redis to requirements.txt, use pip\n\n    \\    - pip install -r requirements.txt\\\n\n\n    \\  script:\n\n    \\    - python src/main.py\n\n\n    \\  # Solution 3 - Running Redis\n\n    \\  services:\n\n    \\    - redis\n\n    ```\n\n\n    Running the Redis server allows you to successfully execute the Python\n    application, and print its output into the CI/CD job log.\n\n\n    ![output of Python\n    application](https://res.cloudinary.com/about-gitlab-com/image/upload/v1750\\\n    097332/Blog/Content%20Images/Blog/Content%20Images/image4_aHR0cHM6_17500973\\\n    32603.png)\n\n\n    The solution is provided in the [solution/\n    directory](https://gitlab.com/gitlab-da/use-cases/ai/ai-workflows/gitlab-du\\\n    o-challenges/root-cause-analysis/challenge-root-cause-analysis-python-confi\\\n    g/-/tree/main/solution?ref_type=heads).\n\n\n    **Tip:** You can also ask [GitLab Duo\n    Chat](https://docs.gitlab.com/user/gitlab_duo_chat/) to follow up on\n    potential future problems:\n\n\n    ```markdown\n\n    How to lint Python code? Which tools are recommended for CI/CD.\n\n    How to pin a package version in Python requirements file?\\t\n\n    What are possible ways that this exception stacktrace is triggered in the\n    future?\n\n    Are there ways to prevent the application from failing?\n\n    ```\\\n\n\n    The next example is more advanced and includes multiple failures.\\\n\n\n    #### 2. Analyze missing Go runtime\n\n\n    CI/CD jobs can be executed in containers, spawned from the contributed\n    `image` attribute. If the container does not provide a programming language\n    runtime, the executed `script` sections referencing the `go` binary fail.\n    For example, the error message `/bin/sh: eval: line 149: go: not found`\n    needs to be understood and fixed.\\\n\n\n    If the `go` command is not found in the container's runtime context, this\n    can have multiple reasons:\n\n\n    1. The job uses a minimal container image, for example `alpine`, and the Go\n    language runtime was not installed.\n\n    1. The job uses the wrong default container image, for example, specified on\n    top of the CI/CD configuration, or using the `default` keyword.\n\n    1. The job does not use a container image but the shell executor. The host\n    operating system does not have the Go language runtime installed, or it is\n    otherwise broken/not configured.\n\n\n    The project [Challenge - Root Cause Analysis - Go GitLab Release\n    Fetcher](https://gitlab.com/gitlab-da/use-cases/ai/ai-workflows/gitlab-duo-\\\n    challenges/root-cause-analysis/challenge-root-cause-analysis-go-gitlab-rele\\\n    ase-fetcher) provides an exercise challenge to analyze and fix CI/CD\n    problems with a GitLab release fetcher application, written in Go. The\n    `build` and `docker-build` CI/CD jobs are failing. Fixing the problem\n    requires different scopes: Understanding why the Go runtime is not\n    installed, and learning about the `Dockerfile` syntax.\\\n\n\n    ![Screenshot showing Change Docker Label job\n    failed](https://res.cloudinary.com/about-gitlab-com/image/upload/v175009733\\\n    2/Blog/Content%20Images/Blog/Content%20Images/image5_aHR0cHM6_1750097332603\\\n    .png)\n\n\n    The [`solution/`\n    directory](https://gitlab.com/gitlab-da/use-cases/ai/ai-workflows/gitlab-du\\\n    o-challenges/root-cause-analysis/challenge-root-cause-analysis-go-gitlab-re\\\n    lease-fetcher) provides two possible solutions after Root Cause Analysis.\\\n\n\n    ## Practice using Root Cause Analysis\n\n\n    Here are some scenarios to use to practice using Root Cause Analysis.\n\n\n    - When you are running into Kubernetes deployment errors or timeouts.\\\n\n\n    - With OpenTofu or Terraform IaC pipelines failing to provision your cloud\n    resources.\n\n\n    - When the Ansible playbook fails with a cryptic permission error in CI/CD.\n\n\n    - When the Java stack trace is 10 pages long.\n\n\n    - With a shell script highlighting an execution error.\n\n\n    - When a Perl script fails in a single line, which is the only line in the\n    script.\n\n\n    - When the CI/CD job times out and it is unclear which section would cause\n    this.\n\n\n    - When a network connection timeout is reached, and you think it cannot be\n    DNS.\n\n\n    ### What is next for GitLab Duo Root Cause Analysis?\n\n\n    We want to help our users to get their pipelines back to passing in fewer\n    iterations. The Root Cause Analysis will open and show the response in\n    GitLab Duo Chat, our AI assistant. Users can build on the recommendation to\n    generate a more precise fix by asking specific questions (e.g., programming\n    language-specific fixes) or asking for alternative fixes based on the root\n    cause.\n\n\n    For example, here is the Root Cause Analysis for a failing job:\n\n\n    ![Root Cause Analysis\n    response](https://res.cloudinary.com/about-gitlab-com/image/upload/v1750097\\\n    332/Blog/Content%20Images/Blog/Content%20Images/image1_aHR0cHM6_17500973326\\\n    03.png)\n\n\n    Users can ask follow-up questions that build upon the AI-generated response.\n\n\n    - I do not want to create my own Docker image. Please explain different ways\n    to fix the problem.\n\n\n    - I don't have access to the Docker image creation. It seems that the Go\n    binary is missing. Are there alternative images you can suggest?\n\n\n    GitLab also will be running quality benchmarks for the generated responses\n    and shipping usability improvements.\n\n\n    Please see our [Root Cause Analysis GA\n    epic](https://gitlab.com/groups/gitlab-org/-/epics/13080) for more details.\n    We would also love your feedback on the feature. Please leave a comment on\n    our [Root Cause Analysis feedback\n    issue](https://gitlab.com/groups/gitlab-org/-/epics/13872).\n\n\n    ## Get started with Root Cause Analysis\n\n\n    Please see our\n    [documentation](https://docs.gitlab.com/user/ai_experiments/#root-ca\\\n    use-analysis) on how to enable the feature available to our GitLab Ultimate\n    customers. Also, GitLab Duo Root Cause Analysis will soon be coming to\n    GitLab self-managed and GitLab Dedicated.\n\n\n    Not a GitLab Ultimate customer? Start [a free\n    trial](https://gitlab.com/-/trial_registrations/new?glm_source=about.gitlab\\\n    .com/blog&glm_content=default-saas-trial) today.\\\n\n\n    ## Read more of our \\\"Developing GitLab Duo\\\" series\n\n\n    - [Developing GitLab Duo: How we validate and test AI models at\n    scale](https://about.gitlab.com/blog/developing-gitlab-duo-ai-impact-analyt\\\n    ics-dashboard-measures-the-roi-of-ai/)\n\n\n    - [Developing GitLab Duo: AI Impact analytics dashboard measures the ROI of\n    AI](https://about.gitlab.com/blog/developing-gitlab-duo-ai-impact-analytics\\\n    -dashboard-measures-the-roi-of-ai/)\n\n\n    - [Developing GitLab Duo: How we are dogfooding our AI\n    features](https://about.gitlab.com/blog/developing-gitlab-duo-ai-impact-ana\\\n    lytics-dashboard-measures-the-roi-of-ai/)\n\n\n    - [Developing GitLab Duo: Secure and thoroughly test AI-generated\n    code](https://about.gitlab.com/blog/how-gitlab-duo-helps-secure-and-thoroug\\\n    hly-test-ai-generated-code/)\"\n  category: ai-ml\n  tags:\n    - AI/ML\n    - tutorial\n    - DevSecOps\n    - DevSecOps platform\n    - features\nconfig:\n  slug: developing-gitlab-duo-blending-ai-and-root-cause-analysis-to-fix-ci-cd\n  featured: true\n  template: BlogPost\n",{"title":35,"description":19,"ogTitle":35,"ogDescription":19,"noIndex":36,"ogImage":21,"ogUrl":37,"ogSiteName":38,"ogType":39,"canonicalUrls":37},"GitLab Duo: AI-powered CI/CD pipeline root cause analysis",false,"https://about.gitlab.com/blog/developing-gitlab-duo-blending-ai-and-root-cause-analysis-to-fix-ci-cd","https://about.gitlab.com","article","en-us/blog/developing-gitlab-duo-blending-ai-and-root-cause-analysis-to-fix-ci-cd",[42,25,43,44,28],"aiml","devsecops","devsecops-platform",[24,25,26,27,28],"VfI2prRMXptxY0sOjWcWkSRlXwPQfT8qkakozNlDlMA",{"data":48},{"logo":49,"freeTrial":54,"sales":59,"login":64,"items":69,"search":378,"minimal":409,"duo":428,"switchNav":437,"pricingDeployment":448},{"config":50},{"href":51,"dataGaName":52,"dataGaLocation":53},"/","gitlab logo","header",{"text":55,"config":56},"Get free trial",{"href":57,"dataGaName":58,"dataGaLocation":53},"https://gitlab.com/-/trial_registrations/new?glm_source=about.gitlab.com&glm_content=default-saas-trial/","free trial",{"text":60,"config":61},"Talk to sales",{"href":62,"dataGaName":63,"dataGaLocation":53},"/sales/","sales",{"text":65,"config":66},"Sign in",{"href":67,"dataGaName":68,"dataGaLocation":53},"https://gitlab.com/users/sign_in/","sign in",[70,97,192,197,299,359],{"text":71,"config":72,"cards":74},"Platform",{"dataNavLevelOne":73},"platform",[75,81,89],{"title":71,"description":76,"link":77},"The intelligent orchestration platform for DevSecOps",{"text":78,"config":79},"Explore our Platform",{"href":80,"dataGaName":73,"dataGaLocation":53},"/platform/",{"title":82,"description":83,"link":84},"GitLab Duo Agent Platform","Agentic AI for the entire software lifecycle",{"text":85,"config":86},"Meet GitLab Duo",{"href":87,"dataGaName":88,"dataGaLocation":53},"/gitlab-duo-agent-platform/","gitlab duo agent platform",{"title":90,"description":91,"link":92},"Why GitLab","See the top reasons enterprises choose GitLab",{"text":93,"config":94},"Learn more",{"href":95,"dataGaName":96,"dataGaLocation":53},"/why-gitlab/","why gitlab",{"text":98,"left":16,"config":99,"link":101,"lists":105,"footer":174},"Product",{"dataNavLevelOne":100},"solutions",{"text":102,"config":103},"View all Solutions",{"href":104,"dataGaName":100,"dataGaLocation":53},"/solutions/",[106,130,153],{"title":107,"description":108,"link":109,"items":114},"Automation","CI/CD and automation to accelerate deployment",{"config":110},{"icon":111,"href":112,"dataGaName":113,"dataGaLocation":53},"AutomatedCodeAlt","/solutions/delivery-automation/","automated software delivery",[115,119,122,126],{"text":116,"config":117},"CI/CD",{"href":118,"dataGaLocation":53,"dataGaName":116},"/solutions/continuous-integration/",{"text":82,"config":120},{"href":87,"dataGaLocation":53,"dataGaName":121},"gitlab duo agent platform - product menu",{"text":123,"config":124},"Source Code Management",{"href":125,"dataGaLocation":53,"dataGaName":123},"/solutions/source-code-management/",{"text":127,"config":128},"Automated Software Delivery",{"href":112,"dataGaLocation":53,"dataGaName":129},"Automated software delivery",{"title":131,"description":132,"link":133,"items":138},"Security","Deliver code faster without compromising security",{"config":134},{"href":135,"dataGaName":136,"dataGaLocation":53,"icon":137},"/solutions/application-security-testing/","security and compliance","ShieldCheckLight",[139,143,148],{"text":140,"config":141},"Application Security Testing",{"href":135,"dataGaName":142,"dataGaLocation":53},"Application security testing",{"text":144,"config":145},"Software Supply Chain Security",{"href":146,"dataGaLocation":53,"dataGaName":147},"/solutions/supply-chain/","Software supply chain security",{"text":149,"config":150},"Software Compliance",{"href":151,"dataGaName":152,"dataGaLocation":53},"/solutions/software-compliance/","software compliance",{"title":154,"link":155,"items":160},"Measurement",{"config":156},{"icon":157,"href":158,"dataGaName":159,"dataGaLocation":53},"DigitalTransformation","/solutions/visibility-measurement/","visibility and measurement",[161,165,169],{"text":162,"config":163},"Visibility & Measurement",{"href":158,"dataGaLocation":53,"dataGaName":164},"Visibility and Measurement",{"text":166,"config":167},"Value Stream Management",{"href":168,"dataGaLocation":53,"dataGaName":166},"/solutions/value-stream-management/",{"text":170,"config":171},"Analytics & Insights",{"href":172,"dataGaLocation":53,"dataGaName":173},"/solutions/analytics-and-insights/","Analytics and insights",{"title":175,"items":176},"GitLab for",[177,182,187],{"text":178,"config":179},"Enterprise",{"href":180,"dataGaLocation":53,"dataGaName":181},"/enterprise/","enterprise",{"text":183,"config":184},"Small Business",{"href":185,"dataGaLocation":53,"dataGaName":186},"/small-business/","small business",{"text":188,"config":189},"Public Sector",{"href":190,"dataGaLocation":53,"dataGaName":191},"/solutions/public-sector/","public sector",{"text":193,"config":194},"Pricing",{"href":195,"dataGaName":196,"dataGaLocation":53,"dataNavLevelOne":196},"/pricing/","pricing",{"text":198,"config":199,"link":201,"lists":205,"feature":290},"Resources",{"dataNavLevelOne":200},"resources",{"text":202,"config":203},"View all resources",{"href":204,"dataGaName":200,"dataGaLocation":53},"/resources/",[206,239,262],{"title":207,"items":208},"Getting started",[209,214,219,224,229,234],{"text":210,"config":211},"Install",{"href":212,"dataGaName":213,"dataGaLocation":53},"/install/","install",{"text":215,"config":216},"Quick start guides",{"href":217,"dataGaName":218,"dataGaLocation":53},"/get-started/","quick setup checklists",{"text":220,"config":221},"Learn",{"href":222,"dataGaLocation":53,"dataGaName":223},"https://university.gitlab.com/","learn",{"text":225,"config":226},"Product documentation",{"href":227,"dataGaName":228,"dataGaLocation":53},"https://docs.gitlab.com/","product documentation",{"text":230,"config":231},"Best practice videos",{"href":232,"dataGaName":233,"dataGaLocation":53},"/getting-started-videos/","best practice videos",{"text":235,"config":236},"Integrations",{"href":237,"dataGaName":238,"dataGaLocation":53},"/integrations/","integrations",{"title":240,"items":241},"Discover",[242,247,252,257],{"text":243,"config":244},"Customer success stories",{"href":245,"dataGaName":246,"dataGaLocation":53},"/customers/","customer success stories",{"text":248,"config":249},"Blog",{"href":250,"dataGaName":251,"dataGaLocation":53},"/blog/","blog",{"text":253,"config":254},"The Source",{"href":255,"dataGaName":256,"dataGaLocation":53},"/the-source/","the source",{"text":258,"config":259},"Remote",{"href":260,"dataGaName":261,"dataGaLocation":53},"https://handbook.gitlab.com/handbook/company/culture/all-remote/","remote",{"title":263,"items":264},"Connect",[265,270,275,280,285],{"text":266,"config":267},"GitLab Services",{"href":268,"dataGaName":269,"dataGaLocation":53},"/services/","services",{"text":271,"config":272},"Community",{"href":273,"dataGaName":274,"dataGaLocation":53},"/community/","community",{"text":276,"config":277},"Forum",{"href":278,"dataGaName":279,"dataGaLocation":53},"https://forum.gitlab.com/","forum",{"text":281,"config":282},"Events",{"href":283,"dataGaName":284,"dataGaLocation":53},"/events/","events",{"text":286,"config":287},"Partners",{"href":288,"dataGaName":289,"dataGaLocation":53},"/partners/","partners",{"textColor":291,"title":292,"text":293,"link":294},"#000","What’s new in GitLab","Stay updated with our latest features and improvements.",{"text":295,"config":296},"Read the latest",{"href":297,"dataGaName":298,"dataGaLocation":53},"/releases/whats-new/","whats new",{"text":300,"config":301,"lists":303},"Company",{"dataNavLevelOne":302},"company",[304],{"items":305},[306,311,317,319,324,329,334,339,344,349,354],{"text":307,"config":308},"About",{"href":309,"dataGaName":310,"dataGaLocation":53},"/company/","about",{"text":312,"config":313,"footerGa":316},"Jobs",{"href":314,"dataGaName":315,"dataGaLocation":53},"/jobs/","jobs",{"dataGaName":315},{"text":281,"config":318},{"href":283,"dataGaName":284,"dataGaLocation":53},{"text":320,"config":321},"Leadership",{"href":322,"dataGaName":323,"dataGaLocation":53},"/company/team/e-group/","leadership",{"text":325,"config":326},"Team",{"href":327,"dataGaName":328,"dataGaLocation":53},"/company/team/","team",{"text":330,"config":331},"Handbook",{"href":332,"dataGaName":333,"dataGaLocation":53},"https://handbook.gitlab.com/","handbook",{"text":335,"config":336},"Investor relations",{"href":337,"dataGaName":338,"dataGaLocation":53},"https://ir.gitlab.com/","investor relations",{"text":340,"config":341},"Trust Center",{"href":342,"dataGaName":343,"dataGaLocation":53},"/security/","trust center",{"text":345,"config":346},"AI Transparency Center",{"href":347,"dataGaName":348,"dataGaLocation":53},"/ai-transparency-center/","ai transparency center",{"text":350,"config":351},"Newsletter",{"href":352,"dataGaName":353,"dataGaLocation":53},"/company/contact/#contact-forms","newsletter",{"text":355,"config":356},"Press",{"href":357,"dataGaName":358,"dataGaLocation":53},"/press/","press",{"text":360,"config":361,"lists":362},"Contact us",{"dataNavLevelOne":302},[363],{"items":364},[365,368,373],{"text":60,"config":366},{"href":62,"dataGaName":367,"dataGaLocation":53},"talk to sales",{"text":369,"config":370},"Support portal",{"href":371,"dataGaName":372,"dataGaLocation":53},"https://support.gitlab.com","support portal",{"text":374,"config":375},"Customer portal",{"href":376,"dataGaName":377,"dataGaLocation":53},"https://customers.gitlab.com/customers/sign_in/","customer portal",{"close":379,"login":380,"suggestions":387},"Close",{"text":381,"link":382},"To search repositories and projects, login to",{"text":383,"config":384},"gitlab.com",{"href":67,"dataGaName":385,"dataGaLocation":386},"search login","search",{"text":388,"default":389},"Suggestions",[390,392,396,398,402,406],{"text":82,"config":391},{"href":87,"dataGaName":82,"dataGaLocation":386},{"text":393,"config":394},"Code Suggestions (AI)",{"href":395,"dataGaName":393,"dataGaLocation":386},"/solutions/code-suggestions/",{"text":116,"config":397},{"href":118,"dataGaName":116,"dataGaLocation":386},{"text":399,"config":400},"GitLab on AWS",{"href":401,"dataGaName":399,"dataGaLocation":386},"/partners/technology-partners/aws/",{"text":403,"config":404},"GitLab on Google Cloud",{"href":405,"dataGaName":403,"dataGaLocation":386},"/partners/technology-partners/google-cloud-platform/",{"text":407,"config":408},"Why GitLab?",{"href":95,"dataGaName":407,"dataGaLocation":386},{"freeTrial":410,"mobileIcon":415,"desktopIcon":420,"secondaryButton":423},{"text":411,"config":412},"Start free trial",{"href":413,"dataGaName":58,"dataGaLocation":414},"https://gitlab.com/-/trials/new/","nav",{"altText":416,"config":417},"Gitlab Icon",{"src":418,"dataGaName":419,"dataGaLocation":414},"https://res.cloudinary.com/about-gitlab-com/image/upload/v1758203874/jypbw1jx72aexsoohd7x.svg","gitlab icon",{"altText":416,"config":421},{"src":422,"dataGaName":419,"dataGaLocation":414},"https://res.cloudinary.com/about-gitlab-com/image/upload/v1758203875/gs4c8p8opsgvflgkswz9.svg",{"text":424,"config":425},"Get Started",{"href":426,"dataGaName":427,"dataGaLocation":414},"https://gitlab.com/-/trial_registrations/new?glm_source=about.gitlab.com/get-started/","get started",{"freeTrial":429,"mobileIcon":433,"desktopIcon":435},{"text":430,"config":431},"Learn more about GitLab Duo",{"href":87,"dataGaName":432,"dataGaLocation":414},"gitlab duo",{"altText":416,"config":434},{"src":418,"dataGaName":419,"dataGaLocation":414},{"altText":416,"config":436},{"src":422,"dataGaName":419,"dataGaLocation":414},{"button":438,"mobileIcon":443,"desktopIcon":445},{"text":439,"config":440},"/switch",{"href":441,"dataGaName":442,"dataGaLocation":414},"#contact","switch",{"altText":416,"config":444},{"src":418,"dataGaName":419,"dataGaLocation":414},{"altText":416,"config":446},{"src":447,"dataGaName":419,"dataGaLocation":414},"https://res.cloudinary.com/about-gitlab-com/image/upload/v1773335277/ohhpiuoxoldryzrnhfrh.png",{"freeTrial":449,"mobileIcon":454,"desktopIcon":456},{"text":450,"config":451},"Back to pricing",{"href":195,"dataGaName":452,"dataGaLocation":414,"icon":453},"back to pricing","GoBack",{"altText":416,"config":455},{"src":418,"dataGaName":419,"dataGaLocation":414},{"altText":416,"config":457},{"src":422,"dataGaName":419,"dataGaLocation":414},{"title":459,"button":460,"config":465},"See how agentic AI transforms software delivery",{"text":461,"config":462},"Watch GitLab Transcend now",{"href":463,"dataGaName":464,"dataGaLocation":53},"/events/transcend/virtual/","transcend event",{"layout":466,"icon":467,"disabled":16},"release","AiStar",{"data":469},{"text":470,"source":471,"edit":477,"contribute":482,"config":487,"items":492,"minimal":696},"Git is a trademark of Software Freedom Conservancy and our use of 'GitLab' is under license",{"text":472,"config":473},"View page source",{"href":474,"dataGaName":475,"dataGaLocation":476},"https://gitlab.com/gitlab-com/marketing/digital-experience/about-gitlab-com/","page source","footer",{"text":478,"config":479},"Edit this page",{"href":480,"dataGaName":481,"dataGaLocation":476},"https://gitlab.com/gitlab-com/marketing/digital-experience/about-gitlab-com/-/blob/main/content/","web ide",{"text":483,"config":484},"Please contribute",{"href":485,"dataGaName":486,"dataGaLocation":476},"https://gitlab.com/gitlab-com/marketing/digital-experience/about-gitlab-com/-/blob/main/CONTRIBUTING.md/","please contribute",{"twitter":488,"facebook":489,"youtube":490,"linkedin":491},"https://twitter.com/gitlab","https://www.facebook.com/gitlab","https://www.youtube.com/channel/UCnMGQ8QHMAnVIsI3xJrihhg","https://www.linkedin.com/company/gitlab-com",[493,540,591,635,662],{"title":193,"links":494,"subMenu":509},[495,499,504],{"text":496,"config":497},"View plans",{"href":195,"dataGaName":498,"dataGaLocation":476},"view plans",{"text":500,"config":501},"Why Premium?",{"href":502,"dataGaName":503,"dataGaLocation":476},"/pricing/premium/","why premium",{"text":505,"config":506},"Why Ultimate?",{"href":507,"dataGaName":508,"dataGaLocation":476},"/pricing/ultimate/","why ultimate",[510],{"title":511,"links":512},"Contact Us",[513,516,518,520,525,530,535],{"text":514,"config":515},"Contact sales",{"href":62,"dataGaName":63,"dataGaLocation":476},{"text":369,"config":517},{"href":371,"dataGaName":372,"dataGaLocation":476},{"text":374,"config":519},{"href":376,"dataGaName":377,"dataGaLocation":476},{"text":521,"config":522},"Status",{"href":523,"dataGaName":524,"dataGaLocation":476},"https://status.gitlab.com/","status",{"text":526,"config":527},"Terms of use",{"href":528,"dataGaName":529,"dataGaLocation":476},"/terms/","terms of use",{"text":531,"config":532},"Privacy statement",{"href":533,"dataGaName":534,"dataGaLocation":476},"/privacy/","privacy statement",{"text":536,"config":537},"Cookie preferences",{"dataGaName":538,"dataGaLocation":476,"id":539,"isOneTrustButton":16},"cookie preferences","ot-sdk-btn",{"title":98,"links":541,"subMenu":549},[542,545],{"text":27,"config":543},{"href":80,"dataGaName":544,"dataGaLocation":476},"devsecops platform",{"text":546,"config":547},"AI-Assisted Development",{"href":87,"dataGaName":548,"dataGaLocation":476},"ai-assisted development",[550],{"title":551,"links":552},"Topics",[553,558,563,568,573,576,581,586],{"text":554,"config":555},"CICD",{"href":556,"dataGaName":557,"dataGaLocation":476},"/topics/ci-cd/","cicd",{"text":559,"config":560},"GitOps",{"href":561,"dataGaName":562,"dataGaLocation":476},"/topics/gitops/","gitops",{"text":564,"config":565},"DevOps",{"href":566,"dataGaName":567,"dataGaLocation":476},"/topics/devops/","devops",{"text":569,"config":570},"Version Control",{"href":571,"dataGaName":572,"dataGaLocation":476},"/topics/version-control/","version control",{"text":26,"config":574},{"href":575,"dataGaName":43,"dataGaLocation":476},"/topics/devsecops/",{"text":577,"config":578},"Cloud Native",{"href":579,"dataGaName":580,"dataGaLocation":476},"/topics/cloud-native/","cloud native",{"text":582,"config":583},"AI for Coding",{"href":584,"dataGaName":585,"dataGaLocation":476},"/topics/devops/ai-for-coding/","ai for coding",{"text":587,"config":588},"Agentic AI",{"href":589,"dataGaName":590,"dataGaLocation":476},"/topics/agentic-ai/","agentic ai",{"title":592,"links":593},"Solutions",[594,596,598,603,607,610,614,617,619,622,625,630],{"text":140,"config":595},{"href":135,"dataGaName":140,"dataGaLocation":476},{"text":129,"config":597},{"href":112,"dataGaName":113,"dataGaLocation":476},{"text":599,"config":600},"Agile development",{"href":601,"dataGaName":602,"dataGaLocation":476},"/solutions/agile-delivery/","agile delivery",{"text":604,"config":605},"SCM",{"href":125,"dataGaName":606,"dataGaLocation":476},"source code management",{"text":554,"config":608},{"href":118,"dataGaName":609,"dataGaLocation":476},"continuous integration & delivery",{"text":611,"config":612},"Value stream management",{"href":168,"dataGaName":613,"dataGaLocation":476},"value stream management",{"text":559,"config":615},{"href":616,"dataGaName":562,"dataGaLocation":476},"/solutions/gitops/",{"text":178,"config":618},{"href":180,"dataGaName":181,"dataGaLocation":476},{"text":620,"config":621},"Small business",{"href":185,"dataGaName":186,"dataGaLocation":476},{"text":623,"config":624},"Public sector",{"href":190,"dataGaName":191,"dataGaLocation":476},{"text":626,"config":627},"Education",{"href":628,"dataGaName":629,"dataGaLocation":476},"/solutions/education/","education",{"text":631,"config":632},"Financial services",{"href":633,"dataGaName":634,"dataGaLocation":476},"/solutions/finance/","financial services",{"title":198,"links":636},[637,639,641,643,646,648,650,652,654,656,658,660],{"text":210,"config":638},{"href":212,"dataGaName":213,"dataGaLocation":476},{"text":215,"config":640},{"href":217,"dataGaName":218,"dataGaLocation":476},{"text":220,"config":642},{"href":222,"dataGaName":223,"dataGaLocation":476},{"text":225,"config":644},{"href":227,"dataGaName":645,"dataGaLocation":476},"docs",{"text":248,"config":647},{"href":250,"dataGaName":251,"dataGaLocation":476},{"text":243,"config":649},{"href":245,"dataGaName":246,"dataGaLocation":476},{"text":258,"config":651},{"href":260,"dataGaName":261,"dataGaLocation":476},{"text":266,"config":653},{"href":268,"dataGaName":269,"dataGaLocation":476},{"text":271,"config":655},{"href":273,"dataGaName":274,"dataGaLocation":476},{"text":276,"config":657},{"href":278,"dataGaName":279,"dataGaLocation":476},{"text":281,"config":659},{"href":283,"dataGaName":284,"dataGaLocation":476},{"text":286,"config":661},{"href":288,"dataGaName":289,"dataGaLocation":476},{"title":300,"links":663},[664,666,668,670,672,674,676,680,685,687,689,691],{"text":307,"config":665},{"href":309,"dataGaName":302,"dataGaLocation":476},{"text":312,"config":667},{"href":314,"dataGaName":315,"dataGaLocation":476},{"text":320,"config":669},{"href":322,"dataGaName":323,"dataGaLocation":476},{"text":325,"config":671},{"href":327,"dataGaName":328,"dataGaLocation":476},{"text":330,"config":673},{"href":332,"dataGaName":333,"dataGaLocation":476},{"text":335,"config":675},{"href":337,"dataGaName":338,"dataGaLocation":476},{"text":677,"config":678},"Sustainability",{"href":679,"dataGaName":677,"dataGaLocation":476},"/sustainability/",{"text":681,"config":682},"Diversity, inclusion and belonging (DIB)",{"href":683,"dataGaName":684,"dataGaLocation":476},"/diversity-inclusion-belonging/","Diversity, inclusion and belonging",{"text":340,"config":686},{"href":342,"dataGaName":343,"dataGaLocation":476},{"text":350,"config":688},{"href":352,"dataGaName":353,"dataGaLocation":476},{"text":355,"config":690},{"href":357,"dataGaName":358,"dataGaLocation":476},{"text":692,"config":693},"Modern Slavery Transparency Statement",{"href":694,"dataGaName":695,"dataGaLocation":476},"https://handbook.gitlab.com/handbook/legal/modern-slavery-act-transparency-statement/","modern slavery transparency statement",{"items":697},[698,701,704],{"text":699,"config":700},"Terms",{"href":528,"dataGaName":529,"dataGaLocation":476},{"text":702,"config":703},"Cookies",{"dataGaName":538,"dataGaLocation":476,"id":539,"isOneTrustButton":16},{"text":705,"config":706},"Privacy",{"href":533,"dataGaName":534,"dataGaLocation":476},[708,721],{"id":709,"title":10,"body":30,"config":710,"content":712,"description":30,"extension":29,"meta":716,"navigation":16,"path":717,"seo":718,"stem":719,"__hash__":720},"blogAuthors/en-us/blog/authors/rutvik-shah.yml",{"template":711},"BlogAuthor",{"name":10,"config":713},{"headshot":714,"ctfId":715},"https://res.cloudinary.com/about-gitlab-com/image/upload/v1749661843/Blog/Author%20Headshots/rutvik_shah_headshot.png","6co92rUBTbWcyV3EW23iEx",{},"/en-us/blog/authors/rutvik-shah",{},"en-us/blog/authors/rutvik-shah","JRArwqK-9V0Orki_E-QqmcQG2AsaZP6XGqa-9ZB6GR8",{"id":722,"title":11,"body":30,"config":723,"content":724,"description":30,"extension":29,"meta":728,"navigation":16,"path":729,"seo":730,"stem":731,"__hash__":732},"blogAuthors/en-us/blog/authors/michael-friedrich.yml",{"template":711},{"name":11,"config":725},{"headshot":726,"ctfId":727},"https://res.cloudinary.com/about-gitlab-com/image/upload/v1749659879/Blog/Author%20Headshots/dnsmichi-headshot.jpg","dnsmichi",{},"/en-us/blog/authors/michael-friedrich",{},"en-us/blog/authors/michael-friedrich","lJ-nfRIhdG49Arfrxdn1Vv4UppwD51BB13S3HwIswt4",[734,747,759],{"content":735,"config":745},{"title":736,"description":737,"authors":738,"heroImage":740,"date":741,"body":742,"category":13,"tags":743},"GitLab and Anthropic: Governed AI for enterprise development","GitLab deepens its Anthropic Claude integration, bringing governed AI, access to new models, and cloud flexibility to enterprise software development.",[739],"Stuart Moncada","https://res.cloudinary.com/about-gitlab-com/image/upload/v1776457632/llddiylsgwuze0u1rjks.png","2026-04-28","For enterprise and public sector leaders, the tension is familiar: Software teams need to move faster with AI, while security, compliance, and regulatory expectations only get more stringent. GitLab deepens its Anthropic Claude integration so organizations get access to newly released Claude models inside GitLab’s intelligent orchestration platform where governance, compliance, and auditability already run.\n\nClaude powers capabilities across GitLab Duo Agent Platform as the default model out of the box, across a variety of use cases from code generation and review to agentic chat and vulnerability resolution. If you've used GitLab Duo, you've already experienced how Duo agents automate workflows across the entire software development lifecycle (SDLC).\n\nThis accelerates the integration of Claude’s capabilities into GitLab, broadens how enterprises can deploy them, and reinforces what makes GitLab fundamentally different as a platform for software development and engineering: governance, compliance, and auditability built into every AI interaction.\n\n> \"GitLab Duo has accelerated how our teams plan, build, and ship software. The combination of Anthropic's Claude and GitLab's platform means we're getting more capable AI without changing how we work or how it is governed.\"\n>\n> – Mans Booijink, Operations Manager, Cube\n\n## The real differentiator: Governed AI\n\nWith GitLab, governance controls and auditing are built into the SDLC. When Claude suggests a code change through the GitLab Duo Agent Platform, that suggestion flows through the same merge request process, the same approval rules, the same security scanning, and the same audit trail as every other change. AI doesn't get a shortcut around your controls. It operates within them.\n\nAs GitLab moves deeper into agentic software development, where AI autonomously handles well-defined tasks, the governance layer becomes more important. An AI agent that can open a merge request, help resolve a vulnerability, or refactor a service needs to be auditable, attributable, and subject to the same policy enforcement as a human developer. That requirement is an architectural decision GitLab made from the start, and one that grows more consequential as AI agents take on broader responsibilities.\n\n## Enterprise deployment flexibility\n\nThis also expands how organizations access the latest Claude models through GitLab. Claude is available within GitLab through Google Cloud's Vertex AI and Amazon Bedrock, which means enterprises can route AI workloads through the hyperscaler commitments and cloud governance frameworks they already have in place. No separate vendor contract. No new data residency questions. Your existing Google Cloud or AWS relationship is the on-ramp. \n\nGitLab is now also available in the [Claude Marketplace](https://claude.com/platform/marketplace), allowing customers to purchase GitLab Credits and apply them toward existing Anthropic spending commitments – consolidating AI spend and simplifying how teams discover and procure GitLab alongside their Anthropic investments.\n\n## Advancing an agentic future\n\nGitLab's vision for agentic software development, where AI handles defined tasks autonomously across planning, coding, testing, securing, and deploying, requires models with strong reasoning, reliability, and safety characteristics. It also requires a platform where those autonomous actions are fully governed.\n\nAgentic workflows demand models with strong reasoning, reliability, and safety characteristics, criteria that guide how GitLab selects and integrates AI model partners. And GitLab's governance framework helps ensure that as AI agents assume more advanced development work, enterprises maintain full visibility and control over what those agents do, when they do it, and how changes are tracked.\n\n## What this means for GitLab customers\n\nIf you're already using GitLab Duo Agent Platform, you'll get access to Claude models and deeper AI assistance across your software development lifecycle, all within the governance framework you already rely on.\n\nIf you're evaluating AI-powered software development platforms, you shouldn't have to choose between advanced AI capabilities and enterprise control. This strategic integration is built to deliver both.\n\n> Want to learn more about GitLab Duo Agent Platform? [Get a demo or start a free trial today](https://about.gitlab.com/gitlab-duo-agent-platform/).",[24,744,289],"product",{"featured":16,"template":17,"slug":746},"gitlab-and-anthropic-governed-ai-for-enterprise-development",{"content":748,"config":757},{"title":749,"description":750,"authors":751,"heroImage":753,"date":754,"body":755,"category":13,"tags":756},"Give your AI agent direct, structured GitLab access with glab CLI","The GitLab CLI (glab) provides AI agents structured, reliable access to projects via the MCP, eliminating friction. This tutorial shows how you can speed up code review and issue triage.",[752],"Kai Armstrong","https://res.cloudinary.com/about-gitlab-com/image/upload/v1776347152/unw3mzatkd5xyfbzcnni.png","2026-04-27","\nWhen teams use GitLab Duo, Claude, Cursor, and other AI assistants, more of the development workflow runs through an AI agent acting on your behalf — reading issues, reviewing merge requests, running pipelines, and helping you ship faster. Most developers are already using the GitLab CLI (`glab`) from the terminal to interact with GitLab. Combining the two is a natural next step.\n\n\nThe problem is that without the right tools, AI agents are essentially guessing when it comes to your GitLab projects. They might hallucinate the details of an issue they've never seen, summarize a merge request based on stale training data rather than its actual state, or require you to manually copy context from a browser tab and paste it into a chat window just to get started. Every one of those workarounds is friction: it slows you down, introduces the possibility of error, and puts a hard ceiling on what your agent can actually do on your behalf. `glab` changes that by giving agents a direct, reliable interface to your projects.\n\n\nWith `glab`, your agent fetches what it needs directly from GitLab, acts on it, and reports back — so you spend less time relaying information and more time on the work that matters.\n\n\nIn this tutorial, you'll learn how to use `glab` to give AI agents structured, reliable access to your GitLab projects. You'll also discover how that unlocks a faster, more capable development workflow.\n\n\n## How to connect your AI agent to GitLab through MCP\n\n\nThe most direct way to supercharge your AI workflow is to give your AI agent native access to `glab` through Model Context Protocol ([MCP](https://about.gitlab.com/topics/ai/model-context-protocol/)).\n\n\n MCP is an open standard that lets AI tools discover and use external capabilities at runtime. Once connected, your AI assistant can read issues, comment on merge requests, check pipeline status, and write back to GitLab, all without copying anything from the UI or writing a single API call yourself.\n\n\n To get started, run:\n\n\n ```shell\n # Start the glab MCP server\n glab mcp serve\n ```\n\n\n Once your MCP client is configured, your AI can answer questions like *\"What's the status of my open MRs?\"* or *\"Are there any failing pipelines on main?\"* by querying GitLab directly, not scraping the web UI, not relying on stale training data. See the [full setup docs](https://docs.gitlab.com/cli/) for configuration steps for Claude Code, Cursor, and other editors.\n\n\n One detail worth knowing: `glab` automatically adds `--output json` when invoked through MCP, for any command that supports it. Your agent gets clean, structured data without you needing to think about output formats. And because `glab` uses the official MCP SDK, it stays compatible as the\n protocol evolves.\n\n\n We've also been deliberate about *which* commands are exposed through MCP. Commands that require interactive terminal input are intentionally\n excluded, so your agent never gets stuck waiting for input that will never come. What's exposed is what actually works reliably in an agent context.\n\n\n ## Let your AI participate in code review\n\n\n Most developers have a backlog of MRs waiting for review. It's one of the most time-consuming parts of the job and one of the best places to put\n AI to work. With `glab`, your agent doesn't just observe your review queue, it can work through it with you.\n\n\n ### See exactly what still needs addressing\n\n\n Start with this:\n\n\n ```shell\n glab mr view 2677 --comments --unresolved --output json\n ```\n\n\n This input returns the full MR: metadata, description, and every\n unresolved discussion, as a single structured JSON payload. Hand that to\n your AI and it has everything it needs: which threads are open, what the\n reviewer asked for, and in what context. No tab-switching, no copy-pasting\n individual comments.\n\n\n \n ```json\n {\n   \"id\": 2677,\n   \"title\": \"feat: add OAuth2 support\",\n   \"state\": \"opened\",\n   \"author\": { \"username\": \"jdwick\" },\n   \"labels\": [\"backend\", \"needs-review\"],\n   \"blocking_discussions_resolved\": false,\n   \"discussions\": [\n     {\n       \"id\": \"3107030349\",\n       \"resolved\": false,\n       \"notes\": [\n         {\n           \"author\": { \"username\": \"dmurphy\" },\n           \"body\": \"This error handling will swallow panics — consider wrapping with recover()\",\n           \"created_at\": \"2026-03-14T09:23:11.000Z\"\n         }\n       ]\n     },\n     {\n       \"id\": \"3107030412\",\n       \"resolved\": false,\n       \"notes\": [\n         {\n           \"author\": { \"username\": \"sreeves\" },\n           \"body\": \"Token refresh logic needs a test for the expired token case\",\n           \"created_at\": \"2026-03-14T10:05:44.000Z\"\n         }\n       ]\n     }\n   ]\n }\n ```\n\n\n Instead of reading through every thread yourself, you ask your agent  *\"what do I still need to fix in MR 2677?\"* and get back a prioritized summary with suggested changes. This all happens from a single command.\n\n\n ### Close the loop programmatically\n\n\n Once your AI has helped you address the feedback, it can resolve\n discussions:\n\n\n ```shell\n # List all discussions — structured, ready for the agent to process\n glab mr note list 456 --output json\n\n # Resolve a discussion once the feedback is addressed\n glab mr note resolve 456 3107030349\n\n # Reopen if something needs another look\n glab mr note reopen 456 3107030349\n ```\n\n\n\n ```json\n [\n   {\n     \"id\": 3107030349,\n     \"body\": \"This error handling will swallow panics — consider wrapping with recover()\",\n     \"author\": { \"username\": \"dmurphy\" },\n     \"resolved\": false,\n     \"resolvable\": true\n   },\n   {\n     \"id\": 3107030412,\n     \"body\": \"Token refresh logic needs a test for the expired token case\",\n     \"author\": { \"username\": \"sreeves\" },\n     \"resolved\": false,\n     \"resolvable\": true\n   }\n ]\n ```\n\n\n\n Note IDs are visible directly in the GitLab UI and API, no extra lookup needed. Your agent can work through the full list, verify each fix, and\n resolve as it goes.\n\n\n ## Talk to your AI about your code more effectively\n\n\n Even if you're not running an MCP server, there's a simpler shift that makes a huge difference: using `glab` to feed your AI better information.\n\n\n Think about the last time you asked an AI assistant to help triage issues or debug a failing pipeline. You probably copied some text from the GitLab UI and pasted it into the chat. Here's what your agent is actually\n working with when you do that:\n\n\n ```text\n open issues: 12 • milestone: 17.10 • label: bug, needs-triage ...\n ```\n\n\n Compare that to what it gets with `glab`:\n\n\n \n ```json\n [\n   {\n     \"iid\": 902,\n     \"title\": \"Pipeline fails on merge to main\",\n     \"labels\": [\"bug\", \"needs-triage\"],\n     \"milestone\": { \"title\": \"17.10\" },\n     \"assignees\": []\n   },\n   ...\n ]\n ```\n\n\n Structured, typed, complete; no ambiguity, no parsing guesswork. That's the difference between an agent that can act and one that has to ask\n follow-up questions.\n\n\n If you're using the MCP server, you get this automatically: `glab` adds `--output json` for any command that supports it. If you're working directly\n from the terminal, just add the flag yourself:\n\n\n ```shell\n # Pull open issues for triage\n glab issue list --label \"needs-triage\" --output json\n\n # Check pipeline status\n glab ci status --output json\n\n # Get full MR details\n glab mr view 456 --output json\n ```\n\n\n We've significantly expanded JSON output support in recent releases. It now covers CI status, milestones, labels, releases, schedules, cluster agents, work items, MR approvers, repo contributors, and more. If `glab` can\n retrieve it, your AI can consume it cleanly.\n\n\n ### A real workflow\n\n\n ```shell\n $ glab issue list --label \"needs-triage\" --milestone \"17.10\"\n --output json\n ```\n\n\n ```text\n Agent: I found 2 unassigned bugs in the 17.10 milestone that need triage:\n 1. #902 — Pipeline fails on merge to main (opened 5 days ago)\n 2. #903 — Auth token not refreshing on expiry (opened 4 days ago)\n Both are unassigned. Want me to draft triage notes and suggest assignees based on recent commit history?\n ```\n\n\n ## Your agent is never limited to built-in commands\n\n\n `glab`'s first-class commands cover the most common workflows, but your agent is never limited to them. Through `glab api`, it has authenticated access to the full GitLab REST and GraphQL API surface, using the same session, with no extra credentials or configuration required.\n\n\n This is a meaningful differentiator. Most CLI tools stop at what their commands expose. With `glab`, if GitLab's API supports it, your agent can do it. It's always working from a trusted, authenticated context.\n\n\n A practical example: fetching just the list of changed files in an MR before deciding which diffs to pull in full:\n\n\n ```shell\n # Get changed file paths — lightweight, no diff content yet\n glab api \"/projects/$CI_PROJECT_ID/merge_requests/$CI_MERGE_REQUEST_IID/diffs?per_page=100\" \\\n | jq '.[].new_path'\n\n# Then fetch only the specific file your agent needs\nglab api \"/projects/$CI_PROJECT_ID/merge_requests/$CI_MERGE_REQUEST_IID/diffs?per_page=100\" \\\n| jq '.[] | select(.new_path == \"path/to/file.go\")'\n ```\n\n\n ```text\n \"internal/auth/token.go\"\n \"internal/auth/token_test.go\"\n \"internal/oauth/refresh.go\"\n ```\n\n\n For anything the REST API doesn't cover (epics, certain work item queries, complex cross-project data),  `glab api graphql` gives you the full\n GraphQL interface:\n\n\n ```shell\n   glab api graphql -f query='\n {\n   project(fullPath: \"gitlab-org/gitlab\") {\n     mergeRequest(iid: \"12345\") {\n       title\n       reviewers { nodes { username } }\n     }\n   }\n }'\n ```\n\n ```json\n{\n   \"data\": {\n     \"project\": {\n       \"mergeRequest\": {\n         \"title\": \"feat: add OAuth2 support\",\n         \"reviewers\": {\n           \"nodes\": [\n             { \"username\": \"dmurphy\" },\n             { \"username\": \"sreeves\" }\n           ]\n         }\n       }\n     }\n   }\n }\n\n ```\n\n\n Your agent has a single, authenticated entry point to everything GitLab exposes without the token juggling, separate API clients, or configuration\n overhead.\n\n\n ## What's coming and your feedback\n\n\n Two improvements we're actively working on will make `glab` even more useful for agent workflows:\n\n\n **Agent-aware help text.** Today, `--help` output is written for humansvat a terminal. We're updating it to surface the non-interactive alternative\n for every interactive command, flag which commands support `--output json`, and generally make help a useful resource for agents discovering\n capabilities at runtime — not just humans.\n\n\n **Better machine-readable errors.** When something goes wrong today, agents get the same human-readable error messages as terminal users. We're\n changing that so errors in JSON mode return structured output, giving your agent the information it needs to handle failures gracefully, retry intelligently, or surface the right context back to you.\n\n\n Both of these are in active development. If you're already using `glab` with an AI tool, you're exactly the audience we want feedback from.\n\n\n * **What friction are you hitting?** Commands that don't behave well in agent contexts, error messages that aren't actionable, gaps in JSON output\n coverage. We want to know.\n\n * **What workflows have you unlocked?** Real usage patterns help us prioritize what to build next.\n\n\n Join the discussion in [our feedback issue](https://gitlab.com/gitlab-org/cli/-/issues/8177) — that's where we're shaping the roadmap for agent-friendliness, and where your input will have the most direct impact. If you've found a specific gap, [open an issue](https://gitlab.com/gitlab-org/cli/-/issues/new). If you've got a fix in mind, contributions are welcome. Visit [CONTRIBUTING.md](https://gitlab.com/gitlab-org/cli/-/blob/main/CONTRIBUTING.md) to get started.\n\n\n The GitLab CLI has always been about giving developers more control over their workflow. As AI becomes a bigger part of how we all work, that means making `glab` the best possible interface between your AI tools and your GitLab projects. We're just getting started and we'd love to build the next part with you.\n",[24,744,25],{"featured":16,"template":17,"slug":758},"give-your-ai-agent-direct-structured-gitlab-access-with-glab-cli",{"content":760,"config":768},{"title":761,"description":762,"authors":763,"heroImage":753,"date":765,"body":766,"category":13,"tags":767},"GitHub Copilot's new policy for AI training is a governance wake-up call","Learn what GitHub's Copilot policy change means for regulated industries, and why GitLab's commitment to customer data privacy matters.",[764],"Allie Holland","2026-04-20","GitHub recently [announced](https://github.blog/news-insights/company-news/updates-to-github-copilot-interaction-data-usage-policy/) a significant change to how it handles data from Copilot users. Starting April 24, 2026, interaction data from Copilot Free, Pro, and Pro+ users, including inputs, outputs, code snippets, and associated context, will be used to train AI models by default, unless users actively opt out. Copilot Business and Enterprise customers are exempt under existing contract terms.\n\nFor organizations in regulated industries, including finance, healthcare, defense, and public sector, the policy shift raises questions that go beyond individual developer preferences. It forces a harder look at a question that engineering and security leaders should be asking every AI vendor in their stack: Do you train on our code? \n\nGitLab's answer is no. GitLab does not train AI models on customer code at any tier, and AI vendors are contractually prohibited from using customer inputs or outputs for their own purposes. The [GitLab AI Transparency Center](https://about.gitlab.com/ai-transparency-center/) makes that commitment auditable: a single location documenting which models power which features, how data is handled, subprocessor relationships, and data retention periods. The GitLab AI Transparency Center also lists the compliance status of each feature, including confirmation that GitLab's current AI features do not qualify as high-risk systems under the EU AI Act. It's a standard GitLab CEO Bill Staples has consistently [reiterated](https://www.linkedin.com/posts/williamstaples_gitlab-1810-agentic-ai-now-open-to-even-activity-7443280763715985408-aHxf?utm_source=share&utm_medium=member_desktop&rcm=ACoAABsu7EUBcb_a1-JHKS9RC0B5rf8Ye-5XM60) and one reflected in GitLab's mission and [Trust Center](https://trust.gitlab.com/).\n\n## What the policy change actually means\n\nGitHub's announcement also specifies that the data may be shared with GitHub affiliates, including Microsoft, for AI development purposes.\n\nA policy change of this nature forces organizations to re-examine their AI governance posture, audit their Copilot license tiers, and confirm that the right controls are configured across their teams.\n\n## Why AI governance matters in regulated environments\n\nSource code is often among an organization's most sensitive intellectual property. It may contain references to internal systems, reflect proprietary business logic, or touch data flows governed by strict retention and access policies. When that code passes through an AI assistant, questions about training data usage, model vendor relationships, and data residency become compliance concerns.\n\nThe exposure is particularly acute for financial services firms that have invested in proprietary algorithms, fraud detection logic, credit risk models, underwriting rules, trading strategies. When AI tooling processes that code and uses it to train models serving competitors, vendor data practices become an IP concern.\n\nFinancial institutions operating under [the Federal Reserve's Supervisory Guidance on Model Risk Management (SR 11-7) and the](https://www.federalreserve.gov/supervisionreg/srletters/sr1107.htm) [Digital Operational Resilience Act (DORA)](https://eur-lex.europa.eu/eli/reg/2022/2554/oj/eng) are required to maintain documented, auditable oversight of third-party technology providers, including understanding how those providers handle data. Third-party AI tools used in development workflows increasingly fall within the scope of model risk oversight, and material changes to vendor data practices require updated documentation. \n\nIn the public sector, [the National Institute of Standards and Technology Special Publication 800-53 (NIST 800-53)](https://csrc.nist.gov/publications/detail/sp/800-53/rev-5/final) and the [Federal Information Security Modernization Act (FISMA)](https://www.cisa.gov/topics/cyber-threats-and-advisories/federal-information-security-modernization-act) establish that sensitive or classified code must never leave a controlled boundary. For U.S. Department of Defense and intelligence community environments in particular, a vendor's default data posture is an operational concern. In healthcare, [the Health Insurance Portability and Accountability Act (HIPAA)](https://www.hhs.gov/hipaa/index.html) governs how patient-adjacent data is handled by third parties, and development environments that touch clinical systems increasingly fall within that scope.\n\nAcross all of these contexts, the common thread is the same: A vendor policy that changes data usage defaults, requires individual opt-out, and offers different protections depending on account tier introduces exactly the kind of uncontrolled variable that compliance teams cannot afford.\n\n## What regulated industries actually need from AI vendors\n\nRegulated organizations have largely moved past debating whether to adopt AI in development workflows. The focus now is on doing so in a way they can defend to regulators, boards, and customers. That shift has surfaced a consistent set of requirements regardless of sector.\n\n**Contractual certainty.** Regulated firms need to know, with specificity, what happens to their data. A clear, documented, unconditional commitment is what's required, not something that varies by plan or requires action before a deadline.\n\n**Auditability.** Model risk management frameworks require organizations to understand and validate the AI systems they deploy, including the training data behind those models and the third parties involved in their development. Vendors who cannot answer these questions create documentation risk for the organizations relying on them.\n\n**Separation from vendor incentives.** When an AI vendor trains models on customer usage data, code and workflows become inputs to a system that also serves competitors. For institutions with proprietary trading logic, underwriting models, or fraud detection systems, that's a genuine IP exposure.\n\n## GitLab's position on AI data governance\n\nGitLab does not use customer code to train AI models. This commitment applies at every tier, and AI vendors are contractually prohibited from using inputs or outputs associated with GitLab customers for their own purposes.\n\nThis is a deliberate architectural and policy choice, not a feature of a particular pricing tier. As GitLab's [post on enterprise independence](https://about.gitlab.com/blog/why-enterprise-independence-matters-more-than-ever-in-devsecops/) notes, data governance has become \"an increasingly critical factor in enterprise technology decisions, driven by a complex web of national and regional data protection laws and growing concern about control over sensitive intellectual property.\"\n\nGitLab is also cloud-neutral and model-neutral while supporting self-hosted deployments, not commercially tied to any single cloud provider or large language model (LLM). That i[ndependence matters](https://about.gitlab.com/blog/why-enterprise-independence-matters-more-than-ever-in-devsecops/) for regulated organizations evaluating vendor concentration risk. The [AI Continuity Plan](https://handbook.gitlab.com/handbook/product/ai/continuity-plan/) documents how vendor changes are managed, including material changes to how AI vendors treat customer data, a direct response to the governance requirements under frameworks like [DORA](https://handbook.gitlab.com/handbook/legal/dora/). \n\n## The governance gap AI teams need to close\n\nGitHub's policy update is a reminder that for organizations in regulated industries, understanding exactly how an AI tool handles data is a prerequisite for using it at all. That means asking vendors for clear, documented answers: Is our data used for model training? Who are your AI model subprocessors? What happens if a vendor changes its data practices? Can we deploy in a way that keeps all AI processing within our own infrastructure? What indemnification do you offer for AI-generated output?\n\nVendors who can answer those questions clearly, and document those answers in an auditable form, are vendors you can build on. **Those who cannot will create compliance debt every time they ship a policy update.** And when a vendor can change its data practices with 30 days notice, that's not a partnership built for regulated industries. That's a liability.\n\n> Learn more about GitLab's approach to AI governance at the [GitLab AI Transparency Center](https://about.gitlab.com/ai-transparency-center/).",[24,744],{"featured":36,"template":17,"slug":769},"github-copilots-new-policy-for-ai-training-is-a-governance-wake-up-call",{"promotions":771},[772,785,796,808],{"id":773,"categories":774,"header":775,"text":776,"button":777,"image":782},"ai-modernization",[13],"Is AI achieving its promise at scale?","Quiz will take 5 minutes or less",{"text":778,"config":779},"Get your AI maturity score",{"href":780,"dataGaName":781,"dataGaLocation":251},"/assessments/ai-modernization-assessment/","modernization assessment",{"config":783},{"src":784},"https://res.cloudinary.com/about-gitlab-com/image/upload/v1772138786/qix0m7kwnd8x2fh1zq49.png",{"id":786,"categories":787,"header":788,"text":776,"button":789,"image":793},"devops-modernization",[744,43],"Are you just managing tools or shipping innovation?",{"text":790,"config":791},"Get your DevOps maturity score",{"href":792,"dataGaName":781,"dataGaLocation":251},"/assessments/devops-modernization-assessment/",{"config":794},{"src":795},"https://res.cloudinary.com/about-gitlab-com/image/upload/v1772138785/eg818fmakweyuznttgid.png",{"id":797,"categories":798,"header":800,"text":776,"button":801,"image":805},"security-modernization",[799],"security","Are you trading speed for security?",{"text":802,"config":803},"Get your security maturity score",{"href":804,"dataGaName":781,"dataGaLocation":251},"/assessments/security-modernization-assessment/",{"config":806},{"src":807},"https://res.cloudinary.com/about-gitlab-com/image/upload/v1772138786/p4pbqd9nnjejg5ds6mdk.png",{"id":809,"paths":810,"header":813,"text":814,"button":815,"image":820},"github-azure-migration",[811,812],"migration-from-azure-devops-to-gitlab","integrating-azure-devops-scm-and-gitlab","Is your team ready for GitHub's Azure move?","GitHub is already rebuilding around Azure. Find out what it means for you.",{"text":816,"config":817},"See how GitLab compares to GitHub",{"href":818,"dataGaName":819,"dataGaLocation":251},"/compare/gitlab-vs-github/github-azure-migration/","github azure migration",{"config":821},{"src":795},{"header":823,"blurb":824,"button":825,"secondaryButton":830},"Start building faster today","See what your team can do with the intelligent orchestration platform for DevSecOps.\n",{"text":826,"config":827},"Get your free trial",{"href":828,"dataGaName":58,"dataGaLocation":829},"https://gitlab.com/-/trial_registrations/new?glm_content=default-saas-trial&glm_source=about.gitlab.com/","feature",{"text":514,"config":831},{"href":62,"dataGaName":63,"dataGaLocation":829},1777493596025]