Merken

The Butler and the Snake - Continuous Integration for Python

Zitierlink des Filmsegments
Embed Code

Automatisierte Medienanalyse

Beta
Erkannte Entitäten
Sprachtranskript
thank you and the load running my talk is about some estimates that about continuous integration you were about me I'm a Python web developers and so more than 10 years and the most of my professional and free time I spent on a project called well it's an open
source enterprise continents with system written in Python all we have around 340 for developers worldwide and local powers websites like Renaissance CIA and what's the Brazilian government and many more on and since around for years I am the leader of the clone continuous integration testing team so we make sure that our continent Integration systems work and that our testing it's in the take on so what's continuous
integration and I guess everybody heard that term at some point and it's In contrast to what many people think that is like software to just all of the continent's integration is actually a software development practice like test-driven development for answer to suffer development practice what is about to team members that integrate their work into a main branch of a version control system that frequently and the Justice integration or commits a portion of pushes or whatever is verified by an automated build and test process and may build a test process make sure that code violations test failures of boxes detected as early it's possible also reported so it's possible to developers but we all know that this it's those statistics box right that later you detect starts more tomorrow cost they cost right so it would affect parts only it very easy to to to track down and easier to fix on and 1 of the other of advantages big advantages over the integration system is that if you run your build and endocasts automatically on a continuous basis then you know that your development and multi deployment environment is and what state our so as I said at the there there are 3 important parts and continuous integration 1 is the 1st 1 is that you come into interact frequently interior on the control system that you have an automated build and test system and that to you report so keep those 3 items in in mind
because I will come back to that our 1st approach in in the planning community to continues integration was actually built part knows what Obama's quite you people so look what is the country's integration framework written in Python and we we had set up but it's it's quite complex but and as I said is more framework than than and out of the box solutions so you can't just like installed body will like do everything that you want you have to really know what you're doing and it's yeah it's hard to set up so we don't use that I mean if you are co-developers that use that but it wasn't really run on a continuous basis and was really integrated out into or out In control set up and nobody really as as the migrated developer you did not you notice on you by and abroad for years ago
in 2011 we we introduce taxes are what's now called Jenkins into our into Aura process and 1 of the developers who like so to play around with the Jenkins wrote that is like no but with with with the backing so unencumbered billboard Jenkins reality of oxygen you just and solid and you figure you have to compare it a bit but then it it basically works also that that was really nice also Jenkins comes with a with a nice user interface so everybody can just go there and like Texas status and stuff like that but the downside is is it's written in Java and as as applied to develop you you always for of course to use a beautiful Python software right but it's it's it's diversities language and it's a it's a very good this product in my opinion is has a huge open source community of rounded with many when movement plenty and so on it's backed by by company who offers commercial services on top of that cult copies and we are really really happy with it so I do my talk I will give you examples of what we do with with Jenkins of but is not very specific to to Jenkins so as a set of conditions integration as a result of the elements of a development practice so it's about the practice and the rules that you have right it's not about the the the software that actually choose so when we and moved from the bottom up some things look a bit better but
but we we use nightly builds I guess a lot of people doing that because you're you test take quite a while but and you don't want to run them on every commit for whatever reason and then you run them on a nightly basis right if everybody sleeps then you can just run them for a couple of hours or whatever it takes and next morning you will get a report to maintain the same those this is the list of of commits and now the the broken or it's fine
but the problem with that is that you don't run your built for each integration if you if you recall the definition that I gave you up front about continues integration the important part is that you run your build and test process for each committee because that's the only way to figure out which or which code change actually cost of regression right if you if you have 20 long commits from different people and next morning news will see later this is rather than somebody needs to clean it up and really the person is not the person who caused the violation so it's costly to do that right and nobody does that if you're a company you can
for somebody like a poor guy or girl to like fix the effects of stuff for other people but in open source communities in our because like the 20 Commissioners and people say opted wasn't the right might was really like clean and perfect so if you run them on a nightly basis to build was broken 99 % of the time that that's that's the least my my experience and so our software like development and release process and BOM community was like this to build was like a broken line represents the time and then before release already mentioned that a guy I want to make a release and then like 2 or 3 of the 340 developers the really hardcore guys started to like fixed tests for everybody else sometimes we had like 4 and the effect on test because we have around 9 thousand tests and 12 so people really we sat together like for a day or 2 and we really thinks like a couple of hundred bucks before we could even be main reason that we start to make our 300 releases and then our these magic make actually right so that's what it took so when we have those nightly builds and so how could we
unsolved and legal problem you can solve that by the following the rule that you have 1 build and test for committee so how do you do that by default Jenkins of use of his polling to pull the diversion control systems like you can set it to every 30 seconds or something and all that and if you commit is there it's great to build the problem with that is you you want fetch called you you will not get 1 build committee because it could be that some like 2 people committed at the same time then you have like to commit and believe me those 2 people will say it was the other I always so you have 1 committee and make sure that you have 1 built for that commit that with with today's when control system that's really easy because the gap has post mitosis if you if you hosted on GitHub or on your own you have your own data repository you can just create a gives a pos commit hope that actually triggers you your bank instances always that science and then you can have 1 builds up committed so you can trace the person or the committee that was responsible so it's really easy to figure out what what goes wrong find clone is a bit more complex than that because we have those 3 other packages and 1 checkout doesn't mean we have like the the exact same check out of all packages but I will like come to that later on and then what's important is that you preserve this commit information on through Europe contains integration pipeline so you pass it through the bills and also and so that you can idea notify people right by e-mail or anything else so we have those 3 steps commit build notified and
but in order to be able to automatically build and test yourself union automated build so we have the tools for that in the Python community right up until we use Buildout that's not widely used that as a community provokes folks users of but most people use people or easy install which also find you need you probably need to like red and rather than in into the into the batch files or anything like that but you can make you build right if you if you do that you can use talks for instance on the UCI systems to to configure what's wrong on on the sizes and and on on the Jenkins machine you can for instance the use of tools like shining and that's that's Jenkins plugin that allows you to create social and sort of build out and install things by automatically so it's just a convenient tool where you don't belong community because the best script is enough but if you want to do stuff with Python and you want a nice record than Chinese Penrose that is the right tool for adult
sociability yeah and should automatically all the also of course want to use that you want to run your test right because you want to make sure that the software actually works on a few spiders are lucky because you can just computer Python to to output the files that Jenkins can read out of the box jenkins this jealous of this would have of course an external interface but but with fighters it's really easy and I'm not sure about other Python test image we have collected it's test report which is the close of the wrapper all about the about the vol test right I won't bother you with that but and then you can presented those nice statistics about failing or passing tests and the same is true for a test coverage so you can use the coverage package and the Jenkins cobertura planning to actually show that to you so you have a nice interface and you also can so to project manager so he or she can can track your performance and see if the filter broken
but In order to make sure that you softer is not only in working state but also that's what it's supposed to do you use usually need acceptance tests right and I am a web developer so what what you usually do is you write letter tests and we we use that and upon community for long time but around 5 years ago we started with robot framework and that really gave us a boost account to acceptance testing a framework is a generic test framework but with multiple logins and 1 of those appliances Jenkins is sort is selected selection so you can write tests in this nice the DVD of syntax of human readable not not only by programmers and robot for Americans will run those tests and you have all the information necessary in Jenkins as well so you have a role from work of plug-in in Jenkins or or selling to plug in that that showed you all the nice outputs of robot from across the land in the cool thing about role of parameters that give you full traced back if you test failed you you it goes step by step through it and if it doesn't automatically some screenshot of the last word test actually failed and you have all that and myself with that it can access and and see what what fail right on and we are also using a salsa let's which is a software service that you can use to actually run your and robot from selected test on different versions of the offer you all the all the values that you could imagine on because you don't want to set up your own a Windows machine we tried do that those those services that cheap sorry 40 advertising or use any other service that uses the Internet itself we tried but
then what 1 thing that is that is especially important for Python because it's a dynamically typed languages static code analysis so you're able to to track possible but early I guess you're all familiar with with the you with the tools have a islands so we created a wrapper in the poem community around those tools called for balances to to have a best practice testable and you can use that without uphold but only with build up and you can prevent all those if you if you run those code analysis of a script you can resent them with into Jenkins violations plugin and gives you also nice statistics about all your violations not only for Python but also adjacent and all the more and stuff the assessment and it's all it's all pluggable into the violations like this can really really easily presenters of all the information that you have to to tear developers sought to program managers at every everybody
involved but then 1 of the things that is really important modification because people need to be informed as quickly as possible about regressions on and they're like many different ways you can do that and and Jenkins the best way or the way that the most widely used is by e-mail and there's an extended e-mail client for Jenkins that allows you to define rules half of which people you want to notify so you can say that the bill breaks that I want to notify like this this may and that on if the bill is still failing I want to do this and that of so users so you can really like to find all the all the rules that you want you if you have a lot organization you want to look at it will be the focus of putting up with without and it also comes comes with a plugin for for the top for instance or a bit but this is a new user authentication with that that's that's really nice that's cool thing about Jenkins that it has such a huge community does is that you have planned for everything but and you want all you also want to show that the current status to users so what you can use the data that will play and to have a nice dashboard or you can even build your custom front ends but it's all there you just have to choose and sold in the government we set up everything there just presented to you on and we ended up with
this still so why is that I mean we put lots of effort with a lot of people into and and we build it all like by the book and the bill was still broken what why's why's that right I mean there are 2 reasons actually 1 1 of the reasons is that in 4 clone is hard to have just 1 commits 1 build things because we have those 3 other packages and if you do a check out then it checks out those up to 300 packages and you can be sure that this all happens in a time frame before somebody else comes along right so that's pretty specific so I won't go into the detail but that's a problem as soon as you have like 2 people that should be responsible for something they will point to each other and say it was the other 1 right always the case and then like the the continuous integration testing the needs of cleanup and figure out what went wrong and after that you can like point those person and say was you but I have to clean up the stuff anyway but the 2nd thing that is not specific to to cloud is that people break the building they just don't care I mean is not because they're evil sometimes you you just want to do like a quick fix or anything 0 you commit anything that can possibly break anything right I just did that like 2 days ago and and look like a good friend of mine and just it took him like 2 or 3 hours to to fix my stuff because it wasn't obvious because to commit to really looks perfect and then wrote in the gets immediate temperament commit message that he wants to kill me I had just like all my fault because I was tired and I just went to bad instead of like waiting for a that so so it's not bad people but sometimes those things happened right and you break the mold maybe you don't check your e-mails or anything Bill takes the soul of around 40 minutes fossil-fuel break the build so how how do you prevent a prevent that but as a set like a couple of times before could use integration is the development of practice so what's what's he may be even more essential than they do goods and software that helps you with that is actually better practice that have
agreement on T and I think we gain a lot of experience with that because we have like those 3 and 40 core developers that directly from our last year's conference in Brazil so and we have over half a million lines of code we have over 300 but for packages so we have quite a complex software and why did she not developers so it's not like a company where can tell somebody to do things right so we need some agreement on the team how to like keep a green build fortunately so smart people
already thought about that I came up with a few countries integration of of rules of best practices that allowing you to keep rebuild are the most important 1 is do not check in on a broken it's the most what 1 is not do not break the build because that will not happen people will break the bill it's OK to break the built it's just important that you don't check in on a broken built because if the book is broken and somebody else comes in and sexy and then it these get content you get more test this and you can figure out which committee was responsible and then people will point and these are the was that I it wasn't me right and then things will become complex so what you should do it you break the build the team should stop the entire team should stop and start fixing to build because you have a real regression right itself not been working state and nobody can if they take this 1st rule of seriously so that you should stop and work on that sometimes it's not happen the best of working then it's also find it just revert to commit sometimes obvious what you can do to fix it and can just fix it but this should be a time frame within that we should fix the back within that time frame right because otherwise you will want to build but if you do that if you are a the stick with those rules so you can actually get build
most of the time like not 100 per cent of the time because people will still break the build this is what the CIA for right our test take quite a long time to run if you run them all not in parallel like would you want on the CI system but simple sequentially but then it takes more than 1 and a half hour to run all tests and you can expect everybody to run all the those test right so people to use the CI system to break it but but not for long and so if we go with the countries region wouldn't have our like of set up we have we have proved that our software is and what state all the time that is pretty cool for all developers because if developers do check out they know that the software works right before that the check it out wanted to fix something and they had like broken build so had to fix something else that's frustrating we could make faster releases because are is measured in had to ask the 2 and 3 are co-developers to like it's almost back for data because you can just make releases because are below the screen right so you can deploy many many times and just a
few remarks and about additional things that you scalability is is important and you should definitely if you have a lot of projects considered using of the server node set up for Jenkins which I think allows you to do and so you otherwise you're if you if you have a lot of jobs running in your Jenkins machine then you're you I will freeze because the server is busy so the red and the the nodes use provisioning there's nothing worse than a CI system that doesn't work reliably and base differently on the notes and you can use Jenkins port allocate applying to run things in parallel because this is what wanted it then if you use the
UCI system in place of the next step would be continuous delivery not the film consideration with continues indirectly automate your testing process in the integration process with continuous deployment the automated applying the ideas that you for deployment you just have to push a button more or less and automatically will like the plot right left companies directly states and Jenkins grew from a CI system 2 is actually a system that can do city as well but and we also started to work on that we're using that for instance to Python increases its also packaged into directories by hand stop and use that's reason it's really great piece of software you can use that for instance to make an releases all wheels releases 2 tests that actually your your opponent and on the deck inside the order of the planets since like half you called Jenkins workable point is really a game changer in in CI in my opinion it allows you to create real sophisticated of workflows within Jenkins to run a set steps in parallel or sequentially and notify people and it's incredibly flexible I already played around with it and we definitely don't plan to to moved to ontology start Jenkins I would like that we check it out it's it's really we also know that so to
summarize it shows the system and integrate frequently you have an automated build and test system for each integration and you report as soon as possible you can get build but like most of the time which gives you that proved that you have a softer and what is stated in deployed at any time you can ship software faster and better it's more fun for developers not frustrating for them because they they run into like test and Jenkins in the last 4 years has been great it's it's like you have 1 and for everything it's it's a great thing is something node is written in Java I so you use it but if you want to know
more about it countries in the region I highly recommend that but book on the left side called continues delivery from just humble David fairly they came up with the those continuous integration of rules but there's another book called continuous integration of from the same publisher I recommend to to buy this book because it has everything in
the communities integration chapter and that this is really great I have to at what to both of the birds and by this 1 you don't need the error on the right side this is a blogpost also lowered the euro's below where I wrote a blog post about our I set up with all the requirements that we used an old approaches so that's more in detail on if you have any
questions feel free to drop me on Twitter on higher CTR and are on my block the the slides are there and and thank you for which is usually the 1st time the 2 classes this is anyone who has a questions that you know your and things 1st I want to say that there was no specimen also also called it exam which can be interpreted by Jenkins and the spectrum your and my question is what do you do with flaky tests 2 with flaky tests to make the test test that sometimes sale you can't prevent yeah I mean that's that's that's hard to do what we usually try to do this and to to make them work reliably and if they don't work reliably we removed them because personally I don't think it makes sense to have a test that fails randomly because that doesn't give you any information at that the test those randomly it's time to use because it fails it gives gives no information in the past and give you no information so are we we try really hard to make it work reliably that's especially important for selected test because the underlying technology is fragile but you can make it work reliably Jenkins helped a lot with that because if you run things in parallel then you will see all kinds of effects that you don't see on your local machine but you have to make sure all when you run selection test that you did you the energy make sure that everything is there because the test kind of slow and fast and it's not easy to do but in my opinion is worth the effort to have like reliable test and and my question was that good you with the comment on on the whole and like developers step on each other's toes when you have so many repositories and developers selected doesn't happen often do you regret having spent the mode instead of having them in 1 of D you itself modules could you please comment on these things that's that's the the bigger question that we always ask it doesn't make any we we we split our that we had a big monolithic software block and was splitted onto multiple packages multiple multiple repositories and it's really great if you can as a developer like things can improve so packages without having to download everything right so that's that's a great thing and we don't want to lose that on the other hand we see the amount of work that is necessary and to release and keep track of all those multiple repositories and we haven't we solved that problem that you have 1 commit and 1 1 that we're close but we don't have it so it's a trade off in the end of it's it's hard to say I don't think that we will go back to 1 repository approach and but I can see the the advantages that you have yeah yeah that's yeah it's possible yes that's possible but then you useful to a check out and then you can be sure that's that as music we're using actually Mr. Developer which is a tool that checks out all the packages for you and make sure that you have the right branches pretty sophisticated pretty cool but is complex and we tried to store known sets of this so we have for all 3 packages restored the version numbers or the the the the commits hashes and stuff like that we try to make that producible by was just too complex who failed at that that just did not work the thank you very much you representation
Schätzwert
Softwaretest
Web Site
Open Source
Kontinuierliche Integration
Stellenring
Physikalisches System
Computeranimation
Integral
Last
Web-Designer
Projektive Ebene
Softwareentwickler
Unternehmensarchitektur
Klon <Mathematik>
Leistung <Physik>
Softwaretest
Statistik
Punkt
Prozess <Physik>
Quader
Kontinuierliche Integration
Versionsverwaltung
Verzweigendes Programm
Physikalisches System
Term
Framework <Informatik>
Code
Integral
Multiplikation
Software
Rechter Winkel
Basisvektor
Test-First-Ansatz
Regelkreis
Mereologie
Gamecontroller
Kontrast <Statistik>
Softwareentwickler
Programmierumgebung
Aggregatzustand
Resultante
Handzeichnung
Bit
Benutzeroberfläche
Prozess <Physik>
Open Source
Formale Sprache
Schlussregel
Element <Mathematik>
Biprodukt
Computeranimation
Integral
Dienst <Informatik>
Menge
Rechter Winkel
Software
Konditionszahl
Basisvektor
Minimum
Softwareentwickler
Verkehrsinformation
Softwaretest
Soundverarbeitung
Subtraktion
Prozess <Physik>
Open Source
Mathematisierung
Code
Integral
Software
Rechter Winkel
Lineare Regression
Basisvektor
Mereologie
Softwareentwickler
Gerade
Bit
Zwei
Plug in
Schlussregel
Physikalisches System
Elektronische Publikation
Computeranimation
Integral
Arithmetisches Mittel
Virtuelle Maschine
Datensatz
Rechter Winkel
Regelkreis
Skript <Programm>
Information
Stapelverarbeitung
Ordnung <Mathematik>
Repository <Informatik>
Default
E-Mail
Personal Area Network
Instantiierung
Klon <Mathematik>
Subtraktion
Programmiergerät
Quader
Versionsverwaltung
Automatische Handlungsplanung
Schreiben <Datenverarbeitung>
Abgeschlossene Menge
Computer
Login
Framework <Informatik>
Computeranimation
Internetworking
Virtuelle Maschine
Multiplikation
Softwaretest
Datenmanagement
Software
Trennschärfe <Statistik>
Bildschirmfenster
Wrapper <Programmierung>
Bildgebendes Verfahren
Schnittstelle
Funktion <Mathematik>
Roboter
Softwaretest
Parametersystem
Statistik
Spider <Programm>
Plug in
Elektronische Publikation
Quick-Sort
Roboter
Teilmenge
Generizität
Modallogik
Dienst <Informatik>
Rechter Winkel
Login
Web-Designer
Wort <Informatik>
Projektive Ebene
Information
Ordnung <Mathematik>
Verkehrsinformation
Aggregatzustand
Subtraktion
Bit
Pauli-Prinzip
Selbst organisierendes System
Formale Sprache
Besprechung/Interview
Extrempunkt
Kombinatorische Gruppentheorie
Analysis
Code
Hydrostatik
Client
Datenmanagement
Lineare Regression
Wrapper <Programmierung>
Skript <Programm>
Softwareentwickler
Maßerweiterung
E-Mail
Analysis
Statistik
Softwareentwicklung
Schlussregel
Fokalpunkt
Arithmetisch-logische Einheit
Summengleichung
Authentifikation
Information
Instantiierung
Punkt
Rahmenproblem
Gebäude <Mathematik>
Güte der Anpassung
Besprechung/Interview
Kontinuierliche Integration
Extrempunkt
Code
Integral
Data Mining
Software
Kontrollstruktur
Speicherabzug
Softwareentwickler
Figurierte Zahl
E-Mail
Gerade
Message-Passing
Klon <Mathematik>
Softwaretest
Rahmenproblem
Green-Funktion
Schlussregel
Physikalisches System
Computeranimation
Integral
Reelle Zahl
Rechter Winkel
Software
Lineare Regression
Vorlesung/Konferenz
Softwareentwickler
Parallele Schnittstelle
Aggregatzustand
Touchscreen
Server
Prozess <Physik>
Punkt
Automatische Handlungsplanung
Computeranimation
Virtuelle Maschine
Knotenmenge
Skalierbarkeit
Prozess <Informatik>
Software
Spieltheorie
Analytische Fortsetzung
Softwaretest
Addition
Ontologie <Wissensverarbeitung>
Plug in
sinc-Funktion
Plot <Graphische Darstellung>
Physikalisches System
Integral
Menge
Server
Projektive Ebene
Ordnung <Mathematik>
Verzeichnisdienst
Instantiierung
Aggregatzustand
Softwaretest
Knotenmenge
Software
Verweildauer
Applet
Kontinuierliche Integration
Schlussregel
Physikalisches System
Softwareentwickler
Computeranimation
Integral
Web log
Klasse <Mathematik>
Selbstrepräsentation
Versionsverwaltung
Zahlenbereich
E-Mail
Punktspektrum
Computeranimation
W3C-Standard
Metropolitan area network
Virtuelle Maschine
Multiplikation
Weg <Topologie>
Software
Trennschärfe <Statistik>
Gruppe <Mathematik>
Hash-Algorithmus
Softwareentwickler
Softwaretest
Soundverarbeitung
ATM
Dokumentenserver
Verzweigendes Programm
p-Block
Weltformel
Modul
Integral
Rechenschieber
Energiedichte
Ebene
Twitter <Softwareplattform>
Menge
Rechter Winkel
Information
Fehlermeldung

Metadaten

Formale Metadaten

Titel The Butler and the Snake - Continuous Integration for Python
Serientitel EuroPython 2015
Teil 20
Anzahl der Teile 173
Autor Stollenwerk, Timo
Lizenz CC-Namensnennung - keine kommerzielle Nutzung - Weitergabe unter gleichen Bedingungen 3.0 Unported:
Sie dürfen das Werk bzw. den Inhalt zu jedem legalen und nicht-kommerziellen Zweck nutzen, verändern und in unveränderter oder veränderter Form vervielfältigen, verbreiten und öffentlich zugänglich machen, sofern Sie den Namen des Autors/Rechteinhabers in der von ihm festgelegten Weise nennen und das Werk bzw. diesen Inhalt auch in veränderter Form nur unter den Bedingungen dieser Lizenz weitergeben
DOI 10.5446/20213
Herausgeber EuroPython
Erscheinungsjahr 2015
Sprache Englisch
Produktionsort Bilbao, Euskadi, Spain

Technische Metadaten

Dauer 27:50

Inhaltliche Metadaten

Fachgebiet Informatik
Abstract Timo Stollenwerk - The Butler and the Snake - Continuous Integration for Python Continuous Integration is a software development practice where members of a team integrate their work frequently, leading to multiple integrations per day. Each integration is verified by an automated process (including tests) to detect integration errors as quickly as possible. This talk will introduce the basic principles for building an effective Continuous Integration system for Python-based projects. It will present the lessons learned from building a Jenkins-based CI system for an Open Source project with a distributed team of more than 340 core developers that ranks among the top 2% of all open source projects worldwide (Plone).
Schlagwörter EuroPython Conference
EP 2015
EuroPython 2015

Ähnliche Filme

Loading...