Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Landing code in curl

Daniel Stenberg takes us through the steps and shows and explains how easy it is to have your code contributions landed in curl.

  • Be the first to comment

  • Be the first to like this

Landing code in curl

  1. 1. DanielStenberg–August13th 2020 Landing code in
  2. 2. Daniel Stenberg @bagderhttps://daniel.haxx.se
  3. 3. Daniel Stenberg @bagder
  4. 4. CommunityCommunity BuildingBuilding TestingTesting SubmittingSubmitting FeedbackFeedback MergingMerging ReleaseRelease @bagder@bagder
  5. 5. Q&A in the end!Q&A in the end! @bagder@bagder
  6. 6. @bagder@bagder Lessons on how to code – you know that already URLs to the various resources – you can find them Discussions on what tools to use – use whatever you like This presentation will not include @bagder@bagder
  7. 7. @bagder@bagder 2,200 contributors – 200 new/year 820 authors – 100 new/year 15 active maintainers 30-50 in progress Pull-Requests in GitHub at all times You are not alone @bagder@bagder
  8. 8. @bagder@bagder Community & communication in curl The curl-library mailing list Questions, support, brainstorms, suggestions, ideas, debugging, roadmap, feedback Issues and Pull-Requests on GitHub Bugs and improvements #curl IRC channel on Freenode Chit chat - anything @bagder@bagder HackerOne Security problems
  9. 9. @bagder@bagder We’re nice to each other Code of Conduct @bagder@bagder
  10. 10. @bagder@bagder Clone the github git repository Since you’re going to change code, make your own fork Get the curl project’s code, not from anyone else hosting it Get the latest / master Get the curl code
  11. 11. @bagder@bagder Build the unmodified version first Verifies you have the infra setup accordingly Autotools (configure), cmake and Windows build systems are supported ‘make test’ Build curl @bagder@bagder
  12. 12. @bagder@bagder Most of the code is C89 Code style Documentation? Update or add tests? Change the curl code @bagder@bagder
  13. 13. @bagder@bagder ./configure --enable-debug make checksrc make test Test your curl code @bagder@bagder
  14. 14. @bagder@bagder Commit the change in a local git branch Gold points: follow the git message template Git push the commit(s) in your curl fork Commit and push the codeCommit and push the code @bagder@bagder
  15. 15. @bagder@bagder Submit your dedicated branch in a pull request to curl/curl Listen to feedback, amend the branch to adapt The PR will trigger a large amount of CI jobs, tests and analyzes Watch incoming CI job results, amend the branch to adapt It might take a while to get human response Create a Pull Request on curl @bagder@bagder
  16. 16. @bagder@bagder No CLA or form to sign to contribute code By submitting code, you are assumed to have the right to For a large change, you can add your copyright line Must not interfere with or be incompatible with license curl copyright and license @bagder@bagder
  17. 17. @bagder@bagder Each PR triggers 90+ builds Tests, sanitizers and analyses are run on many platforms with numerous setups and different configs Unfortunately, CI jobs sometimes fail as false positives Follow-up commits to the branch restarts the CI builds The curl CI system @bagder@bagder
  18. 18. @bagder@bagder Who reviews Pull Requests?Who reviews Pull Requests? Anyone can Everyone is encouraged to Maintainers tend to watch out for “their areas” Daniel most likely will @bagder@bagder
  19. 19. @bagder@bagder Who decides what’s a good new feature? It must beIt must be URL/transferURL/transfer relatedrelated It is aIt is a discussiondiscussion – argue for your point– argue for your point DanielDaniel has the final sayhas the final say Old decisions can beOld decisions can be brought backbrought back @bagder@bagder
  20. 20. @bagder@bagder If you disagree with a comment/remark: argue your case For small incremental changes, do a follow-up commit and push For larger changes, consider squashing commits and force- push a new take – to simplify the review process Did I mention ‘make checksrc’ ? Amend a Pull Request @bagder@bagder
  21. 21. @bagder@bagder Once all feedback and test failures are addressed Bug-fixes can get merged any at point in the release cycle Features can only get merged when the feature-window is open Someone will merge it with a “Closes #1234” GitHub instruction Merging a Pull Request into curl @bagder@bagder
  22. 22. @bagder@bagder The next PR will be easier! The first one is the hardestThe first one is the hardest The second time you know what to expectThe second time you know what to expect Consider reviewing other PRsConsider reviewing other PRs Help us improve docs for other first-timersHelp us improve docs for other first-timers @bagder@bagder
  23. 23. @bagder@bagder Everything is merged via PRsEverything is merged via PRs The same procedures and rules apply to everyone @bagder@bagder
  24. 24. @bagder@bagder All commits merged into the master branch At the time of the release There’s always another chance in the next release! We do releases every eight weeks Contents of a curl release @bagder@bagder
  25. 25. @bagder@bagder “scratch your own itch” Existing issues on GitHub KNOWN_BUGS and TODO Need ideas of what to work on? @bagder@bagder
  26. 26. @bagder@bagder We are all on the same team Ask when in doubt We love you for helping out and being one of us We want you to succeed! @bagder@bagder
  27. 27. Commercial curl support! @bagder@bagder
  28. 28. https://curl.haxx.se/dev/ https://github.com/curl/curl @bagder@bagder
  29. 29. Daniel Stenberg @bagder https://daniel.haxx.se/ Thank you!Thank you! Questions?Questions? @bagder@bagder
  30. 30. @bagder@bagder License This presentation and its contents are licensed under the Creative Commons Attribution 4.0 license: http://creativecommons.org/licenses/by/4.0/

×