contributing to mesos: where to begin...someone who can commit the patch for you a mesos committer...

26
© 2015 Mesosphere, Inc. All Rights Reserved. 1 Contributing to Mesos: Where to Begin Joris Van Remoortere Michael Park

Upload: others

Post on 14-Aug-2020

2 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Contributing to Mesos: Where to Begin...Someone who can commit the patch for you A Mesos committer Validate failure scenarios Ensures project vision is maintained They’re people

© 2015 Mesosphere, Inc. All Rights Reserved. 1

Contributing to Mesos: Where to Begin

Joris Van RemoortereMichael Park

Page 2: Contributing to Mesos: Where to Begin...Someone who can commit the patch for you A Mesos committer Validate failure scenarios Ensures project vision is maintained They’re people

© 2015 Mesosphere, Inc. All Rights Reserved.

Moris! Patch for Maintenance

Primitives!

2

Yay! Shepherd?

Page 3: Contributing to Mesos: Where to Begin...Someone who can commit the patch for you A Mesos committer Validate failure scenarios Ensures project vision is maintained They’re people

© 2015 Mesosphere, Inc. All Rights Reserved. 3

You...? Review & Commit by

EOD?

Uh… ok? Maintenance what? Design doc?

Page 4: Contributing to Mesos: Where to Begin...Someone who can commit the patch for you A Mesos committer Validate failure scenarios Ensures project vision is maintained They’re people

© 2015 Mesosphere, Inc. All Rights Reserved. 4

Page 5: Contributing to Mesos: Where to Begin...Someone who can commit the patch for you A Mesos committer Validate failure scenarios Ensures project vision is maintained They’re people

© 2015 Mesosphere, Inc. All Rights Reserved. 5

Next Day...

Page 6: Contributing to Mesos: Where to Begin...Someone who can commit the patch for you A Mesos committer Validate failure scenarios Ensures project vision is maintained They’re people

© 2015 Mesosphere, Inc. All Rights Reserved. 6

JPark! Patch for Maintenance

Primitives! Cool! No shepherd yet? Biiig Feature!

Community Consensus… riiight?

Page 7: Contributing to Mesos: Where to Begin...Someone who can commit the patch for you A Mesos committer Validate failure scenarios Ensures project vision is maintained They’re people

© 2015 Mesosphere, Inc. All Rights Reserved. 7

Who should see patch? 1. Find Shepherd.2. Design Doc.3. Community Consensus.4. Patches.

Page 8: Contributing to Mesos: Where to Begin...Someone who can commit the patch for you A Mesos committer Validate failure scenarios Ensures project vision is maintained They’re people

© 2015 Mesosphere, Inc. All Rights Reserved. 8

But my patches work!?!

Let’s find a shepherd on the dev mailing list first :-)

Page 9: Contributing to Mesos: Where to Begin...Someone who can commit the patch for you A Mesos committer Validate failure scenarios Ensures project vision is maintained They’re people

© 2015 Mesosphere, Inc. All Rights Reserved. 9

Page 10: Contributing to Mesos: Where to Begin...Someone who can commit the patch for you A Mesos committer Validate failure scenarios Ensures project vision is maintained They’re people

© 2015 Mesosphere, Inc. All Rights Reserved. 10

Getting Started

Page 11: Contributing to Mesos: Where to Begin...Someone who can commit the patch for you A Mesos committer Validate failure scenarios Ensures project vision is maintained They’re people

© 2015 Mesosphere, Inc. All Rights Reserved. 11

● IRC (#mesos on freenode)● Mailing Lists (builds, commits, dev, issues, reviews, user)● JIRA● Reviewboard● Git

Tools

Page 12: Contributing to Mesos: Where to Begin...Someone who can commit the patch for you A Mesos committer Validate failure scenarios Ensures project vision is maintained They’re people

© 2015 Mesosphere, Inc. All Rights Reserved. 12

465 Tasks accepted in the Backlog column of Apache Mesos Agile Board

Look for tickets marked “newbie”

Participate in the conversations in IRC, mailing lists to gauge interest in tasks

Finding a Task

Page 13: Contributing to Mesos: Where to Begin...Someone who can commit the patch for you A Mesos committer Validate failure scenarios Ensures project vision is maintained They’re people

© 2015 Mesosphere, Inc. All Rights Reserved. 13

Large Features1. JIRA Ticket2. Design Document3. Community Consensus4. Patches

What’s Involved?

Small Features / Bug Fixes1. JIRA Ticket2. Record of Design Discussion /

Decision3. Patches

Trivial Changes1. Patches

Page 14: Contributing to Mesos: Where to Begin...Someone who can commit the patch for you A Mesos committer Validate failure scenarios Ensures project vision is maintained They’re people

© 2015 Mesosphere, Inc. All Rights Reserved. 14

Who’s Involved?

● Contributor (You!)● Reviewer● Shepherd

Page 15: Contributing to Mesos: Where to Begin...Someone who can commit the patch for you A Mesos committer Validate failure scenarios Ensures project vision is maintained They’re people

© 2015 Mesosphere, Inc. All Rights Reserved. 15

Reviewer: Who Are They?

Someone who can help you directly review the patches

● Typically, a senior contributor● There should be a design decision that the patch can be reviewed against● Assists in areas such as:

○ Adhering to the design decision○ Adhering to the Mesos coding style○ Sharing knowledge of existing libraries to simplify the code

Page 16: Contributing to Mesos: Where to Begin...Someone who can commit the patch for you A Mesos committer Validate failure scenarios Ensures project vision is maintained They’re people

© 2015 Mesosphere, Inc. All Rights Reserved. 16

Someone who can commit the patch for you

● A Mesos committer● Validate failure scenarios● Ensures project vision is maintained

They’re people too!Generally, an organization pays them to advance specific components of Mesos

Shepherd: Who Are They?

Page 17: Contributing to Mesos: Where to Begin...Someone who can commit the patch for you A Mesos committer Validate failure scenarios Ensures project vision is maintained They’re people

© 2015 Mesosphere, Inc. All Rights Reserved. 17

The list of Committers and Maintainers

Gauge by asking for a shepherd on the dev mailing list

Build a relationship/trust with a shepherd

● Ping them on IRC or Hangouts● Introduce yourself at a meetup/conference● Convince them that your work is aligned with their goals● Show history of driving tasks to completion and being responsive

Finding a Reviewer + Shepherd

Page 18: Contributing to Mesos: Where to Begin...Someone who can commit the patch for you A Mesos committer Validate failure scenarios Ensures project vision is maintained They’re people

© 2015 Mesosphere, Inc. All Rights Reserved. 18

Writing Patches

Page 19: Contributing to Mesos: Where to Begin...Someone who can commit the patch for you A Mesos committer Validate failure scenarios Ensures project vision is maintained They’re people

© 2015 Mesosphere, Inc. All Rights Reserved. 19

Preparation

An agreed-upon concrete design specification

Page 21: Contributing to Mesos: Where to Begin...Someone who can commit the patch for you A Mesos committer Validate failure scenarios Ensures project vision is maintained They’re people

© 2015 Mesosphere, Inc. All Rights Reserved. 21

Tests

Writing:

● googletest and googlemock● Documentation of intended behavior● Demonstrates correctness and reliability

Running:● make check -j <N>● make check -j <N> GTEST_FILTER=“MyFeatureTest.*”● GLOG_v=2 ./bin/mesos-tests.sh --verbose

For more information: ./bin/mesos-tests.sh --help

Page 22: Contributing to Mesos: Where to Begin...Someone who can commit the patch for you A Mesos committer Validate failure scenarios Ensures project vision is maintained They’re people

© 2015 Mesosphere, Inc. All Rights Reserved. 22

Submitting Patches

Page 23: Contributing to Mesos: Where to Begin...Someone who can commit the patch for you A Mesos committer Validate failure scenarios Ensures project vision is maintained They’re people

© 2015 Mesosphere, Inc. All Rights Reserved. 23

Preparation

Outline a clear context, motivation, and expected outcome of the patch

Page 24: Contributing to Mesos: Where to Begin...Someone who can commit the patch for you A Mesos committer Validate failure scenarios Ensures project vision is maintained They’re people

© 2015 Mesosphere, Inc. All Rights Reserved.

Get familiar with git interactive rebase: git rebase -i

Break up the commits into logical chunks: git add -p

Post the commits as individual patches: ./support/post-reviews.py

● Much easier to review

● Much easier to cherry-pick commits

● Separation of concern between behavioral change and code refactor

24

Posting Patches to ReviewBoard

Page 25: Contributing to Mesos: Where to Begin...Someone who can commit the patch for you A Mesos committer Validate failure scenarios Ensures project vision is maintained They’re people

© 2015 Mesosphere, Inc. All Rights Reserved.

● Don’t take it personally!● Broken rules are not an excuse to break them further (Broken windows theory)● On contentious issues, opt for consistency. Keep the scope of the review narrow

and file JIRA tickets to track changes proposed at the wider scope.

Remember, conflict is good for progress!

25

Addressing Comments

Page 26: Contributing to Mesos: Where to Begin...Someone who can commit the patch for you A Mesos committer Validate failure scenarios Ensures project vision is maintained They’re people

© 2015 Mesosphere, Inc. All Rights Reserved. 26

Summary

● Agree upon a concrete design before submitting patches● Try not to surprise the reviewers● Build a relationship and trust with reviewers (e.g. writing comprehensive tests)