automate quality just like you automate servers

23
Automate quality just like you automate servers Benoît PECCATTE [email protected]

Upload: normation

Post on 14-Feb-2017

49 views

Category:

Technology


2 download

TRANSCRIPT

Page 1: Automate quality just like you automate servers

Automate qualityjust like you automate servers

Benoît PECCATTE

[email protected]

Page 2: Automate quality just like you automate servers

Normation – Tous droits réservésCONFIDENTIELnormation.com

When you have to, create your tool

Page 3: Automate quality just like you automate servers

Normation – Tous droits réservésCONFIDENTIELnormation.com

Automate quality

A bad workman blames his tools

Page 4: Automate quality just like you automate servers

Normation – Tous droits réservésCONFIDENTIELnormation.com

Automate quality

A good workman polishes his tools

Page 5: Automate quality just like you automate servers

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

Page 6: Automate quality just like you automate servers

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

Page 7: Automate quality just like you automate servers

Normation – Tous droits réservésCONFIDENTIELnormation.com

Automate quality

Writing costs

Page 8: Automate quality just like you automate servers

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

Page 9: Automate quality just like you automate servers

Normation – Tous droits réservésCONFIDENTIELnormation.com

Automate quality

Writing cost

A word about context switch

Page 10: Automate quality just like you automate servers

Normation – Tous droits réservésCONFIDENTIELnormation.com

Context switch

funny cat

Page 11: Automate quality just like you automate servers

Normation – Tous droits réservésCONFIDENTIELnormation.com

Automate quality

Writing cost

A word about context switch

Page 12: Automate quality just like you automate servers

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

Page 13: Automate quality just like you automate servers

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

Page 14: Automate quality just like you automate servers

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

Page 15: Automate quality just like you automate servers

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

Page 16: Automate quality just like you automate servers

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)

Page 17: Automate quality just like you automate servers

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

Page 18: Automate quality just like you automate servers

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

Page 19: Automate quality just like you automate servers

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

Page 20: Automate quality just like you automate servers

Normation – Tous droits réservésCONFIDENTIELnormation.com

Opensource

https://github.com/Normation/rudder-tools/tree/master/scripts/rudder-dev

Page 21: Automate quality just like you automate servers

Normation – Tous droits réservésCONFIDENTIELnormation.com

What next ?

Automate reviews

Page 22: Automate quality just like you automate servers

Normation – Tous droits réservésCONFIDENTIELnormation.com

Page 23: Automate quality just like you automate servers

Normation – 87 rue de Turbigo, 75003 PARIS, France – Normation – 87 rue de Turbigo, 75003 PARIS, France – [email protected]@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

[email protected]