View
49
Download
2
Category
Preview:
Citation preview
Automate qualityjust like you automate servers
Benoît PECCATTE
bpe@normation.com
Normation – Tous droits réservésCONFIDENTIELnormation.com
When you have to, create your tool
Normation – Tous droits réservésCONFIDENTIELnormation.com
Automate quality
A bad workman blames his tools
Normation – Tous droits réservésCONFIDENTIELnormation.com
Automate quality
A good workman polishes his tools
Normation – Tous droits réservésCONFIDENTIELnormation.com
Automate quality
A good workman polishes his tools
→ The right tool for the right job→ Specific tool for specific job→ Each company process is specific
Normation – Tous droits réservésCONFIDENTIELnormation.com
Automate quality
Tool benefits is not measured in dollars
→free mind→free time→complex things become simple→process is always followed→process can evolve more easily→newcomers can embark quickly
Normation – Tous droits réservésCONFIDENTIELnormation.com
Automate quality
Writing costs
Normation – Tous droits réservésCONFIDENTIELnormation.com
Automate quality
Real writing costs
Implementation cost (days)
Time won per task
Persons using it
Days per year Time won (days)
1 1 min 4 200 1
10 10 min 4 200 10
1 20s 12 200 1
Normation – Tous droits réservésCONFIDENTIELnormation.com
Automate quality
Writing cost
A word about context switch
Normation – Tous droits réservésCONFIDENTIELnormation.com
Context switch
funny cat
Normation – Tous droits réservésCONFIDENTIELnormation.com
Automate quality
Writing cost
A word about context switch
Normation – Tous droits réservésCONFIDENTIELnormation.com
Automate quality
You can do it now
1. Have APIs2. Call those API for the task you do the most3. Find source of information to automatically fill parameters to this APIs4. Update your process5. Rinse and repeat
Normation – Tous droits réservésCONFIDENTIELnormation.com
Automate quality
I got a tool used by everyone
→We added tasks to the process without bothering anyone
Normation – Tous droits réservésCONFIDENTIELnormation.com
Automate quality
Before:
- open an issue (in your browser)- check that no one else is working on it- look for the target version, branch and status- checkout your repo- create a new branch with a name based on the issue fields
- Code !
- add files- commit with a comment containing the issue title and ID - push to your repo- create a pull request with a meaningful title based on you code and the right branch- add the PR url to the issue- assign the issue to a reviewer and change the status
Hope that we are done with the review
10 tasks – code – 10 tasks – done
After:
rudder-dev <issue_id>
Code
rudder-dev <reviewer_id>
Done
There is even a shorter version for quick fixes:
Patch – rudder-dev quickfix – done
Normation – Tous droits réservésCONFIDENTIELnormation.com
Automate quality
After:
- rudder-dev <issue-id>
- Code !
- add files
- rudder-dev <reviewer>
Be happy to follow the review process
Normation – Tous droits réservésCONFIDENTIELnormation.com
Automate quality
Other commands: rudder-dev blame
$ rudder-dev blame agent-run
Blaming file agent-run $ git blame -s -w --abbrev=6 agent-run
8088292 F #5791 1) #!/bin/sh8088292 F #5791 2) # @description force run agent promises29c7bc5 F #6659 3) # @man This command will force the agent to enforce current policies.29c7bc5 F #6659 4) # @man You can run *rudder agent update* before to update the promises.4945a30 F #6731 5) # @man +4945a30 F #6731 6) # @man *Options*:4945a30 F #6731 7) # @man +90002b4 F #7824 8) # @man *-u*: update policy before running the agent (default is to run existing policy)
Normation – Tous droits réservésCONFIDENTIELnormation.com
Automate quality
Other commands: rudder-dev quickfix
● Edit a file in a committed repo
● rudder-dev quickfix “there was an issue”
→ A bug is opened with the title
→ A PR is created with the content of the diff
→ done
Normation – Tous droits réservésCONFIDENTIELnormation.com
Automate quality
Other commands: rudder-dev subtask
An error in your last PR, call rudder-dev subtask !
→ a properly categorized bug is created and linked to the original issue
→ a branch is then based on this ticket
→ just work on it
Normation – Tous droits réservésCONFIDENTIELnormation.com
Automate quality
Other commands: rudder-dev revert
A problem has been discovered with a specific PR ?
Call rudder-dev revert
→ it find the commit associated with PR
→ it reverts it
→ it updates the ticket
Normation – Tous droits réservésCONFIDENTIELnormation.com
Opensource
https://github.com/Normation/rudder-tools/tree/master/scripts/rudder-dev
Normation – Tous droits réservésCONFIDENTIELnormation.com
What next ?
Automate reviews
Normation – Tous droits réservésCONFIDENTIELnormation.com
Normation – 87 rue de Turbigo, 75003 PARIS, France – Normation – 87 rue de Turbigo, 75003 PARIS, France – contact@normation.comcontact@normation.com – 01.83.62.26.96 – – 01.83.62.26.96 – http://www.normation.com/http://www.normation.com/
Automate qualityjust like you automate servers
Benoît PECCATTE
bpe@normation.com
Recommended