SlideShare ist ein Scribd-Unternehmen logo
1 von 7
Downloaden Sie, um offline zu lesen
Amending	
  and	
  Testing	
  OpenStack	
  Changes	
  
Lab	
  Guide	
  
	
  
	
  
	
  
	
  
	
  
	
  
	
  
	
  
	
  
	
  
	
  
	
  
	
  
	
  
	
  
	
  
	
  
	
  
	
  
	
  
	
  
	
  
	
  
	
  
	
  
	
  
	
  
	
  
	
  
	
  
	
  
	
  
	
  
	
  
	
  
Cisco	
  Live!	
  2015	
  
	
  
	
  
Amending	
  Changes	
   ©	
  Cisco	
  and/or	
  its	
  affiliates.	
  All	
  rights	
  reserved.	
   2	
  
Overall	
  Objectives	
  
	
  
This	
  lab	
  will	
  guide	
  you	
  through	
  the	
  process	
  of	
  amending	
  OpenStack	
  potential	
  changes	
  
during	
  acceptance	
  review	
  by	
  the	
  community,	
  and	
  will	
  also	
  show	
  some	
  examples	
  of	
  local	
  
testing.	
  
	
  
1. Submit	
  a	
  change	
  for	
  review	
  
2. Review	
  the	
  change	
  with	
  a	
  -­‐1	
  
3. Amend	
  the	
  change	
  to	
  fix	
  the	
  problems	
  pointed	
  out	
  in	
  review	
  and	
  to	
  resolve	
  merge	
  
conflicts	
  
4. Merge	
  the	
  change	
  
5. Try	
  local	
  test	
  tooling	
  
	
   	
  
Amending	
  Changes	
   ©	
  Cisco	
  and/or	
  its	
  affiliates.	
  All	
  rights	
  reserved.	
   3	
  
Submit	
  a	
  change	
  for	
  review	
  
	
  
Log	
  into	
  your	
  Ubuntu	
  14.04	
  VM.	
  At	
  a	
  command	
  prompt,	
  make	
  a	
  new	
  directory	
  so	
  that	
  this	
  
lab	
  will	
  be	
  independent	
  of	
  whatever	
  changes	
  were	
  made	
  in	
  prior	
  labs	
  and	
  clone	
  the	
  
sandbox	
  code	
  into	
  it:	
  
	
  
mkdir	
  amend_lab	
  
cd	
  amend_lab	
  
git	
  clone	
  git://git.openstack.org/openstack-­‐dev/sandbox	
  
	
  
Then,	
  change	
  directories	
  to	
  the	
  sandbox	
  code	
  and	
  run	
  the	
  git	
  review	
  -­‐s	
  command	
  to	
  
configure	
  it	
  for	
  submission	
  to	
  gerrit	
  
	
  
cd	
  sandbox	
  
git	
  review	
  -­‐s	
  
	
  
Next,	
  make	
  a	
  new	
  branch,	
  and	
  make	
  changes	
  in	
  that	
  branch.	
  Be	
  sure	
  to	
  use	
  your	
  email	
  
address	
  in	
  the	
  below	
  commands:	
  
	
  
git	
  checkout	
  -­‐b	
  newbranch	
  origin/master	
  
echo	
  “your@email.address”	
  >>	
  Changelog	
  
git	
  add	
  Changelog	
  
git	
  commit	
  -­‐m	
  "Added	
  file"	
  
git	
  review	
  
	
  
This	
  will	
  submit	
  the	
  changed	
  code	
  to	
  gerrit	
  for	
  automated	
  and	
  human	
  review,	
  and	
  will	
  
return	
  a	
  URL	
  which	
  you	
  can	
  access	
  to	
  monitor	
  the	
  review	
  process.	
  A	
  successful	
  session	
  will	
  
look	
  like:	
  
	
  
$	
  git	
  review	
  
remote:	
  Resolving	
  deltas:	
  100%	
  (1/1)	
  
remote:	
  Processing	
  changes:	
  new:	
  1,	
  refs:	
  1,	
  done	
  
remote:	
  
remote:	
  New	
  Changes:	
  
remote:	
  	
  	
  https://review.openstack.org/188988	
  
remote:	
  
To	
  ssh://openstax-­‐haxor@review.openstack.org:29418/openstack-­‐
dev/sandbox.git	
  
	
  *	
  [new	
  branch]	
  	
  	
  	
  	
  	
  HEAD	
  -­‐>	
  refs/publish/master/newbranch	
  
$	
  
Review	
  submitted	
  changes	
  
	
  
	
  
Amending	
  Changes	
   ©	
  Cisco	
  and/or	
  its	
  affiliates.	
  All	
  rights	
  reserved.	
   4	
  
To	
  review	
  the	
  changes,	
  go	
  to	
  the	
  URL	
  returned	
  when	
  you	
  submitted	
  the	
  proposed	
  change	
  
via	
  git	
  review.	
  Review	
  the	
  change	
  and	
  give	
  it	
  a	
  -­‐1	
  due	
  to	
  incomplete	
  commit	
  messages.	
  
	
  
	
  
	
  
Amending	
  Changes	
   ©	
  Cisco	
  and/or	
  its	
  affiliates.	
  All	
  rights	
  reserved.	
   5	
  
	
  
	
  
	
  
	
  
Amend	
  the	
  change	
  to	
  resolve	
  
	
  
At	
  a	
  command	
  prompt	
  on	
  your	
  Ubuntu	
  14.04	
  VM,	
  run	
  the	
  command:	
  
	
  
git	
  config	
  -­‐-­‐amend	
  
	
  
This	
  will	
  pull	
  up	
  an	
  editor	
  in	
  which	
  you	
  can	
  put	
  a	
  new	
  commit	
  message.	
  Put	
  a	
  properly	
  
structured	
  commit	
  message	
  this	
  time:	
  
	
  
	
  
Now	
  submit	
  the	
  updated	
  code	
  for	
  re-­‐review:	
  
	
  
git	
  review	
  
	
  
In	
  review.openstack.org	
  you	
  should	
  now	
  see	
  that	
  your	
  proposed	
  change	
  has	
  a	
  second	
  
revision	
  and	
  is	
  ready	
  to	
  be	
  re-­‐reviewed.	
  
Amending	
  Changes	
   ©	
  Cisco	
  and/or	
  its	
  affiliates.	
  All	
  rights	
  reserved.	
   6	
  
	
  
	
  
Review	
  the	
  change	
  again	
  and	
  if	
  no	
  other	
  problems	
  are	
  present,	
  vote	
  +2	
  and	
  merge	
  the	
  
change.	
  
Bonus:	
  Thinking	
  about	
  merge	
  conflicts	
  
	
  
Depending	
  on	
  timing	
  of	
  submissions,	
  some	
  of	
  you	
  may	
  encounter	
  merge	
  conflicts	
  when	
  you	
  
try	
  to	
  merge	
  your	
  Changelog	
  change.	
  Think	
  about	
  why	
  that	
  is?	
  Do	
  you	
  see	
  potential	
  for	
  that	
  
happening	
  outside	
  of	
  the	
  lab	
  as	
  well?	
  
	
  
One	
  of	
  the	
  following	
  approaches	
  may	
  help	
  you	
  overcome	
  this	
  obstacle.	
  
	
  
For	
  trivial	
  rebasing	
  conflicts,	
  the	
  Rebase	
  button	
  in	
  review.openstack.org	
  may	
  resolve	
  the	
  
merge	
  conflict.	
  
Amending	
  Changes	
   ©	
  Cisco	
  and/or	
  its	
  affiliates.	
  All	
  rights	
  reserved.	
   7	
  
	
  
For	
  more	
  complicated	
  conflicts	
  the	
  process	
  will	
  vary	
  but	
  will	
  likely	
  involve	
  git	
  rebase	
  on	
  
your	
  local	
  command	
  line.	
  http://jjasghar.github.io/blog/2014/10/13/git-­‐rebase-­‐and-­‐git-­‐
detached-­‐head-­‐cheat-­‐sheet/	
  is	
  one	
  good	
  reference	
  with	
  examples.	
  
	
  
Local	
  Testing	
  
	
  
Most	
  OpenStack	
  projects	
  have	
  local	
  tests	
  which	
  should	
  be	
  run	
  prior	
  to	
  submitting	
  code	
  for	
  
review.	
  
	
  
You	
  can	
  run	
  static	
  analysis	
  tests	
  like	
  style	
  compliance	
  in	
  the	
  sandbox.	
  To	
  try	
  flake8,	
  install	
  
and	
  run	
  it	
  
	
  
sudo	
  apt-­‐get	
  install	
  flake8	
  
flake8	
  test.py	
  
	
  
You	
  can	
  also	
  run	
  unit	
  and	
  integration	
  tests	
  though	
  those	
  aren’t	
  included	
  with	
  the	
  sandbox	
  
test	
  environment.	
  To	
  see	
  some	
  of	
  those	
  you	
  can	
  download	
  one	
  of	
  the	
  larger	
  projects	
  and	
  
start	
  to	
  look	
  at	
  the	
  testing	
  included	
  with	
  it:	
  
	
  
cd	
  
sudo	
  apt-­‐get	
  install	
  python-­‐pip	
  python-­‐dev	
  libffi-­‐dev	
  	
  
sudo	
  apt-­‐get	
  install	
  libssl-­‐dev	
  libldap2-­‐dev	
  libsasl2-­‐dev	
  
sudo	
  apt-­‐get	
  install	
  libxml2-­‐dev	
  libxslt-­‐dev	
  
sudo	
  pip	
  install	
  tox	
  
git	
  clone	
  git://git.openstack.org/openstack/keystone	
  
cd	
  keystone	
  
tox	
  –e	
  py27	
  
	
  
Note:	
  most	
  projects	
  use	
  tox	
  as	
  the	
  test	
  framework.	
  Specifics	
  will	
  vary	
  by	
  project	
  and	
  will	
  
likely	
  require	
  additional	
  dependencies	
  be	
  installed	
  beyond	
  those	
  listed.	
  
	
  

Weitere ähnliche Inhalte

Was ist angesagt?

Your first patch to open stack
Your first patch to open stackYour first patch to open stack
Your first patch to open stackAkanksha Agrawal
 
Rise of the Machines - Automate your Development
Rise of the Machines - Automate your DevelopmentRise of the Machines - Automate your Development
Rise of the Machines - Automate your DevelopmentSven Peters
 
On sharing ideas & sharing code
On sharing ideas & sharing codeOn sharing ideas & sharing code
On sharing ideas & sharing codeKohsuke Kawaguchi
 
Docker and Puppet for Continuous Integration
Docker and Puppet for Continuous IntegrationDocker and Puppet for Continuous Integration
Docker and Puppet for Continuous IntegrationGiacomo Vacca
 
Folsom Summit - Hyper-V Deep Dive
Folsom Summit - Hyper-V Deep Dive Folsom Summit - Hyper-V Deep Dive
Folsom Summit - Hyper-V Deep Dive ppouliot
 
Using Docker for Testing
Using Docker for TestingUsing Docker for Testing
Using Docker for TestingCarlos Sanchez
 
Workflow, container, and beyond
Workflow, container, and beyondWorkflow, container, and beyond
Workflow, container, and beyondKohsuke Kawaguchi
 
Create Disposable Test Environments with Vagrant and Puppet
Create Disposable Test Environments with Vagrant and PuppetCreate Disposable Test Environments with Vagrant and Puppet
Create Disposable Test Environments with Vagrant and PuppetGene Gotimer
 
Why so continuous
Why so continuousWhy so continuous
Why so continuousMax Lobur
 
Git 101: Git and GitHub for Beginners
Git 101: Git and GitHub for Beginners Git 101: Git and GitHub for Beginners
Git 101: Git and GitHub for Beginners HubSpot
 
Javaone 2014 - Git & Docker with Jenkins
Javaone 2014 - Git & Docker with JenkinsJavaone 2014 - Git & Docker with Jenkins
Javaone 2014 - Git & Docker with JenkinsAndy Pemberton
 
Testing the Enterprise layers, with Arquillian
Testing the Enterprise layers, with ArquillianTesting the Enterprise layers, with Arquillian
Testing the Enterprise layers, with ArquillianVirtual JBoss User Group
 
Seven Habits of Highly Effective Jenkins Users (2014 edition!)
Seven Habits of Highly Effective Jenkins Users (2014 edition!)Seven Habits of Highly Effective Jenkins Users (2014 edition!)
Seven Habits of Highly Effective Jenkins Users (2014 edition!)Andrew Bayer
 
CAPS: What's best for deploying and managing OpenStack? Chef vs. Ansible vs. ...
CAPS: What's best for deploying and managing OpenStack? Chef vs. Ansible vs. ...CAPS: What's best for deploying and managing OpenStack? Chef vs. Ansible vs. ...
CAPS: What's best for deploying and managing OpenStack? Chef vs. Ansible vs. ...Daniel Krook
 
PVS-Studio in the Clouds: Travis CI
PVS-Studio in the Clouds: Travis CIPVS-Studio in the Clouds: Travis CI
PVS-Studio in the Clouds: Travis CIAndrey Karpov
 
Intro to Git for Drupal 7
Intro to Git for Drupal 7Intro to Git for Drupal 7
Intro to Git for Drupal 7Chris Caple
 
Calico with open stack and chef
Calico with open stack and chefCalico with open stack and chef
Calico with open stack and chefD.Rajesh Kumar
 

Was ist angesagt? (20)

Your first patch to open stack
Your first patch to open stackYour first patch to open stack
Your first patch to open stack
 
Rise of the Machines - Automate your Development
Rise of the Machines - Automate your DevelopmentRise of the Machines - Automate your Development
Rise of the Machines - Automate your Development
 
On sharing ideas & sharing code
On sharing ideas & sharing codeOn sharing ideas & sharing code
On sharing ideas & sharing code
 
Docker and Puppet for Continuous Integration
Docker and Puppet for Continuous IntegrationDocker and Puppet for Continuous Integration
Docker and Puppet for Continuous Integration
 
Folsom Summit - Hyper-V Deep Dive
Folsom Summit - Hyper-V Deep Dive Folsom Summit - Hyper-V Deep Dive
Folsom Summit - Hyper-V Deep Dive
 
Using Docker for Testing
Using Docker for TestingUsing Docker for Testing
Using Docker for Testing
 
Workflow, container, and beyond
Workflow, container, and beyondWorkflow, container, and beyond
Workflow, container, and beyond
 
Create Disposable Test Environments with Vagrant and Puppet
Create Disposable Test Environments with Vagrant and PuppetCreate Disposable Test Environments with Vagrant and Puppet
Create Disposable Test Environments with Vagrant and Puppet
 
Why so continuous
Why so continuousWhy so continuous
Why so continuous
 
Git 101: Git and GitHub for Beginners
Git 101: Git and GitHub for Beginners Git 101: Git and GitHub for Beginners
Git 101: Git and GitHub for Beginners
 
Javaone 2014 - Git & Docker with Jenkins
Javaone 2014 - Git & Docker with JenkinsJavaone 2014 - Git & Docker with Jenkins
Javaone 2014 - Git & Docker with Jenkins
 
Testing the Enterprise layers, with Arquillian
Testing the Enterprise layers, with ArquillianTesting the Enterprise layers, with Arquillian
Testing the Enterprise layers, with Arquillian
 
Open stack qa and tempest
Open stack qa and tempestOpen stack qa and tempest
Open stack qa and tempest
 
Seven Habits of Highly Effective Jenkins Users (2014 edition!)
Seven Habits of Highly Effective Jenkins Users (2014 edition!)Seven Habits of Highly Effective Jenkins Users (2014 edition!)
Seven Habits of Highly Effective Jenkins Users (2014 edition!)
 
CAPS: What's best for deploying and managing OpenStack? Chef vs. Ansible vs. ...
CAPS: What's best for deploying and managing OpenStack? Chef vs. Ansible vs. ...CAPS: What's best for deploying and managing OpenStack? Chef vs. Ansible vs. ...
CAPS: What's best for deploying and managing OpenStack? Chef vs. Ansible vs. ...
 
PVS-Studio in the Clouds: Travis CI
PVS-Studio in the Clouds: Travis CIPVS-Studio in the Clouds: Travis CI
PVS-Studio in the Clouds: Travis CI
 
Intro to Git for Drupal 7
Intro to Git for Drupal 7Intro to Git for Drupal 7
Intro to Git for Drupal 7
 
Calico with open stack and chef
Calico with open stack and chefCalico with open stack and chef
Calico with open stack and chef
 
Scalable QA With Docker
Scalable QA With DockerScalable QA With Docker
Scalable QA With Docker
 
Osrs
OsrsOsrs
Osrs
 

Andere mochten auch

Agile Networking with OpenStack
Agile Networking with OpenStack Agile Networking with OpenStack
Agile Networking with OpenStack openstackcisco
 
Account creation lab guide
Account creation lab guideAccount creation lab guide
Account creation lab guideopenstackcisco
 
The State of Oncology Innovation
The State of Oncology InnovationThe State of Oncology Innovation
The State of Oncology InnovationQuintilesIMS
 
IMS Health Clinical Trial Optimization Solutions
IMS Health Clinical Trial Optimization SolutionsIMS Health Clinical Trial Optimization Solutions
IMS Health Clinical Trial Optimization SolutionsQuintilesIMS
 
приоритетные направления деятельности школы
приоритетные направления деятельности школыприоритетные направления деятельности школы
приоритетные направления деятельности школыvoronan
 
педсовет
педсоветпедсовет
педсоветvoronan
 
презентация
презентацияпрезентация
презентацияvoronan
 
здоровьесберегающее обучение
здоровьесберегающее обучениездоровьесберегающее обучение
здоровьесберегающее обучениеvoronan
 
подростки и родители
подростки и родителиподростки и родители
подростки и родителиvoronan
 
критическое мышление
критическое мышлениекритическое мышление
критическое мышлениеvoronan
 
воронович
вороновичворонович
вороновичvoronan
 
методическое меропиятие
методическое меропиятиеметодическое меропиятие
методическое меропиятиеvoronan
 
педагогическая
педагогическаяпедагогическая
педагогическаяvoronan
 
русская народная тематика в курсе математики 5 класса
русская народная тематика в  курсе математики 5 классарусская народная тематика в  курсе математики 5 класса
русская народная тематика в курсе математики 5 классаvoronan
 
модель методической службы оу
модель методической службы оумодель методической службы оу
модель методической службы оуvoronan
 
методическое меропиятие
методическое меропиятиеметодическое меропиятие
методическое меропиятиеvoronan
 

Andere mochten auch (17)

Agile Networking with OpenStack
Agile Networking with OpenStack Agile Networking with OpenStack
Agile Networking with OpenStack
 
Account creation lab guide
Account creation lab guideAccount creation lab guide
Account creation lab guide
 
Devstack lab guide
Devstack lab guideDevstack lab guide
Devstack lab guide
 
The State of Oncology Innovation
The State of Oncology InnovationThe State of Oncology Innovation
The State of Oncology Innovation
 
IMS Health Clinical Trial Optimization Solutions
IMS Health Clinical Trial Optimization SolutionsIMS Health Clinical Trial Optimization Solutions
IMS Health Clinical Trial Optimization Solutions
 
приоритетные направления деятельности школы
приоритетные направления деятельности школыприоритетные направления деятельности школы
приоритетные направления деятельности школы
 
педсовет
педсоветпедсовет
педсовет
 
презентация
презентацияпрезентация
презентация
 
здоровьесберегающее обучение
здоровьесберегающее обучениездоровьесберегающее обучение
здоровьесберегающее обучение
 
подростки и родители
подростки и родителиподростки и родители
подростки и родители
 
критическое мышление
критическое мышлениекритическое мышление
критическое мышление
 
воронович
вороновичворонович
воронович
 
методическое меропиятие
методическое меропиятиеметодическое меропиятие
методическое меропиятие
 
педагогическая
педагогическаяпедагогическая
педагогическая
 
русская народная тематика в курсе математики 5 класса
русская народная тематика в  курсе математики 5 классарусская народная тематика в  курсе математики 5 класса
русская народная тематика в курсе математики 5 класса
 
модель методической службы оу
модель методической службы оумодель методической службы оу
модель методической службы оу
 
методическое меропиятие
методическое меропиятиеметодическое меропиятие
методическое меропиятие
 

Ähnlich wie Amending and Testing changes lab guide

Openstack contribution process
Openstack contribution processOpenstack contribution process
Openstack contribution processSyed Armani
 
OpenStack Contribution Process
OpenStack Contribution ProcessOpenStack Contribution Process
OpenStack Contribution Processopenstackindia
 
Version control git day01
Version control   git day01Version control   git day01
Version control git day01Gourav Varma
 
Version control git day01
Version control   git day01Version control   git day01
Version control git day01Gourav Varma
 
Version control with git
Version control with gitVersion control with git
Version control with gitPurav Gandhi
 
Assign, commit, and review - A developer’s guide to OpenStack contribution-20...
Assign, commit, and review - A developer’s guide to OpenStack contribution-20...Assign, commit, and review - A developer’s guide to OpenStack contribution-20...
Assign, commit, and review - A developer’s guide to OpenStack contribution-20...OpenCity Community
 
Assign, Commit, and Review
Assign, Commit, and ReviewAssign, Commit, and Review
Assign, Commit, and ReviewZhongyue Luo
 
Version Uncontrolled - How to Manage Your Version Control (whitepaper)
Version Uncontrolled - How to Manage Your Version Control (whitepaper)Version Uncontrolled - How to Manage Your Version Control (whitepaper)
Version Uncontrolled - How to Manage Your Version Control (whitepaper)Revelation Technologies
 
Git 101, or, how to sanely manage your Koha customizations
Git 101, or, how to sanely manage your Koha customizationsGit 101, or, how to sanely manage your Koha customizations
Git 101, or, how to sanely manage your Koha customizationsIan Walls
 
Checkitmobile - using Git for development
Checkitmobile - using Git for developmentCheckitmobile - using Git for development
Checkitmobile - using Git for developmentGerrit Wanderer
 
Dreamforce 13 developer session: Git for Force.com developers
Dreamforce 13 developer session: Git for Force.com developersDreamforce 13 developer session: Git for Force.com developers
Dreamforce 13 developer session: Git for Force.com developersJohn Stevenson
 
Introduction to Git for Force.com Developers
Introduction to Git for Force.com DevelopersIntroduction to Git for Force.com Developers
Introduction to Git for Force.com DevelopersSalesforce Developers
 
Git essential training & sharing self
Git essential training & sharing selfGit essential training & sharing self
Git essential training & sharing selfChen-Tien Tsai
 
Version control git - lecture-1
Version control git - lecture-1Version control git - lecture-1
Version control git - lecture-1Abdul Rahim
 
Git tutorial
Git tutorialGit tutorial
Git tutorialmobaires
 
Introduction to GitHub, Open Source and Tech Article
Introduction to GitHub, Open Source and Tech ArticleIntroduction to GitHub, Open Source and Tech Article
Introduction to GitHub, Open Source and Tech ArticlePRIYATHAMDARISI
 
Analysis of merge requests in GitLab using PVS-Studio for C#
Analysis of merge requests in GitLab using PVS-Studio for C#Analysis of merge requests in GitLab using PVS-Studio for C#
Analysis of merge requests in GitLab using PVS-Studio for C#Andrey Karpov
 

Ähnlich wie Amending and Testing changes lab guide (20)

Openstack contribution process
Openstack contribution processOpenstack contribution process
Openstack contribution process
 
OpenStack Contribution Process
OpenStack Contribution ProcessOpenStack Contribution Process
OpenStack Contribution Process
 
Version control git day01
Version control   git day01Version control   git day01
Version control git day01
 
Version control git day01
Version control   git day01Version control   git day01
Version control git day01
 
Version control with git
Version control with gitVersion control with git
Version control with git
 
CodeShip
CodeShipCodeShip
CodeShip
 
Assign, commit, and review - A developer’s guide to OpenStack contribution-20...
Assign, commit, and review - A developer’s guide to OpenStack contribution-20...Assign, commit, and review - A developer’s guide to OpenStack contribution-20...
Assign, commit, and review - A developer’s guide to OpenStack contribution-20...
 
Git & GitLab
Git & GitLabGit & GitLab
Git & GitLab
 
Assign, Commit, and Review
Assign, Commit, and ReviewAssign, Commit, and Review
Assign, Commit, and Review
 
Version Uncontrolled - How to Manage Your Version Control (whitepaper)
Version Uncontrolled - How to Manage Your Version Control (whitepaper)Version Uncontrolled - How to Manage Your Version Control (whitepaper)
Version Uncontrolled - How to Manage Your Version Control (whitepaper)
 
Git 101, or, how to sanely manage your Koha customizations
Git 101, or, how to sanely manage your Koha customizationsGit 101, or, how to sanely manage your Koha customizations
Git 101, or, how to sanely manage your Koha customizations
 
Checkitmobile - using Git for development
Checkitmobile - using Git for developmentCheckitmobile - using Git for development
Checkitmobile - using Git for development
 
Dreamforce 13 developer session: Git for Force.com developers
Dreamforce 13 developer session: Git for Force.com developersDreamforce 13 developer session: Git for Force.com developers
Dreamforce 13 developer session: Git for Force.com developers
 
Introduction to Git for Force.com Developers
Introduction to Git for Force.com DevelopersIntroduction to Git for Force.com Developers
Introduction to Git for Force.com Developers
 
Git essential training & sharing self
Git essential training & sharing selfGit essential training & sharing self
Git essential training & sharing self
 
Git
GitGit
Git
 
Version control git - lecture-1
Version control git - lecture-1Version control git - lecture-1
Version control git - lecture-1
 
Git tutorial
Git tutorialGit tutorial
Git tutorial
 
Introduction to GitHub, Open Source and Tech Article
Introduction to GitHub, Open Source and Tech ArticleIntroduction to GitHub, Open Source and Tech Article
Introduction to GitHub, Open Source and Tech Article
 
Analysis of merge requests in GitLab using PVS-Studio for C#
Analysis of merge requests in GitLab using PVS-Studio for C#Analysis of merge requests in GitLab using PVS-Studio for C#
Analysis of merge requests in GitLab using PVS-Studio for C#
 

Kürzlich hochgeladen

Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Zilliz
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesrafiqahmad00786416
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024The Digital Insurer
 
Cyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdfCyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdfOverkill Security
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Jeffrey Haguewood
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Orbitshub
 
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKSpring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKJago de Vreede
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...apidays
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfOrbitshub
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDropbox
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...apidays
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Victor Rentea
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Angeliki Cooney
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MIND CTI
 

Kürzlich hochgeladen (20)

Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Cyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdfCyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdf
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKSpring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 

Amending and Testing changes lab guide

  • 1. Amending  and  Testing  OpenStack  Changes   Lab  Guide                                                                         Cisco  Live!  2015      
  • 2. Amending  Changes   ©  Cisco  and/or  its  affiliates.  All  rights  reserved.   2   Overall  Objectives     This  lab  will  guide  you  through  the  process  of  amending  OpenStack  potential  changes   during  acceptance  review  by  the  community,  and  will  also  show  some  examples  of  local   testing.     1. Submit  a  change  for  review   2. Review  the  change  with  a  -­‐1   3. Amend  the  change  to  fix  the  problems  pointed  out  in  review  and  to  resolve  merge   conflicts   4. Merge  the  change   5. Try  local  test  tooling      
  • 3. Amending  Changes   ©  Cisco  and/or  its  affiliates.  All  rights  reserved.   3   Submit  a  change  for  review     Log  into  your  Ubuntu  14.04  VM.  At  a  command  prompt,  make  a  new  directory  so  that  this   lab  will  be  independent  of  whatever  changes  were  made  in  prior  labs  and  clone  the   sandbox  code  into  it:     mkdir  amend_lab   cd  amend_lab   git  clone  git://git.openstack.org/openstack-­‐dev/sandbox     Then,  change  directories  to  the  sandbox  code  and  run  the  git  review  -­‐s  command  to   configure  it  for  submission  to  gerrit     cd  sandbox   git  review  -­‐s     Next,  make  a  new  branch,  and  make  changes  in  that  branch.  Be  sure  to  use  your  email   address  in  the  below  commands:     git  checkout  -­‐b  newbranch  origin/master   echo  “your@email.address”  >>  Changelog   git  add  Changelog   git  commit  -­‐m  "Added  file"   git  review     This  will  submit  the  changed  code  to  gerrit  for  automated  and  human  review,  and  will   return  a  URL  which  you  can  access  to  monitor  the  review  process.  A  successful  session  will   look  like:     $  git  review   remote:  Resolving  deltas:  100%  (1/1)   remote:  Processing  changes:  new:  1,  refs:  1,  done   remote:   remote:  New  Changes:   remote:      https://review.openstack.org/188988   remote:   To  ssh://openstax-­‐haxor@review.openstack.org:29418/openstack-­‐ dev/sandbox.git    *  [new  branch]            HEAD  -­‐>  refs/publish/master/newbranch   $   Review  submitted  changes      
  • 4. Amending  Changes   ©  Cisco  and/or  its  affiliates.  All  rights  reserved.   4   To  review  the  changes,  go  to  the  URL  returned  when  you  submitted  the  proposed  change   via  git  review.  Review  the  change  and  give  it  a  -­‐1  due  to  incomplete  commit  messages.        
  • 5. Amending  Changes   ©  Cisco  and/or  its  affiliates.  All  rights  reserved.   5           Amend  the  change  to  resolve     At  a  command  prompt  on  your  Ubuntu  14.04  VM,  run  the  command:     git  config  -­‐-­‐amend     This  will  pull  up  an  editor  in  which  you  can  put  a  new  commit  message.  Put  a  properly   structured  commit  message  this  time:       Now  submit  the  updated  code  for  re-­‐review:     git  review     In  review.openstack.org  you  should  now  see  that  your  proposed  change  has  a  second   revision  and  is  ready  to  be  re-­‐reviewed.  
  • 6. Amending  Changes   ©  Cisco  and/or  its  affiliates.  All  rights  reserved.   6       Review  the  change  again  and  if  no  other  problems  are  present,  vote  +2  and  merge  the   change.   Bonus:  Thinking  about  merge  conflicts     Depending  on  timing  of  submissions,  some  of  you  may  encounter  merge  conflicts  when  you   try  to  merge  your  Changelog  change.  Think  about  why  that  is?  Do  you  see  potential  for  that   happening  outside  of  the  lab  as  well?     One  of  the  following  approaches  may  help  you  overcome  this  obstacle.     For  trivial  rebasing  conflicts,  the  Rebase  button  in  review.openstack.org  may  resolve  the   merge  conflict.  
  • 7. Amending  Changes   ©  Cisco  and/or  its  affiliates.  All  rights  reserved.   7     For  more  complicated  conflicts  the  process  will  vary  but  will  likely  involve  git  rebase  on   your  local  command  line.  http://jjasghar.github.io/blog/2014/10/13/git-­‐rebase-­‐and-­‐git-­‐ detached-­‐head-­‐cheat-­‐sheet/  is  one  good  reference  with  examples.     Local  Testing     Most  OpenStack  projects  have  local  tests  which  should  be  run  prior  to  submitting  code  for   review.     You  can  run  static  analysis  tests  like  style  compliance  in  the  sandbox.  To  try  flake8,  install   and  run  it     sudo  apt-­‐get  install  flake8   flake8  test.py     You  can  also  run  unit  and  integration  tests  though  those  aren’t  included  with  the  sandbox   test  environment.  To  see  some  of  those  you  can  download  one  of  the  larger  projects  and   start  to  look  at  the  testing  included  with  it:     cd   sudo  apt-­‐get  install  python-­‐pip  python-­‐dev  libffi-­‐dev     sudo  apt-­‐get  install  libssl-­‐dev  libldap2-­‐dev  libsasl2-­‐dev   sudo  apt-­‐get  install  libxml2-­‐dev  libxslt-­‐dev   sudo  pip  install  tox   git  clone  git://git.openstack.org/openstack/keystone   cd  keystone   tox  –e  py27     Note:  most  projects  use  tox  as  the  test  framework.  Specifics  will  vary  by  project  and  will   likely  require  additional  dependencies  be  installed  beyond  those  listed.