SlideShare une entreprise Scribd logo
1  sur  18
Copyright © 2016 Criteo
C# development workflow @ Criteo
Patrick Bruneton
Lead of DevTools
2016-06-08
Copyright © 2016 Criteo
C# at Criteo
• 1000 .NET projects (C# and SQL server)
• 100 Git repositories
• 200 developers touching the C# codebase
• Complex dependency graph
Creating an efficient development workflow has been a challenge.
Copyright © 2016 Criteo
Early days: open source model
• Code splited into many C# Nugets
• Each team responsible of a few Nugets (/ repositories)
Team A
Repo
A
A 1.0
build Repo
B
build B 1.1
1.2
Team BMerge Requests
1.1
Copyright © 2016 Criteo
Issue #1: change propagation
A
B
C
• Changes in C are long to propagate
• High “Commit to Prod” lag
• Many versions of each component to maintain
• High integration cost
• Late feedback
1.1 1.3
Copyright © 2016 Criteo
Issue #2: Nuget Dependency Hell
A
B
D
C
1.0
1.0
1.1
1.2
Copyright © 2016 Criteo
New workflow
Goal: integrate early (Continous Delivery)
A
B
D
C
HEAD
HEAD
HEAD
HEAD (for internal components)
Copyright © 2016 Criteo
Trunk Based Development
All commits in master branch
No feature branches, no internal versioning
Requires a good test coverage
Benefits:
• Very early integration of commits
• Allows true Continuous Delivery
Drawbacks:
• A commit can break all builds
• Harder to do large changes (you’re not allowed to break anything)
Copyright © 2016 Criteo
Trunk Based Development with C# at Criteo
Challenges
• Multiple git repositories
• Lots of projects
• Use cases
• Build on the CI servers
• Build on the dev machines
• Pre-merge tests
Copyright © 2016 Criteo
Trunk Based Development with C# at Criteo
Jenkins
CBS+ + +
Copyright © 2016 Criteo
Build in Jenkins: the MOAB
A job that continuously builds all C# code from latest commits
Lib1 Lib2 App
MOAB #11
MOAB #10
Copyright © 2016 Criteo
Build in Jenkins: the MOAB
$ cbs checkout
$ cbs build
$ cbs test
$ cbs export
Full build:
- Uses Microsoft.Build API
- Manages the build queue itself
- 24 builds in parallel
- CreateHardLinksFor* = true
A full build every 20 minutes
Copyright © 2016 Criteo
Build in Jenkins: the MOAB
$ cbs checkout
$ cbs build
$ cbs test
$ cbs export
Full build:
Runs Unit tests in //
Copyright © 2016 Criteo
Build in Jenkins: the MOAB
$ cbs checkout
$ cbs build
$ cbs test
$ cbs export
Full build:
List of SHA1 used
Dependency graph
Deployable packages
Assemblies (dll + pdb)
Filer
Copyright © 2016 Criteo
Build on the Dev machine: using all sources
$ cbs checkout app --with-dependencies
$ ls
app/app.csproj
lib1/lib1.csproj
lib2/lib2.csproj
default.sln
$ cbs build
App
Lib1 Lib2
Copyright © 2016 Criteo
Build on the Dev machine: using MOAB snapshots
$ cbs checkout app
$ ls
app/app.csproj
default.sln
bin/moab/lib1.dll
bin/moab/lib2.dll
<Reference Include="Lib1">
<Reference Include="Lib2">
<Import Project="cbs.targets">
App
Lib1 Lib2
Copyright © 2016 Criteo
Pre-submit tests
cbs checkout changed-repo --with-clients
cherry-pick change
cbs build
cbs test [--with-clients]
M
O
A
B
Copyright © 2016 Criteo
Conclusion
• Trunk Based Development is powerful
• It’s a pre-requisite for Continuous Delivery, which allows agility
• TBD can be implemented with C#, but we needed some tooling
Copyright © 2016 Criteo
Questions ?

Contenu connexe

Tendances

Tendances (20)

WKP Team Workspaces Webinar
WKP Team Workspaces WebinarWKP Team Workspaces Webinar
WKP Team Workspaces Webinar
 
Meetup 23 - 03 - Application Delivery on K8S with GitOps
Meetup 23 - 03 - Application Delivery on K8S with GitOpsMeetup 23 - 03 - Application Delivery on K8S with GitOps
Meetup 23 - 03 - Application Delivery on K8S with GitOps
 
The Anatomy Of A Performance Audit
The Anatomy Of A Performance AuditThe Anatomy Of A Performance Audit
The Anatomy Of A Performance Audit
 
Knative CloudEvents
Knative CloudEventsKnative CloudEvents
Knative CloudEvents
 
The Building Blocks of DX: K8s Evolution from CLI to GitOps
The Building Blocks of DX: K8s Evolution from CLI to GitOpsThe Building Blocks of DX: K8s Evolution from CLI to GitOps
The Building Blocks of DX: K8s Evolution from CLI to GitOps
 
CI:CD in Lightspeed with kubernetes and argo cd
CI:CD in Lightspeed with kubernetes and argo cdCI:CD in Lightspeed with kubernetes and argo cd
CI:CD in Lightspeed with kubernetes and argo cd
 
Building Bridges Between Applications and Data
Building Bridges Between Applications and DataBuilding Bridges Between Applications and Data
Building Bridges Between Applications and Data
 
GitLab London Meetup: How Containerized Pipelines and Kubernetes Can Boost Yo...
GitLab London Meetup: How Containerized Pipelines and Kubernetes Can Boost Yo...GitLab London Meetup: How Containerized Pipelines and Kubernetes Can Boost Yo...
GitLab London Meetup: How Containerized Pipelines and Kubernetes Can Boost Yo...
 
From development to production: Deploying Java and Scala apps to kubernetes
From development to production: Deploying Java and Scala apps to kubernetesFrom development to production: Deploying Java and Scala apps to kubernetes
From development to production: Deploying Java and Scala apps to kubernetes
 
Continuous Deployment for Staging and Production Environments
Continuous Deployment for Staging and Production EnvironmentsContinuous Deployment for Staging and Production Environments
Continuous Deployment for Staging and Production Environments
 
Part 3 Docker Concepts - Kitematic
Part 3 Docker Concepts - KitematicPart 3 Docker Concepts - Kitematic
Part 3 Docker Concepts - Kitematic
 
Cicd pixelfederation
Cicd pixelfederationCicd pixelfederation
Cicd pixelfederation
 
Beyond OpenStack | OpenStack in Real Life
Beyond OpenStack | OpenStack in Real LifeBeyond OpenStack | OpenStack in Real Life
Beyond OpenStack | OpenStack in Real Life
 
Enhance Your Kubernetes CI/CD Pipelines With GitLab & Open Source
Enhance Your Kubernetes CI/CD Pipelines With GitLab & Open SourceEnhance Your Kubernetes CI/CD Pipelines With GitLab & Open Source
Enhance Your Kubernetes CI/CD Pipelines With GitLab & Open Source
 
GraphQL Bangkok Meetup 6.0
GraphQL Bangkok Meetup 6.0GraphQL Bangkok Meetup 6.0
GraphQL Bangkok Meetup 6.0
 
What's Coming in Apache Airflow 2.0 - PyDataWarsaw 2019
What's Coming in Apache Airflow 2.0 - PyDataWarsaw 2019What's Coming in Apache Airflow 2.0 - PyDataWarsaw 2019
What's Coming in Apache Airflow 2.0 - PyDataWarsaw 2019
 
Kubernetes at Reddit: An Origin Story - KubeCon NA 2018
Kubernetes at Reddit: An Origin Story - KubeCon NA 2018Kubernetes at Reddit: An Origin Story - KubeCon NA 2018
Kubernetes at Reddit: An Origin Story - KubeCon NA 2018
 
DevOps Toolkit
DevOps ToolkitDevOps Toolkit
DevOps Toolkit
 
Blazing fast sites using Blaze, Hybrid CMS NYC
Blazing fast sites using Blaze, Hybrid CMS NYCBlazing fast sites using Blaze, Hybrid CMS NYC
Blazing fast sites using Blaze, Hybrid CMS NYC
 
Develop, deploy, and operate services at reddit scale oscon 2018
Develop, deploy, and operate services at reddit scale   oscon 2018Develop, deploy, and operate services at reddit scale   oscon 2018
Develop, deploy, and operate services at reddit scale oscon 2018
 

En vedette

EN - Criteo - BD Deck -July 2014 - rebrand
EN - Criteo - BD Deck -July 2014 - rebrandEN - Criteo - BD Deck -July 2014 - rebrand
EN - Criteo - BD Deck -July 2014 - rebrand
Djilali Zitouni
 
Introduction Criteo - 2.0
Introduction Criteo - 2.0Introduction Criteo - 2.0
Introduction Criteo - 2.0
Scott Turecek
 
criteo-performance-advertising-playbook-2015
criteo-performance-advertising-playbook-2015criteo-performance-advertising-playbook-2015
criteo-performance-advertising-playbook-2015
Carolyn Bednarz
 
Ep17-AdServer Migrations
Ep17-AdServer MigrationsEp17-AdServer Migrations
Ep17-AdServer Migrations
Debaroon Gupta
 
Infographic Advertising Responsive Design by Smart AdServer
Infographic Advertising Responsive Design by Smart AdServerInfographic Advertising Responsive Design by Smart AdServer
Infographic Advertising Responsive Design by Smart AdServer
Smart AdServer
 
7 things about advertising for mobile and tablet
7 things about advertising for mobile and tablet7 things about advertising for mobile and tablet
7 things about advertising for mobile and tablet
Smart AdServer
 
Etude Criteo - la valeur réelle des internautes qui cliquent - 26 Juin 2012
Etude Criteo - la valeur réelle des internautes qui cliquent  - 26 Juin 2012Etude Criteo - la valeur réelle des internautes qui cliquent  - 26 Juin 2012
Etude Criteo - la valeur réelle des internautes qui cliquent - 26 Juin 2012
Romain Fonnier
 

En vedette (20)

New challenges for scalable machine learning in online advertising
New challenges for scalable machine learning in online advertisingNew challenges for scalable machine learning in online advertising
New challenges for scalable machine learning in online advertising
 
Making advertising personal, 4th NL Recommenders Meetup
Making advertising personal, 4th NL Recommenders MeetupMaking advertising personal, 4th NL Recommenders Meetup
Making advertising personal, 4th NL Recommenders Meetup
 
EN - Criteo - BD Deck -July 2014 - rebrand
EN - Criteo - BD Deck -July 2014 - rebrandEN - Criteo - BD Deck -July 2014 - rebrand
EN - Criteo - BD Deck -July 2014 - rebrand
 
Introduction Criteo - 2.0
Introduction Criteo - 2.0Introduction Criteo - 2.0
Introduction Criteo - 2.0
 
RecSys 2015: Large-scale real-time product recommendation at Criteo
RecSys 2015: Large-scale real-time product recommendation at CriteoRecSys 2015: Large-scale real-time product recommendation at Criteo
RecSys 2015: Large-scale real-time product recommendation at Criteo
 
New machine learning challenges at Criteo
New machine learning challenges at CriteoNew machine learning challenges at Criteo
New machine learning challenges at Criteo
 
RecsysFR: Criteo presentation
RecsysFR: Criteo presentationRecsysFR: Criteo presentation
RecsysFR: Criteo presentation
 
Damien Lefortier, Senior Machine Learning Engineer and Tech Lead in the Predi...
Damien Lefortier, Senior Machine Learning Engineer and Tech Lead in the Predi...Damien Lefortier, Senior Machine Learning Engineer and Tech Lead in the Predi...
Damien Lefortier, Senior Machine Learning Engineer and Tech Lead in the Predi...
 
CONTENT2VEC: a Joint Architecture to use Product Image and Text for the task ...
CONTENT2VEC: a Joint Architecture to use Product Image and Text for the task ...CONTENT2VEC: a Joint Architecture to use Product Image and Text for the task ...
CONTENT2VEC: a Joint Architecture to use Product Image and Text for the task ...
 
Machine learning at Criteo - Paris Datageeks
Machine learning at Criteo - Paris DatageeksMachine learning at Criteo - Paris Datageeks
Machine learning at Criteo - Paris Datageeks
 
criteo-performance-advertising-playbook-2015
criteo-performance-advertising-playbook-2015criteo-performance-advertising-playbook-2015
criteo-performance-advertising-playbook-2015
 
LUMA Digital Brief 012 - Market Report Q4 2016
LUMA Digital Brief 012 - Market Report Q4 2016LUMA Digital Brief 012 - Market Report Q4 2016
LUMA Digital Brief 012 - Market Report Q4 2016
 
You cant polish a turd: Clients, Content and Responsive Design
You cant polish a turd: Clients, Content and Responsive DesignYou cant polish a turd: Clients, Content and Responsive Design
You cant polish a turd: Clients, Content and Responsive Design
 
Ep17-AdServer Migrations
Ep17-AdServer MigrationsEp17-AdServer Migrations
Ep17-AdServer Migrations
 
Infographic Advertising Responsive Design by Smart AdServer
Infographic Advertising Responsive Design by Smart AdServerInfographic Advertising Responsive Design by Smart AdServer
Infographic Advertising Responsive Design by Smart AdServer
 
7 things about advertising for mobile and tablet
7 things about advertising for mobile and tablet7 things about advertising for mobile and tablet
7 things about advertising for mobile and tablet
 
Bizarre... vous avez dit bizarre - Paris Monitoring meetup #2
Bizarre... vous avez dit bizarre - Paris Monitoring meetup #2Bizarre... vous avez dit bizarre - Paris Monitoring meetup #2
Bizarre... vous avez dit bizarre - Paris Monitoring meetup #2
 
Infographic: How Professional Services Automation can transform your Company!
Infographic: How Professional Services Automation can transform your Company!Infographic: How Professional Services Automation can transform your Company!
Infographic: How Professional Services Automation can transform your Company!
 
Saintjo Two AV4
Saintjo Two AV4Saintjo Two AV4
Saintjo Two AV4
 
Etude Criteo - la valeur réelle des internautes qui cliquent - 26 Juin 2012
Etude Criteo - la valeur réelle des internautes qui cliquent  - 26 Juin 2012Etude Criteo - la valeur réelle des internautes qui cliquent  - 26 Juin 2012
Etude Criteo - la valeur réelle des internautes qui cliquent - 26 Juin 2012
 

Similaire à C# development workflow @ criteo

Tekton_ArgoCD-_KCD_Taiwan-cicd-openshift
Tekton_ArgoCD-_KCD_Taiwan-cicd-openshiftTekton_ArgoCD-_KCD_Taiwan-cicd-openshift
Tekton_ArgoCD-_KCD_Taiwan-cicd-openshift
bashwen2022
 

Similaire à C# development workflow @ criteo (20)

Building A Distributed Build System at Google Scale (StrangeLoop 2016)
Building A Distributed Build System at Google Scale (StrangeLoop 2016)Building A Distributed Build System at Google Scale (StrangeLoop 2016)
Building A Distributed Build System at Google Scale (StrangeLoop 2016)
 
Titanium Conf Baltimore Keynote 2013
Titanium Conf Baltimore Keynote 2013Titanium Conf Baltimore Keynote 2013
Titanium Conf Baltimore Keynote 2013
 
Pat Gelsinger, James Watters, Cornelia Davis at SpringOne Platform 2019
Pat Gelsinger, James Watters, Cornelia Davis at SpringOne Platform 2019Pat Gelsinger, James Watters, Cornelia Davis at SpringOne Platform 2019
Pat Gelsinger, James Watters, Cornelia Davis at SpringOne Platform 2019
 
Continuous Integration with Cloud Foundry Concourse and Docker on OpenPOWER
Continuous Integration with Cloud Foundry Concourse and Docker on OpenPOWERContinuous Integration with Cloud Foundry Concourse and Docker on OpenPOWER
Continuous Integration with Cloud Foundry Concourse and Docker on OpenPOWER
 
Webinar by ZNetLive & Plesk- Winning the Game for WebOps and DevOps
Webinar by ZNetLive & Plesk- Winning the Game for WebOps and DevOps Webinar by ZNetLive & Plesk- Winning the Game for WebOps and DevOps
Webinar by ZNetLive & Plesk- Winning the Game for WebOps and DevOps
 
Understanding meteor
Understanding meteorUnderstanding meteor
Understanding meteor
 
High Productivity Web Development Workflow
High Productivity Web Development WorkflowHigh Productivity Web Development Workflow
High Productivity Web Development Workflow
 
High productivity web development workflow - JavaScript Meetup Saigon 2014
High productivity web development workflow - JavaScript Meetup Saigon 2014High productivity web development workflow - JavaScript Meetup Saigon 2014
High productivity web development workflow - JavaScript Meetup Saigon 2014
 
Hardening Your CI/CD Pipelines with GitOps and Continuous Security
Hardening Your CI/CD Pipelines with GitOps and Continuous SecurityHardening Your CI/CD Pipelines with GitOps and Continuous Security
Hardening Your CI/CD Pipelines with GitOps and Continuous Security
 
Microsoft .NET 6 -What's All About The New Update
Microsoft .NET 6 -What's All About The New UpdateMicrosoft .NET 6 -What's All About The New Update
Microsoft .NET 6 -What's All About The New Update
 
Introduction to Jenkins X - a beginner's guide
Introduction to Jenkins X - a beginner's guideIntroduction to Jenkins X - a beginner's guide
Introduction to Jenkins X - a beginner's guide
 
Tridens DevOps
Tridens DevOpsTridens DevOps
Tridens DevOps
 
SC20 SYCL and C++ Birds of a Feather 19th Nov 2020
SC20 SYCL and C++ Birds of a Feather 19th Nov 2020SC20 SYCL and C++ Birds of a Feather 19th Nov 2020
SC20 SYCL and C++ Birds of a Feather 19th Nov 2020
 
DevOps demystified
DevOps demystifiedDevOps demystified
DevOps demystified
 
Tekton_ArgoCD-_KCD_Taiwan-cicd-openshift
Tekton_ArgoCD-_KCD_Taiwan-cicd-openshiftTekton_ArgoCD-_KCD_Taiwan-cicd-openshift
Tekton_ArgoCD-_KCD_Taiwan-cicd-openshift
 
Java one kubernetes, jenkins and microservices
Java one   kubernetes, jenkins and microservicesJava one   kubernetes, jenkins and microservices
Java one kubernetes, jenkins and microservices
 
Cross Cloud CI Intro
Cross Cloud CI IntroCross Cloud CI Intro
Cross Cloud CI Intro
 
Platform Orchestration with Kubernetes and Docker
Platform Orchestration with Kubernetes and DockerPlatform Orchestration with Kubernetes and Docker
Platform Orchestration with Kubernetes and Docker
 
Docker in Production: How RightScale Delivers Cloud Applications
Docker in Production: How RightScale Delivers Cloud ApplicationsDocker in Production: How RightScale Delivers Cloud Applications
Docker in Production: How RightScale Delivers Cloud Applications
 
DEVNET-2006 Coding 210: Parsing JSON in C++
DEVNET-2006	Coding 210: Parsing JSON in C++DEVNET-2006	Coding 210: Parsing JSON in C++
DEVNET-2006 Coding 210: Parsing JSON in C++
 

Dernier

Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar ≼🔝 Delhi door step de...
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar  ≼🔝 Delhi door step de...Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar  ≼🔝 Delhi door step de...
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar ≼🔝 Delhi door step de...
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night StandCall Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
amitlee9823
 
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
dollysharma2066
 
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
dharasingh5698
 
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Christo Ananth
 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
ssuser89054b
 
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
dharasingh5698
 

Dernier (20)

Call for Papers - International Journal of Intelligent Systems and Applicatio...
Call for Papers - International Journal of Intelligent Systems and Applicatio...Call for Papers - International Journal of Intelligent Systems and Applicatio...
Call for Papers - International Journal of Intelligent Systems and Applicatio...
 
Bhosari ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready For ...
Bhosari ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready For ...Bhosari ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready For ...
Bhosari ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready For ...
 
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar ≼🔝 Delhi door step de...
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar  ≼🔝 Delhi door step de...Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar  ≼🔝 Delhi door step de...
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar ≼🔝 Delhi door step de...
 
Thermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VThermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - V
 
(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7
(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7
(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7
 
Thermal Engineering Unit - I & II . ppt
Thermal Engineering  Unit - I & II . pptThermal Engineering  Unit - I & II . ppt
Thermal Engineering Unit - I & II . ppt
 
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night StandCall Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
 
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
 
Thermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.pptThermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.ppt
 
Intze Overhead Water Tank Design by Working Stress - IS Method.pdf
Intze Overhead Water Tank  Design by Working Stress - IS Method.pdfIntze Overhead Water Tank  Design by Working Stress - IS Method.pdf
Intze Overhead Water Tank Design by Working Stress - IS Method.pdf
 
Water Industry Process Automation & Control Monthly - April 2024
Water Industry Process Automation & Control Monthly - April 2024Water Industry Process Automation & Control Monthly - April 2024
Water Industry Process Automation & Control Monthly - April 2024
 
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
 
data_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfdata_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdf
 
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
 
(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7
(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7
(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7
 
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
 
KubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlyKubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghly
 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
 
chapter 5.pptx: drainage and irrigation engineering
chapter 5.pptx: drainage and irrigation engineeringchapter 5.pptx: drainage and irrigation engineering
chapter 5.pptx: drainage and irrigation engineering
 
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
 

C# development workflow @ criteo

  • 1. Copyright © 2016 Criteo C# development workflow @ Criteo Patrick Bruneton Lead of DevTools 2016-06-08
  • 2. Copyright © 2016 Criteo C# at Criteo • 1000 .NET projects (C# and SQL server) • 100 Git repositories • 200 developers touching the C# codebase • Complex dependency graph Creating an efficient development workflow has been a challenge.
  • 3. Copyright © 2016 Criteo Early days: open source model • Code splited into many C# Nugets • Each team responsible of a few Nugets (/ repositories) Team A Repo A A 1.0 build Repo B build B 1.1 1.2 Team BMerge Requests 1.1
  • 4. Copyright © 2016 Criteo Issue #1: change propagation A B C • Changes in C are long to propagate • High “Commit to Prod” lag • Many versions of each component to maintain • High integration cost • Late feedback 1.1 1.3
  • 5. Copyright © 2016 Criteo Issue #2: Nuget Dependency Hell A B D C 1.0 1.0 1.1 1.2
  • 6. Copyright © 2016 Criteo New workflow Goal: integrate early (Continous Delivery) A B D C HEAD HEAD HEAD HEAD (for internal components)
  • 7. Copyright © 2016 Criteo Trunk Based Development All commits in master branch No feature branches, no internal versioning Requires a good test coverage Benefits: • Very early integration of commits • Allows true Continuous Delivery Drawbacks: • A commit can break all builds • Harder to do large changes (you’re not allowed to break anything)
  • 8. Copyright © 2016 Criteo Trunk Based Development with C# at Criteo Challenges • Multiple git repositories • Lots of projects • Use cases • Build on the CI servers • Build on the dev machines • Pre-merge tests
  • 9. Copyright © 2016 Criteo Trunk Based Development with C# at Criteo Jenkins CBS+ + +
  • 10. Copyright © 2016 Criteo Build in Jenkins: the MOAB A job that continuously builds all C# code from latest commits Lib1 Lib2 App MOAB #11 MOAB #10
  • 11. Copyright © 2016 Criteo Build in Jenkins: the MOAB $ cbs checkout $ cbs build $ cbs test $ cbs export Full build: - Uses Microsoft.Build API - Manages the build queue itself - 24 builds in parallel - CreateHardLinksFor* = true A full build every 20 minutes
  • 12. Copyright © 2016 Criteo Build in Jenkins: the MOAB $ cbs checkout $ cbs build $ cbs test $ cbs export Full build: Runs Unit tests in //
  • 13. Copyright © 2016 Criteo Build in Jenkins: the MOAB $ cbs checkout $ cbs build $ cbs test $ cbs export Full build: List of SHA1 used Dependency graph Deployable packages Assemblies (dll + pdb) Filer
  • 14. Copyright © 2016 Criteo Build on the Dev machine: using all sources $ cbs checkout app --with-dependencies $ ls app/app.csproj lib1/lib1.csproj lib2/lib2.csproj default.sln $ cbs build App Lib1 Lib2
  • 15. Copyright © 2016 Criteo Build on the Dev machine: using MOAB snapshots $ cbs checkout app $ ls app/app.csproj default.sln bin/moab/lib1.dll bin/moab/lib2.dll <Reference Include="Lib1"> <Reference Include="Lib2"> <Import Project="cbs.targets"> App Lib1 Lib2
  • 16. Copyright © 2016 Criteo Pre-submit tests cbs checkout changed-repo --with-clients cherry-pick change cbs build cbs test [--with-clients] M O A B
  • 17. Copyright © 2016 Criteo Conclusion • Trunk Based Development is powerful • It’s a pre-requisite for Continuous Delivery, which allows agility • TBD can be implemented with C#, but we needed some tooling
  • 18. Copyright © 2016 Criteo Questions ?

Notes de l'éditeur

  1. We splitted our codebase in many components packaged as Nugets. Each team was responsible of a few Nugets. Each Nuget had a version, and new versions were periodically uploaded to a nuget server. This setup worked for some time, it allowed teams to work independently from each other. On this example, team B can work on next version without worrying about their clients. And Team A is safe, because it can control exactly when it wants to integrate changes from other teams. You need only your repo to work, you don’t care about the repos of your dependencies. So it worked, but we quickly faced major issues.
  2. A breaking change in C can take a long time to be deployed in prod. C does is development and publishes its new major version. B has to upgrade its dependencies, but they may have no reason to do so. If it works fine with the version they have, why would they upgrade ? Upgrading a dependency is scary, you get many changes at one. It can be costly if breaking changes have been introduced. So the guys from team C may have to convince their clients to upgrade their dependencies. So if you have a complex dependency graph, we a lot of levels of depenency, it can become very hard to propagate changes quickly. Also, since a Nuget can be used by several components, at different versions, a team has to maintain several versions of it Nugets. This a waste of time. You cannot be sure your commit is OK until it’s deployed in production, and it happens weeks after, it’s not efficient.
  3. There is a second issue with the Nuget system. It’s the Nuget Dependency Hell. It’s quite simple, it happends when you have diamon dependencies. If A depends on B and C. B and C depends on D, but with different versions. Then you have problems. B and C must be synchronized in terms of dependency which is hard to enforce.
  4. Spending too much time in integration. Bad for agility and scaling. We decided that each component would always depend on the latest commits of its dependencies. There are still components but there are simple assemblies, not versionned nugets. All development is made is master branch. When you do a change in D, then next time A is built, this change will be integrated in A immediately. It solves our problem of late integration. You do a commit in the code base, it’s immediately visible to all. Baiscally, it’s like if we had a single repository with a giant solution.
  5. Dev are done in a single shared trunk. It’s the model that is used by companies likes Google or Facebook. There is no feature branches, all changes are done in master. Every commit produces a production ready build. It allows to do true Continuous Delivery. If you have feature branches or bumping of internal versions, then you cannot do continous delivery, because of the late integration. A commit in any repository can break the build of everybody, so we need proper tooling to avoid this situation. This is the opposite of the previous model, where when you do a commit in your component, nodody is impacted, until they actually upgrade their dependencies. Also, since you cannot break anything, it’s harder to do breaking changes, because each commit must keep the codebase in a stable state. TBD cannot be done properly if no proper test coverage: you need to be sure at any time that your code is working fine,
  6. Since there is no more Nugets and versions, it means everybody has to build using the sources. As a dev, since there are many repos, it’s hard to know where all the sources of your dependencies are. We have actually diferent use cases: On the continous integration servers, we want to build from trunk On the dev machines, we have to build from also, but we would like some optimization to avoid cloning or building the sources we don’t need We need strong tests before merge, to be able to be sure that a commit is not going to build the trunk. And for this we need to answer the questions like: what projects that depend on a given one. This is necessary, so that when you do a change on a project, you are sure you’re not going to break project that depend on you.
  7. Our setup is based on Gerrit for Code Review and git hosting, Jenkins for running the build jobs, MSBuild for actual build, and a custom tool called CBS (Criteo Build System) We had to add some tooling on top of MSBuild and Visual Studio, because we needed something to manage the multiple repos. Also the list of projects that we need to be built depends on the situation, we cannot have static msbuild or visual studio solutions. Instead with CBS, with can manage a dynamic list of projects to build.
  8. We have a job that we call the MOAB (stands for mother of all builds), that runs as fast as possible. When a run finished, a new one is launched. The goal of this job of simply to get all latest commits from C# repositories, and build the master branch. A build number is assigned at each build.
  9. cbs checkout that clones and fetches all latest sources. The we build using cbs build. Cbs is command line tool built in C#. ‘Cbs build’ computes the dependency graph between projects and build them in the right order. Cbs calls MSBuild for building each project, but it manages the build queue itself. It gives us more control than generating a build file for example.
  10. Then we run test uwing NUnit. we have a runner in CBS that allows us to run tests of different assemblies in parallel.
  11. And finally we publish artifacts of the build: We publish a file, where we store the sha1 that was used for each repo. It makes hotfix possible. We also store a dependency graph of all projects. This graph allows cbs to answer the question: what is the clients of my projects ? We store all the deployable artifacts, ready to be deployable in test environments and production We also store individual assemblies, the DLL files, that will be useful for the developers.
  12. Cbs checkout --with-dependencies gets the source code of the project I want to work on, and all the source code of its dependencies It generates a solution to build the project and the dependencies. It can also be built usng cbs build, To get the latest commits of your dependencies, just run git pull in all repos (or cbs refresh sources)
  13. It’s also possible to build using only the source code of the project you want to work on. You can ask cbs to not get the source code of your dependencies. It will get the assemblies of the latest MOAB build on Jenkins instead. It’s laike using snaphot in Maven. To get the latest commits of your dependencies, run ‘cbs refresh moab’, which will download the latest built assemblies. In our projects we don’t have any version or hintpath, when referencing an internal component. A special targets file, cbs.targets, tells msbuild where if has to find the dependencies, depending on the fact we have the source code or not.
  14. Pre-submit tests are executed when a commit is proposed for review. It verifies that the commit is not going to break any source code that is depending on it. We use cbs that knows the dependency graph of all projecs to compute the project list impacted by the change. If pre-submit tests fail, then the commit is not merged in the trunk.