Stanford WebCamp 2024
Automate, Integrate, Innovate: AI-powered GitLab CI
for Drupal module development
May 2024
Yas Naoi | Chief Architect, Cloud
DOCOMO Innovations, Inc.
1
Copyright © 2024 DOCOMO Innovations, Inc. All Rights Reserved.
Yas
2
Copyright © 2024 DOCOMO Innovations, Inc. All Rights Reserved.
Yas
3
Copyright © 2024 DOCOMO Innovations, Inc. All Rights Reserved.
• Chief Architect, Cloud
Yas
4
Copyright © 2024 DOCOMO Innovations, Inc. All Rights Reserved.
• Chief Architect, Cloud
• DOCOMO Innovations, Inc. (Sunnyvale, CA)
• NTT DOCOMO Inc.
Yas
• Chief Architect, Cloud
• DOCOMO Innovations, Inc. (Sunnyvale, CA)
• NTT DOCOMO Inc.
• Cloud, DevOps, Agile Software Development
• d.o: 20 years
5
Copyright © 2024 DOCOMO Innovations, Inc. All Rights Reserved.
6
Cloud Orchestrator
7
Copyright © 2024 DOCOMO Innovations, Inc. All Rights Reserved.
Cloud Orchestrator
Search: drupal cloud orchestrator
8
Copyright © 2024 DOCOMO Innovations, Inc. All Rights Reserved.
Cloud Orchestrator
Search: drupal cloud orchestrator
Multi-cloud Support
──────────────
9
Copyright © 2024 DOCOMO Innovations, Inc. All Rights Reserved.
Cloud Orchestrator
Multi-cloud Support
──────────────
§ AWS
10
Copyright © 2024 DOCOMO Innovations, Inc. All Rights Reserved.
Cloud Orchestrator
Multi-cloud Support
──────────────
§ AWS
§ Kubernetes
11
Copyright © 2024 DOCOMO Innovations, Inc. All Rights Reserved.
Cloud Orchestrator
Multi-cloud Support
──────────────
§ AWS
§ Kubernetes
§ OpenStack
12
Copyright © 2024 DOCOMO Innovations, Inc. All Rights Reserved.
Cloud Orchestrator
Multi-cloud Support
──────────────
§ AWS
§ Kubernetes
§ OpenStack
§ VMware
13
Copyright © 2024 DOCOMO Innovations, Inc. All Rights Reserved.
Cloud Orchestrator
Multi-cloud Support
──────────────
§ AWS
§ Kubernetes
§ OpenStack
§ VMware
§ Terraform Cloud
14
Copyright © 2024 DOCOMO Innovations, Inc. All Rights Reserved.
Cloud Orchestrator
x Cloud Orchestrator
Copyright © 2024 DOCOMO Innovations, Inc. All Rights Reserved. 15
Agenda
16
Copyright © 2024 DOCOMO Innovations, Inc. All Rights Reserved.
Agenda
1. Human’s Manual Work: Introducing how ChatGPT can be
utilized in the development field
– Code review using ChatGPT (Browser version)
Copyright © 2024 DOCOMO Innovations, Inc. All Rights Reserved. 17
Agenda
1. Human’s Manual Work: Introducing how ChatGPT can be
utilized in the development field
– Code review using ChatGPT (Browser version)
2. Automation: Sharing use cases of GitLab CI integrated
with ChatGPT
– Integration and automation of ChatGPT's review process in
GitLab CI
Copyright © 2024 DOCOMO Innovations, Inc. All Rights Reserved. 18
19
Development Process
Copyright © 2024 DOCOMO Innovations, Inc. All Rights Reserved. 20
Copyright © 2024 DOCOMO Innovations, Inc. All Rights Reserved. 21
Copyright © 2024 DOCOMO Innovations, Inc. All Rights Reserved. 22
Copyright © 2024 DOCOMO Innovations, Inc. All Rights Reserved. 23
Sprint
Planning
1
Copyright © 2024 DOCOMO Innovations, Inc. All Rights Reserved. 24
Develop
Sprint
Planning
1
2
Copyright © 2024 DOCOMO Innovations, Inc. All Rights Reserved. 25
Develop
Sprint
Planning
1
2
Create
Issue & Patch
3
Copyright © 2024 DOCOMO Innovations, Inc. All Rights Reserved. 26
Develop
Sprint
Planning
1
2
Create
Issue & Patch
3
Active
Copyright © 2024 DOCOMO Innovations, Inc. All Rights Reserved. 27
Develop
Sprint
Planning
1
2
Create
Issue & Patch
3
Needs Work
Active
Copyright © 2024 DOCOMO Innovations, Inc. All Rights Reserved. 28
Develop
Sprint
Planning
1
2
Create
Issue & Patch
3
Needs Work
Active
Needs Review
Copyright © 2024 DOCOMO Innovations, Inc. All Rights Reserved. 29
Develop
Automated
Test
Sprint
Planning
1
2
4
Create
Issue & Patch
3
Needs Work
Active
Needs Review
Copyright © 2024 DOCOMO Innovations, Inc. All Rights Reserved. 30
Develop
Automated
Test
Sprint
Planning
1
2
4
Create
Issue & Patch
3
Needs Work
Active
7.x: Pass
Needs Review
Copyright © 2024 DOCOMO Innovations, Inc. All Rights Reserved. 31
Develop
Automated
Test
Sprint
Planning
Merge Request
Review
1
2
4
5
Create
Issue & Patch
3
Needs Work
Active
7.x: Pass
Needs Review
Copyright © 2024 DOCOMO Innovations, Inc. All Rights Reserved. 32
Develop
Automated
Test
Sprint
Planning
Merge Request
Review
1
2
4
5
Create
Issue & Patch
3
Needs Work
Active
Reviewed & tested
by the community
7.x: Pass
Needs Review
Copyright © 2024 DOCOMO Innovations, Inc. All Rights Reserved. 33
Merge
Patch
Develop
Automated
Test
Sprint
Planning
Merge Request
Review
1
2
4
5
6
Create
Issue & Patch
3
Needs Work
Active
Reviewed & tested
by the community
7.x: Pass
Needs Review
Copyright © 2024 DOCOMO Innovations, Inc. All Rights Reserved. 34
Merge
Patch
Develop
Automated
Test
Sprint
Review
Sprint
Planning
Merge Request
Review
1
2
4
5
6
7
Create
Issue & Patch
3
Needs Work
Active
Fixed
Reviewed & tested
by the community
7.x: Pass
Needs Review
Copyright © 2024 DOCOMO Innovations, Inc. All Rights Reserved. 35
Merge
Patch
Develop
Automated
Test
Sprint
Review
Sprint
Planning
1
2
4
6
7
Create
Issue & Patch
3
Needs Review
Needs Work
Active
Fixed
Reviewed & tested
by the community
7.x: Pass
Merge Request
Review
5
Focus
36
Code Review
Review Techniques
Copyright © 2024 DOCOMO Innovations, Inc. All Rights Reserved. 37
Review Techniques
• Static Code Analysis
– Lint
– Coding Standards
– Best Practice
– Security Scan
• AI による解析
– AWS CodeGuru Reviewer / Profiler (Java と Python)
Copyright © 2024 DOCOMO Innovations, Inc. All Rights Reserved. 38
Review Techniques
• Static Code Analysis
– Lint
– Coding Standards
– Best Practice
– Security Scan
• AI による解析
– AWS CodeGuru Reviewer / Profiler (Java と Python)
Copyright © 2024 DOCOMO Innovations, Inc. All Rights Reserved. 39
Review Techniques
• Static Code Analysis
– Lint
– Coding Standards
– Best Practice
– Security Scan
• AI による解析
– AWS CodeGuru Reviewer / Profiler (Java と Python)
Copyright © 2024 DOCOMO Innovations, Inc. All Rights Reserved. 40
Review Techniques
• Static Code Analysis
– Lint
– Coding Standards
– Best Practices
– Security Scan
• AI による解析
– AWS CodeGuru Reviewer / Profiler (Java と Python)
Copyright © 2024 DOCOMO Innovations, Inc. All Rights Reserved. 41
Review Techniques
• Static Code Analysis
– Lint
– Coding Standards
– Best Practices
– Security Scans
• AI による解析
– AWS CodeGuru Reviewer / Profiler (Java と Python)
Copyright © 2024 DOCOMO Innovations, Inc. All Rights Reserved. 42
Review Techniques
• Static Code Analysis
– Lint
– Coding Standards
– Best Practices
– Security Scans
• AI-based Analysis
– AWS CodeGuru Reviewer / Profiler (Java and Python)
Copyright © 2024 DOCOMO Innovations, Inc. All Rights Reserved. 43
Generate Code for Implementations
AI によるペアプロ
Copyright © 2024 DOCOMO Innovations, Inc. All Rights Reserved. 44
Generate Code for Implementations
– GitHub Copilot
• Python、JavaScript、TypeScript, Ruby、Go、C#、C など
• OpenAI Codex
– Amazon CodeWhisperer
• Python、Java、JavaScript、TypeScript、C#、Rust、Go、Ruby、Scala、
Kotlin、PHP、C、C++、Shell Script、SQL
AI によるペアプロ
Copyright © 2024 DOCOMO Innovations, Inc. All Rights Reserved. 45
Generate Code for Implementations
– GitHub Copilot
• Python、JavaScript、TypeScript, Ruby、Go、C#、C など
• OpenAI Codex
– Amazon CodeWhisperer
• Python、Java、JavaScript、TypeScript、C#、Rust、Go、Ruby、Scala、
Kotlin、PHP、C、C++、Shell Script、SQL
Copyright © 2024 DOCOMO Innovations, Inc. All Rights Reserved. 46
Generate Code for Implementations
– GitHub Copilot
• Python、JavaScript、TypeScript, Ruby、Go、C#、C など
• OpenAI Codex
– Amazon CodeWhisperer
• Python、Java、JavaScript、TypeScript、C#、Rust、Go、Ruby、Scala、
Kotlin、PHP、C、C++、Shell Script、SQL
AI-Driven Pair Programming
Copyright © 2024 DOCOMO Innovations, Inc. All Rights Reserved. 47
Code Review Policy
Copyright © 2024 DOCOMO Innovations, Inc. All Rights Reserved. 48
Code Review Policy
Copyright © 2024 DOCOMO Innovations, Inc. All Rights Reserved. 49
Code Review Policy
Copyright © 2024 DOCOMO Innovations, Inc. All Rights Reserved. 50
Code Review Policy
Copyright © 2024 DOCOMO Innovations, Inc. All Rights Reserved. 51
Challenge:
Can human code reviews be replaced
with ChatGPT?
52
Using ChatGPT for Code Review
What is a “Prompt”?
– The command text given to ChatGPT
• Refactor the following code
• Refactor the following code without splitting it
• Refactor the following code using a guard clause
• Refactor the following code using array_map()
• Refactor the following test code using Scenario Outline
…and so on
It might also be a good idea to start with the suggestion "You are a
code reviewer."
Copyright © 2024 DOCOMO Innovations, Inc. All Rights Reserved. 53
What is a “Prompt”?
– The command text given to ChatGPT
• Refactor the following code
• Refactor the following code without splitting it
• Refactor the following code using a guard clause
• Refactor the following code using array_map()
• Refactor the following test code using Scenario Outline
…and so on
It might also be a good idea to start with the suggestion "You are a
code reviewer."
Copyright © 2024 DOCOMO Innovations, Inc. All Rights Reserved. 54
What is a “Prompt”?
– The command text given to ChatGPT
• Refactor the following code
• Refactor the following code without splitting it
• Refactor the following code using a guard clause
• Refactor the following code using array_map()
• Refactor the following test code using Scenario Outline
…and so on
It might also be a good idea to start with the suggestion "You are a
code reviewer."
Copyright © 2024 DOCOMO Innovations, Inc. All Rights Reserved. 55
What is a “Prompt”?
– The command text given to ChatGPT
• Refactor the following code
• Refactor the following code without splitting it
• Refactor the following code using a guard clause
• Refactor the following code using array_map()
• Refactor the following test code using Scenario Outline
…and so on
It might also be a good idea to start with the suggestion "You are a
code reviewer."
Copyright © 2024 DOCOMO Innovations, Inc. All Rights Reserved. 56
1. Refactor if-else Statement by Guard Clause
Copyright © 2024 DOCOMO Innovations, Inc. All Rights Reserved. 57
1. Refactor if-else Statement by Guard Clause
Copyright © 2024 DOCOMO Innovations, Inc. All Rights Reserved. 58
1. Refactor if-else Statement by Guard Clause
Copyright © 2024 DOCOMO Innovations, Inc. All Rights Reserved. 59
Refactor the following
code using a guard
clause
1. Refactor if-else Statement by Guard Clause
Copyright © 2024 DOCOMO Innovations, Inc. All Rights Reserved. 60
Refactor the following
code using a guard
clause
1. Refactor if-else Statement by Guard Clause
Copyright © 2024 DOCOMO Innovations, Inc. All Rights Reserved. 61
Refactor the following
code using a guard
clause
Refactor the following code
1. Refactor if-else Statement by Guard Clause
Copyright © 2024 DOCOMO Innovations, Inc. All Rights Reserved. 62
Refactor the following
code using a guard
clause
Refactor the following code
2. Further Refactor Using a Guard Clause
Copyright © 2024 DOCOMO Innovations, Inc. All Rights Reserved. 63
2. Further Refactor Using a Guard Clause
Copyright © 2024 DOCOMO Innovations, Inc. All Rights Reserved. 64
Refactor the following code
2. Further Refactor Using a Guard Clause
Copyright © 2024 DOCOMO Innovations, Inc. All Rights Reserved. 65
Refactor the following code
3. Refactor the Guard Clause's if-else Statement
Copyright © 2024 DOCOMO Innovations, Inc. All Rights Reserved. 66
3. Refactor the Guard Clause's if-else Statement
Copyright © 2024 DOCOMO Innovations, Inc. All Rights Reserved. 67
Refactor using guard clauses
without splitting the code.
3. Refactor the Guard Clause's if-else Statement
Copyright © 2024 DOCOMO Innovations, Inc. All Rights Reserved. 68
Refactor using guard clauses
without splitting the code.
The guard clause has eliminated the else.
The comparison operator === was
changed to !==, and the logic before and
after the if has been swapped."
4. Refactor BDD Test Scenarios
Copyright © 2024 DOCOMO Innovations, Inc. All Rights Reserved. 69
4. Refactor BDD Test Scenarios
Copyright © 2024 DOCOMO Innovations, Inc. All Rights Reserved. 70
4. Refactor BDD Test Scenarios
Copyright © 2024 DOCOMO Innovations, Inc. All Rights Reserved. 71
5. Express the Logic as Data Structure
Copyright © 2024 DOCOMO Innovations, Inc. All Rights Reserved. 72
5. Express the Logic as Data Structure
Copyright © 2024 DOCOMO Innovations, Inc. All Rights Reserved. 73
5. Express the Logic as Data Structure
Copyright © 2024 DOCOMO Innovations, Inc. All Rights Reserved. 74
Refactor this code
5. Express the Logic as Data Structure
Copyright © 2024 DOCOMO Innovations, Inc. All Rights Reserved. 75
5. Express the Logic as Data Structure
Copyright © 2024 DOCOMO Innovations, Inc. All Rights Reserved. 76
• Cyclomatic complexity
2.58 → 2.16
6. Migrate jQuery-based JS to Vanilla JS
Copyright © 2024 DOCOMO Innovations, Inc. All Rights Reserved. 77
6. Migrate jQuery-based JS to Vanilla JS
Copyright © 2024 DOCOMO Innovations, Inc. All Rights Reserved. 78
6. Migrate jQuery-based JS to Vanilla JS
Copyright © 2024 DOCOMO Innovations, Inc. All Rights Reserved. 79
Refactor this code to
vanilla JavaScript
6. Migrate jQuery-based JS to Vanilla JS
Copyright © 2024 DOCOMO Innovations, Inc. All Rights Reserved. 80
Result
• As a result of using ChatGPT for human code reviews,
out of 341 merge requests, the review outcomes could
be incorporated in 55 cases.
• That is,
– Applicable to 16% of the entire code review
Copyright © 2024 DOCOMO Innovations, Inc. All Rights Reserved. 81
Next Step
• Reviews can be made more efficient, contributing to a
significant increase in productivity, but the inputting of
prompts and the sharing of review comments are still
manual tasks that do not change.
Copyright © 2024 DOCOMO Innovations, Inc. All Rights Reserved. 82
Next Step
• Reviews can be made more efficient, contributing to a
significant increase in productivity, but the inputting of
prompts and the sharing of review comments are still
manual tasks that do not change.
Copyright © 2024 DOCOMO Innovations, Inc. All Rights Reserved. 83
Integrate into the GitLab CI automated test pipeline
(a.k.a GitOps / DevOps)
Copyright © 2024 DOCOMO Innovations, Inc. All Rights
Reserved.
84
AI-Driven Platform Engineering
85
Service Development Lifecycle
Service Development Lifecycle
Copyright © 2024 DOCOMO Innovations, Inc. All Rights Reserved. 86
Copyright © 2024 DOCOMO Innovations, Inc. All Rights Reserved. 86
Service Development Lifecycle
Copyright © 2024 DOCOMO Innovations, Inc. All Rights Reserved. 87
Implement
Build
Unit Test
Deploy
Acceptance
Test
Release
Monitor
Service
Design
Systems
Design
Copyright © 2024 DOCOMO Innovations, Inc. All Rights Reserved. 87
Lucidchart
Jira Confluence
Container
GitLab
GitLab
ChatGPT
ウェブアプリケーションフレームワーク
GitLab ChatGPT
Service Development Lifecycle
Copyright © 2024 DOCOMO Innovations, Inc. All Rights Reserved. 88
Implement
Build
Unit Test
Deploy
Acceptance
Test
Release
Monitor
Service
Design
Systems
Design
Copyright © 2024 DOCOMO Innovations, Inc. All Rights Reserved. 88
Lucidchart
Jira Confluence
Container
GitLab
GitLab
ChatGPT
ウェブアプリケーションフレームワーク
GitLab ChatGPT
Service Development Lifecycle
Copyright © 2024 DOCOMO Innovations, Inc. All Rights Reserved. 89
Implement
Build
Unit Test
Deploy
Acceptance
Test
Release
Monitor
Service
Design
Systems
Design
Copyright © 2024 DOCOMO Innovations, Inc. All Rights Reserved. 89
Lucidchart
Jira Confluence
Container
GitLab
GitLab
ChatGPT
Web Application Framework
GitLab ChatGPT
Service Development Lifecycle
Copyright © 2024 DOCOMO Innovations, Inc. All Rights Reserved. 90
Implement
Build
Unit Test
Deploy
Acceptance
Test
Release
Monitor
Service
Design
Systems
Design
Copyright © 2024 DOCOMO Innovations, Inc. All Rights Reserved. 90
Lucidchart
Jira Confluence
Container
GitLab
GitLab
ChatGPT
Web Application Framework
GitLab ChatGPT
Service Development Lifecycle
Copyright © 2024 DOCOMO Innovations, Inc. All Rights Reserved. 91
Implement
Build
Unit
Test
Deploy
Acceptance
Test
Release
Monitor
Service
Design
Systems
Design
Copyright © 2024 DOCOMO Innovations, Inc. All Rights Reserved. 91
Lucidchart
Jira Confluence
Container
GitLab
GitLab
ChatGPT
Web Application Framework
GitLab ChatGPT
GitLab ChatGPT
Service Development Lifecycle
Copyright © 2024 DOCOMO Innovations, Inc. All Rights Reserved. 92
Implement
Build
Unit
Test
Deploy
Acceptance
Test
Release
Monitor
Service
Design
Systems
Design
Copyright © 2024 DOCOMO Innovations, Inc. All Rights Reserved. 92
Lucidchart
Jira Confluence
Container
GitLab
GitLab
ChatGPT
Web Application Framework
GitLab ChatGPT
Service Development Lifecycle
Copyright © 2024 DOCOMO Innovations, Inc. All Rights Reserved. 93
Implement
Build
Unit
Test
Deploy
Acceptance
Test
Release
Monitor
Service
Design
Systems
Design
Copyright © 2024 DOCOMO Innovations, Inc. All Rights Reserved. 93
Lucidchart
Jira Confluence
Container
GitLab
GitLab
ChatGPT
Web Application Framework
GitLab ChatGPT
Service Development Lifecycle
Copyright © 2024 DOCOMO Innovations, Inc. All Rights Reserved. 94
Implement
Build
Unit
Test
Deploy
Acceptance
Test
Release
Monitor
Service
Design
Systems
Design
Copyright © 2024 DOCOMO Innovations, Inc. All Rights Reserved. 94
Lucidchart
Jira Confluence
Container
GitLab
GitLab
ChatGPT
Web Application Framework
GitLab ChatGPT
Service Development Lifecycle
Copyright © 2024 DOCOMO Innovations, Inc. All Rights Reserved. 95
Implement
Build
Unit
Test
Deploy
Acceptance
Test
Release
Monitor
Service
Design
Systems
Design
Copyright © 2024 DOCOMO Innovations, Inc. All Rights Reserved. 95
Lucidchart
Jira Confluence
Container
GitLab
GitLab
ChatGPT
Web Application Framework
GitLab ChatGPT
Service Development Lifecycle
Copyright © 2024 DOCOMO Innovations, Inc. All Rights Reserved. 96
Implement
Build
Unit
Test
Deploy
Acceptance
Test
Release
Monitor
Service
Design
Systems
Design
Copyright © 2024 DOCOMO Innovations, Inc. All Rights Reserved. 96
Lucidchart
Jira Confluence
Container
GitLab
GitLab
ChatGPT
Web Application Framework
Implement
Build
Unit
Test
Deploy
Accept
Test
Release
Monitor
Service
Design
Systems
Design
Lucidchart
Jira Confluence
Container
GitLab
ウェブアプリケーションフレームワーク
Focus
Service Development Lifecycle
Copyright © 2024 DOCOMO Innovations, Inc. All Rights Reserved. 97
Copyright © 2024 DOCOMO Innovations, Inc. All Rights Reserved. 97
GitLab ChatGPT
Unit
Test
GitOps Integration
Copyright © 2024 DOCOMO Innovations, Inc. All Rights Reserved. 98
GitOps Integration
Copyright © 2024 DOCOMO Innovations, Inc. All Rights Reserved. 99
GitOps Integration
Copyright © 2024 DOCOMO Innovations, Inc. All Rights Reserved. 100
Slack
EC2
GitLab Master (SaaS)
CI/CD
Pipeline
GitLab
Repository
Developer
gitlab-runner 1
gitlab-runner 2
gitlab-runner 3
gitlab-runner 4
GitLab
Container Registry
ChatGPT API
GitOps Integration
Copyright © 2024 DOCOMO Innovations, Inc. All Rights Reserved. 101
Future Work
• Measuring the effect and feedback on whether developers have
incorporated the review results from ChatGPT
− Developers rate the review results from ChatGPT with stars
− Building and launching a feedback measurement site integrated with Slack
Copyright © 2024 DOCOMO Innovations, Inc. All Rights Reserved. 102
Future Work
• Furthermore, implement automation of verification and
development by applying ChatGPT to each process of
the SLDC (Software Development Life Cycle) other than
code review
Copyright © 2024 DOCOMO Innovations, Inc. All Rights Reserved. 103
Demo
Copyright © 2024 DOCOMO Innovations, Inc. All Rights Reserved. 104
105
One More Thing
Copyright © 2024 DOCOMO Innovations, Inc. All Rights Reserved. 106
Copyright © 2024 DOCOMO Innovations, Inc. All Rights Reserved. 107
Copyright © 2024 DOCOMO Innovations, Inc. All Rights Reserved. 108
Copyright © 2024 DOCOMO Innovations, Inc. All Rights Reserved. 109
Copyright © 2024 DOCOMO Innovations, Inc. All Rights Reserved. 110
Demo
Copyright © 2024 DOCOMO Innovations, Inc. All Rights Reserved. 111
112
Thank you!
"Coming together is a beginning, keeping together is
a progress; working together is a success.“
- Henry Ford
Copyright © 2024 DOCOMO Innovations, Inc. All Rights Reserved.
Yas Naoi: yas.naoi@docomoinnovations.com

Automate, Integrate, Innovate - AI-powered GitLab CI for Drupal module development | Stanford WebCamp 2024

  • 1.
    Stanford WebCamp 2024 Automate,Integrate, Innovate: AI-powered GitLab CI for Drupal module development May 2024 Yas Naoi | Chief Architect, Cloud DOCOMO Innovations, Inc. 1 Copyright © 2024 DOCOMO Innovations, Inc. All Rights Reserved.
  • 2.
    Yas 2 Copyright © 2024DOCOMO Innovations, Inc. All Rights Reserved.
  • 3.
    Yas 3 Copyright © 2024DOCOMO Innovations, Inc. All Rights Reserved. • Chief Architect, Cloud
  • 4.
    Yas 4 Copyright © 2024DOCOMO Innovations, Inc. All Rights Reserved. • Chief Architect, Cloud • DOCOMO Innovations, Inc. (Sunnyvale, CA) • NTT DOCOMO Inc.
  • 5.
    Yas • Chief Architect,Cloud • DOCOMO Innovations, Inc. (Sunnyvale, CA) • NTT DOCOMO Inc. • Cloud, DevOps, Agile Software Development • d.o: 20 years 5 Copyright © 2024 DOCOMO Innovations, Inc. All Rights Reserved.
  • 6.
  • 7.
    7 Copyright © 2024DOCOMO Innovations, Inc. All Rights Reserved. Cloud Orchestrator Search: drupal cloud orchestrator
  • 8.
    8 Copyright © 2024DOCOMO Innovations, Inc. All Rights Reserved. Cloud Orchestrator Search: drupal cloud orchestrator
  • 9.
    Multi-cloud Support ────────────── 9 Copyright ©2024 DOCOMO Innovations, Inc. All Rights Reserved. Cloud Orchestrator
  • 10.
    Multi-cloud Support ────────────── § AWS 10 Copyright© 2024 DOCOMO Innovations, Inc. All Rights Reserved. Cloud Orchestrator
  • 11.
    Multi-cloud Support ────────────── § AWS §Kubernetes 11 Copyright © 2024 DOCOMO Innovations, Inc. All Rights Reserved. Cloud Orchestrator
  • 12.
    Multi-cloud Support ────────────── § AWS §Kubernetes § OpenStack 12 Copyright © 2024 DOCOMO Innovations, Inc. All Rights Reserved. Cloud Orchestrator
  • 13.
    Multi-cloud Support ────────────── § AWS §Kubernetes § OpenStack § VMware 13 Copyright © 2024 DOCOMO Innovations, Inc. All Rights Reserved. Cloud Orchestrator
  • 14.
    Multi-cloud Support ────────────── § AWS §Kubernetes § OpenStack § VMware § Terraform Cloud 14 Copyright © 2024 DOCOMO Innovations, Inc. All Rights Reserved. Cloud Orchestrator
  • 15.
    x Cloud Orchestrator Copyright© 2024 DOCOMO Innovations, Inc. All Rights Reserved. 15
  • 16.
    Agenda 16 Copyright © 2024DOCOMO Innovations, Inc. All Rights Reserved.
  • 17.
    Agenda 1. Human’s ManualWork: Introducing how ChatGPT can be utilized in the development field – Code review using ChatGPT (Browser version) Copyright © 2024 DOCOMO Innovations, Inc. All Rights Reserved. 17
  • 18.
    Agenda 1. Human’s ManualWork: Introducing how ChatGPT can be utilized in the development field – Code review using ChatGPT (Browser version) 2. Automation: Sharing use cases of GitLab CI integrated with ChatGPT – Integration and automation of ChatGPT's review process in GitLab CI Copyright © 2024 DOCOMO Innovations, Inc. All Rights Reserved. 18
  • 19.
  • 20.
    Copyright © 2024DOCOMO Innovations, Inc. All Rights Reserved. 20
  • 21.
    Copyright © 2024DOCOMO Innovations, Inc. All Rights Reserved. 21
  • 22.
    Copyright © 2024DOCOMO Innovations, Inc. All Rights Reserved. 22
  • 23.
    Copyright © 2024DOCOMO Innovations, Inc. All Rights Reserved. 23 Sprint Planning 1
  • 24.
    Copyright © 2024DOCOMO Innovations, Inc. All Rights Reserved. 24 Develop Sprint Planning 1 2
  • 25.
    Copyright © 2024DOCOMO Innovations, Inc. All Rights Reserved. 25 Develop Sprint Planning 1 2 Create Issue & Patch 3
  • 26.
    Copyright © 2024DOCOMO Innovations, Inc. All Rights Reserved. 26 Develop Sprint Planning 1 2 Create Issue & Patch 3 Active
  • 27.
    Copyright © 2024DOCOMO Innovations, Inc. All Rights Reserved. 27 Develop Sprint Planning 1 2 Create Issue & Patch 3 Needs Work Active
  • 28.
    Copyright © 2024DOCOMO Innovations, Inc. All Rights Reserved. 28 Develop Sprint Planning 1 2 Create Issue & Patch 3 Needs Work Active Needs Review
  • 29.
    Copyright © 2024DOCOMO Innovations, Inc. All Rights Reserved. 29 Develop Automated Test Sprint Planning 1 2 4 Create Issue & Patch 3 Needs Work Active Needs Review
  • 30.
    Copyright © 2024DOCOMO Innovations, Inc. All Rights Reserved. 30 Develop Automated Test Sprint Planning 1 2 4 Create Issue & Patch 3 Needs Work Active 7.x: Pass Needs Review
  • 31.
    Copyright © 2024DOCOMO Innovations, Inc. All Rights Reserved. 31 Develop Automated Test Sprint Planning Merge Request Review 1 2 4 5 Create Issue & Patch 3 Needs Work Active 7.x: Pass Needs Review
  • 32.
    Copyright © 2024DOCOMO Innovations, Inc. All Rights Reserved. 32 Develop Automated Test Sprint Planning Merge Request Review 1 2 4 5 Create Issue & Patch 3 Needs Work Active Reviewed & tested by the community 7.x: Pass Needs Review
  • 33.
    Copyright © 2024DOCOMO Innovations, Inc. All Rights Reserved. 33 Merge Patch Develop Automated Test Sprint Planning Merge Request Review 1 2 4 5 6 Create Issue & Patch 3 Needs Work Active Reviewed & tested by the community 7.x: Pass Needs Review
  • 34.
    Copyright © 2024DOCOMO Innovations, Inc. All Rights Reserved. 34 Merge Patch Develop Automated Test Sprint Review Sprint Planning Merge Request Review 1 2 4 5 6 7 Create Issue & Patch 3 Needs Work Active Fixed Reviewed & tested by the community 7.x: Pass Needs Review
  • 35.
    Copyright © 2024DOCOMO Innovations, Inc. All Rights Reserved. 35 Merge Patch Develop Automated Test Sprint Review Sprint Planning 1 2 4 6 7 Create Issue & Patch 3 Needs Review Needs Work Active Fixed Reviewed & tested by the community 7.x: Pass Merge Request Review 5 Focus
  • 36.
  • 37.
    Review Techniques Copyright ©2024 DOCOMO Innovations, Inc. All Rights Reserved. 37
  • 38.
    Review Techniques • StaticCode Analysis – Lint – Coding Standards – Best Practice – Security Scan • AI による解析 – AWS CodeGuru Reviewer / Profiler (Java と Python) Copyright © 2024 DOCOMO Innovations, Inc. All Rights Reserved. 38
  • 39.
    Review Techniques • StaticCode Analysis – Lint – Coding Standards – Best Practice – Security Scan • AI による解析 – AWS CodeGuru Reviewer / Profiler (Java と Python) Copyright © 2024 DOCOMO Innovations, Inc. All Rights Reserved. 39
  • 40.
    Review Techniques • StaticCode Analysis – Lint – Coding Standards – Best Practice – Security Scan • AI による解析 – AWS CodeGuru Reviewer / Profiler (Java と Python) Copyright © 2024 DOCOMO Innovations, Inc. All Rights Reserved. 40
  • 41.
    Review Techniques • StaticCode Analysis – Lint – Coding Standards – Best Practices – Security Scan • AI による解析 – AWS CodeGuru Reviewer / Profiler (Java と Python) Copyright © 2024 DOCOMO Innovations, Inc. All Rights Reserved. 41
  • 42.
    Review Techniques • StaticCode Analysis – Lint – Coding Standards – Best Practices – Security Scans • AI による解析 – AWS CodeGuru Reviewer / Profiler (Java と Python) Copyright © 2024 DOCOMO Innovations, Inc. All Rights Reserved. 42
  • 43.
    Review Techniques • StaticCode Analysis – Lint – Coding Standards – Best Practices – Security Scans • AI-based Analysis – AWS CodeGuru Reviewer / Profiler (Java and Python) Copyright © 2024 DOCOMO Innovations, Inc. All Rights Reserved. 43
  • 44.
    Generate Code forImplementations AI によるペアプロ Copyright © 2024 DOCOMO Innovations, Inc. All Rights Reserved. 44
  • 45.
    Generate Code forImplementations – GitHub Copilot • Python、JavaScript、TypeScript, Ruby、Go、C#、C など • OpenAI Codex – Amazon CodeWhisperer • Python、Java、JavaScript、TypeScript、C#、Rust、Go、Ruby、Scala、 Kotlin、PHP、C、C++、Shell Script、SQL AI によるペアプロ Copyright © 2024 DOCOMO Innovations, Inc. All Rights Reserved. 45
  • 46.
    Generate Code forImplementations – GitHub Copilot • Python、JavaScript、TypeScript, Ruby、Go、C#、C など • OpenAI Codex – Amazon CodeWhisperer • Python、Java、JavaScript、TypeScript、C#、Rust、Go、Ruby、Scala、 Kotlin、PHP、C、C++、Shell Script、SQL Copyright © 2024 DOCOMO Innovations, Inc. All Rights Reserved. 46
  • 47.
    Generate Code forImplementations – GitHub Copilot • Python、JavaScript、TypeScript, Ruby、Go、C#、C など • OpenAI Codex – Amazon CodeWhisperer • Python、Java、JavaScript、TypeScript、C#、Rust、Go、Ruby、Scala、 Kotlin、PHP、C、C++、Shell Script、SQL AI-Driven Pair Programming Copyright © 2024 DOCOMO Innovations, Inc. All Rights Reserved. 47
  • 48.
    Code Review Policy Copyright© 2024 DOCOMO Innovations, Inc. All Rights Reserved. 48
  • 49.
    Code Review Policy Copyright© 2024 DOCOMO Innovations, Inc. All Rights Reserved. 49
  • 50.
    Code Review Policy Copyright© 2024 DOCOMO Innovations, Inc. All Rights Reserved. 50
  • 51.
    Code Review Policy Copyright© 2024 DOCOMO Innovations, Inc. All Rights Reserved. 51 Challenge: Can human code reviews be replaced with ChatGPT?
  • 52.
  • 53.
    What is a“Prompt”? – The command text given to ChatGPT • Refactor the following code • Refactor the following code without splitting it • Refactor the following code using a guard clause • Refactor the following code using array_map() • Refactor the following test code using Scenario Outline …and so on It might also be a good idea to start with the suggestion "You are a code reviewer." Copyright © 2024 DOCOMO Innovations, Inc. All Rights Reserved. 53
  • 54.
    What is a“Prompt”? – The command text given to ChatGPT • Refactor the following code • Refactor the following code without splitting it • Refactor the following code using a guard clause • Refactor the following code using array_map() • Refactor the following test code using Scenario Outline …and so on It might also be a good idea to start with the suggestion "You are a code reviewer." Copyright © 2024 DOCOMO Innovations, Inc. All Rights Reserved. 54
  • 55.
    What is a“Prompt”? – The command text given to ChatGPT • Refactor the following code • Refactor the following code without splitting it • Refactor the following code using a guard clause • Refactor the following code using array_map() • Refactor the following test code using Scenario Outline …and so on It might also be a good idea to start with the suggestion "You are a code reviewer." Copyright © 2024 DOCOMO Innovations, Inc. All Rights Reserved. 55
  • 56.
    What is a“Prompt”? – The command text given to ChatGPT • Refactor the following code • Refactor the following code without splitting it • Refactor the following code using a guard clause • Refactor the following code using array_map() • Refactor the following test code using Scenario Outline …and so on It might also be a good idea to start with the suggestion "You are a code reviewer." Copyright © 2024 DOCOMO Innovations, Inc. All Rights Reserved. 56
  • 57.
    1. Refactor if-elseStatement by Guard Clause Copyright © 2024 DOCOMO Innovations, Inc. All Rights Reserved. 57
  • 58.
    1. Refactor if-elseStatement by Guard Clause Copyright © 2024 DOCOMO Innovations, Inc. All Rights Reserved. 58
  • 59.
    1. Refactor if-elseStatement by Guard Clause Copyright © 2024 DOCOMO Innovations, Inc. All Rights Reserved. 59 Refactor the following code using a guard clause
  • 60.
    1. Refactor if-elseStatement by Guard Clause Copyright © 2024 DOCOMO Innovations, Inc. All Rights Reserved. 60 Refactor the following code using a guard clause
  • 61.
    1. Refactor if-elseStatement by Guard Clause Copyright © 2024 DOCOMO Innovations, Inc. All Rights Reserved. 61 Refactor the following code using a guard clause Refactor the following code
  • 62.
    1. Refactor if-elseStatement by Guard Clause Copyright © 2024 DOCOMO Innovations, Inc. All Rights Reserved. 62 Refactor the following code using a guard clause Refactor the following code
  • 63.
    2. Further RefactorUsing a Guard Clause Copyright © 2024 DOCOMO Innovations, Inc. All Rights Reserved. 63
  • 64.
    2. Further RefactorUsing a Guard Clause Copyright © 2024 DOCOMO Innovations, Inc. All Rights Reserved. 64 Refactor the following code
  • 65.
    2. Further RefactorUsing a Guard Clause Copyright © 2024 DOCOMO Innovations, Inc. All Rights Reserved. 65 Refactor the following code
  • 66.
    3. Refactor theGuard Clause's if-else Statement Copyright © 2024 DOCOMO Innovations, Inc. All Rights Reserved. 66
  • 67.
    3. Refactor theGuard Clause's if-else Statement Copyright © 2024 DOCOMO Innovations, Inc. All Rights Reserved. 67 Refactor using guard clauses without splitting the code.
  • 68.
    3. Refactor theGuard Clause's if-else Statement Copyright © 2024 DOCOMO Innovations, Inc. All Rights Reserved. 68 Refactor using guard clauses without splitting the code. The guard clause has eliminated the else. The comparison operator === was changed to !==, and the logic before and after the if has been swapped."
  • 69.
    4. Refactor BDDTest Scenarios Copyright © 2024 DOCOMO Innovations, Inc. All Rights Reserved. 69
  • 70.
    4. Refactor BDDTest Scenarios Copyright © 2024 DOCOMO Innovations, Inc. All Rights Reserved. 70
  • 71.
    4. Refactor BDDTest Scenarios Copyright © 2024 DOCOMO Innovations, Inc. All Rights Reserved. 71
  • 72.
    5. Express theLogic as Data Structure Copyright © 2024 DOCOMO Innovations, Inc. All Rights Reserved. 72
  • 73.
    5. Express theLogic as Data Structure Copyright © 2024 DOCOMO Innovations, Inc. All Rights Reserved. 73
  • 74.
    5. Express theLogic as Data Structure Copyright © 2024 DOCOMO Innovations, Inc. All Rights Reserved. 74 Refactor this code
  • 75.
    5. Express theLogic as Data Structure Copyright © 2024 DOCOMO Innovations, Inc. All Rights Reserved. 75
  • 76.
    5. Express theLogic as Data Structure Copyright © 2024 DOCOMO Innovations, Inc. All Rights Reserved. 76 • Cyclomatic complexity 2.58 → 2.16
  • 77.
    6. Migrate jQuery-basedJS to Vanilla JS Copyright © 2024 DOCOMO Innovations, Inc. All Rights Reserved. 77
  • 78.
    6. Migrate jQuery-basedJS to Vanilla JS Copyright © 2024 DOCOMO Innovations, Inc. All Rights Reserved. 78
  • 79.
    6. Migrate jQuery-basedJS to Vanilla JS Copyright © 2024 DOCOMO Innovations, Inc. All Rights Reserved. 79 Refactor this code to vanilla JavaScript
  • 80.
    6. Migrate jQuery-basedJS to Vanilla JS Copyright © 2024 DOCOMO Innovations, Inc. All Rights Reserved. 80
  • 81.
    Result • As aresult of using ChatGPT for human code reviews, out of 341 merge requests, the review outcomes could be incorporated in 55 cases. • That is, – Applicable to 16% of the entire code review Copyright © 2024 DOCOMO Innovations, Inc. All Rights Reserved. 81
  • 82.
    Next Step • Reviewscan be made more efficient, contributing to a significant increase in productivity, but the inputting of prompts and the sharing of review comments are still manual tasks that do not change. Copyright © 2024 DOCOMO Innovations, Inc. All Rights Reserved. 82
  • 83.
    Next Step • Reviewscan be made more efficient, contributing to a significant increase in productivity, but the inputting of prompts and the sharing of review comments are still manual tasks that do not change. Copyright © 2024 DOCOMO Innovations, Inc. All Rights Reserved. 83 Integrate into the GitLab CI automated test pipeline
  • 84.
    (a.k.a GitOps /DevOps) Copyright © 2024 DOCOMO Innovations, Inc. All Rights Reserved. 84 AI-Driven Platform Engineering
  • 85.
  • 86.
    Service Development Lifecycle Copyright© 2024 DOCOMO Innovations, Inc. All Rights Reserved. 86 Copyright © 2024 DOCOMO Innovations, Inc. All Rights Reserved. 86
  • 87.
    Service Development Lifecycle Copyright© 2024 DOCOMO Innovations, Inc. All Rights Reserved. 87 Implement Build Unit Test Deploy Acceptance Test Release Monitor Service Design Systems Design Copyright © 2024 DOCOMO Innovations, Inc. All Rights Reserved. 87 Lucidchart Jira Confluence Container GitLab GitLab ChatGPT ウェブアプリケーションフレームワーク GitLab ChatGPT
  • 88.
    Service Development Lifecycle Copyright© 2024 DOCOMO Innovations, Inc. All Rights Reserved. 88 Implement Build Unit Test Deploy Acceptance Test Release Monitor Service Design Systems Design Copyright © 2024 DOCOMO Innovations, Inc. All Rights Reserved. 88 Lucidchart Jira Confluence Container GitLab GitLab ChatGPT ウェブアプリケーションフレームワーク GitLab ChatGPT
  • 89.
    Service Development Lifecycle Copyright© 2024 DOCOMO Innovations, Inc. All Rights Reserved. 89 Implement Build Unit Test Deploy Acceptance Test Release Monitor Service Design Systems Design Copyright © 2024 DOCOMO Innovations, Inc. All Rights Reserved. 89 Lucidchart Jira Confluence Container GitLab GitLab ChatGPT Web Application Framework GitLab ChatGPT
  • 90.
    Service Development Lifecycle Copyright© 2024 DOCOMO Innovations, Inc. All Rights Reserved. 90 Implement Build Unit Test Deploy Acceptance Test Release Monitor Service Design Systems Design Copyright © 2024 DOCOMO Innovations, Inc. All Rights Reserved. 90 Lucidchart Jira Confluence Container GitLab GitLab ChatGPT Web Application Framework GitLab ChatGPT
  • 91.
    Service Development Lifecycle Copyright© 2024 DOCOMO Innovations, Inc. All Rights Reserved. 91 Implement Build Unit Test Deploy Acceptance Test Release Monitor Service Design Systems Design Copyright © 2024 DOCOMO Innovations, Inc. All Rights Reserved. 91 Lucidchart Jira Confluence Container GitLab GitLab ChatGPT Web Application Framework GitLab ChatGPT
  • 92.
    GitLab ChatGPT Service DevelopmentLifecycle Copyright © 2024 DOCOMO Innovations, Inc. All Rights Reserved. 92 Implement Build Unit Test Deploy Acceptance Test Release Monitor Service Design Systems Design Copyright © 2024 DOCOMO Innovations, Inc. All Rights Reserved. 92 Lucidchart Jira Confluence Container GitLab GitLab ChatGPT Web Application Framework
  • 93.
    GitLab ChatGPT Service DevelopmentLifecycle Copyright © 2024 DOCOMO Innovations, Inc. All Rights Reserved. 93 Implement Build Unit Test Deploy Acceptance Test Release Monitor Service Design Systems Design Copyright © 2024 DOCOMO Innovations, Inc. All Rights Reserved. 93 Lucidchart Jira Confluence Container GitLab GitLab ChatGPT Web Application Framework
  • 94.
    GitLab ChatGPT Service DevelopmentLifecycle Copyright © 2024 DOCOMO Innovations, Inc. All Rights Reserved. 94 Implement Build Unit Test Deploy Acceptance Test Release Monitor Service Design Systems Design Copyright © 2024 DOCOMO Innovations, Inc. All Rights Reserved. 94 Lucidchart Jira Confluence Container GitLab GitLab ChatGPT Web Application Framework
  • 95.
    GitLab ChatGPT Service DevelopmentLifecycle Copyright © 2024 DOCOMO Innovations, Inc. All Rights Reserved. 95 Implement Build Unit Test Deploy Acceptance Test Release Monitor Service Design Systems Design Copyright © 2024 DOCOMO Innovations, Inc. All Rights Reserved. 95 Lucidchart Jira Confluence Container GitLab GitLab ChatGPT Web Application Framework
  • 96.
    GitLab ChatGPT Service DevelopmentLifecycle Copyright © 2024 DOCOMO Innovations, Inc. All Rights Reserved. 96 Implement Build Unit Test Deploy Acceptance Test Release Monitor Service Design Systems Design Copyright © 2024 DOCOMO Innovations, Inc. All Rights Reserved. 96 Lucidchart Jira Confluence Container GitLab GitLab ChatGPT Web Application Framework
  • 97.
    Implement Build Unit Test Deploy Accept Test Release Monitor Service Design Systems Design Lucidchart Jira Confluence Container GitLab ウェブアプリケーションフレームワーク Focus Service DevelopmentLifecycle Copyright © 2024 DOCOMO Innovations, Inc. All Rights Reserved. 97 Copyright © 2024 DOCOMO Innovations, Inc. All Rights Reserved. 97 GitLab ChatGPT Unit Test
  • 98.
    GitOps Integration Copyright ©2024 DOCOMO Innovations, Inc. All Rights Reserved. 98
  • 99.
    GitOps Integration Copyright ©2024 DOCOMO Innovations, Inc. All Rights Reserved. 99
  • 100.
    GitOps Integration Copyright ©2024 DOCOMO Innovations, Inc. All Rights Reserved. 100 Slack EC2 GitLab Master (SaaS) CI/CD Pipeline GitLab Repository Developer gitlab-runner 1 gitlab-runner 2 gitlab-runner 3 gitlab-runner 4 GitLab Container Registry ChatGPT API
  • 101.
    GitOps Integration Copyright ©2024 DOCOMO Innovations, Inc. All Rights Reserved. 101
  • 102.
    Future Work • Measuringthe effect and feedback on whether developers have incorporated the review results from ChatGPT − Developers rate the review results from ChatGPT with stars − Building and launching a feedback measurement site integrated with Slack Copyright © 2024 DOCOMO Innovations, Inc. All Rights Reserved. 102
  • 103.
    Future Work • Furthermore,implement automation of verification and development by applying ChatGPT to each process of the SLDC (Software Development Life Cycle) other than code review Copyright © 2024 DOCOMO Innovations, Inc. All Rights Reserved. 103
  • 104.
    Demo Copyright © 2024DOCOMO Innovations, Inc. All Rights Reserved. 104
  • 105.
  • 106.
    Copyright © 2024DOCOMO Innovations, Inc. All Rights Reserved. 106
  • 107.
    Copyright © 2024DOCOMO Innovations, Inc. All Rights Reserved. 107
  • 108.
    Copyright © 2024DOCOMO Innovations, Inc. All Rights Reserved. 108
  • 109.
    Copyright © 2024DOCOMO Innovations, Inc. All Rights Reserved. 109
  • 110.
    Copyright © 2024DOCOMO Innovations, Inc. All Rights Reserved. 110
  • 111.
    Demo Copyright © 2024DOCOMO Innovations, Inc. All Rights Reserved. 111
  • 112.
    112 Thank you! "Coming togetheris a beginning, keeping together is a progress; working together is a success.“ - Henry Ford Copyright © 2024 DOCOMO Innovations, Inc. All Rights Reserved. Yas Naoi: yas.naoi@docomoinnovations.com