Tuning Github for SPL development Branching models and operations for product engineers Oscar Díaz...

Post on 04-Jan-2016

214 views 0 download

Transcript of Tuning Github for SPL development Branching models and operations for product engineers Oscar Díaz...

Tuning Github for SPL development

Branching models and operations for product engineers

Oscar DíazUniversity of the Basque Country

ONEKIN Research GroupSan Sebastian, Spain

Leticia MontalvilloUniversity of the Basque Country

ONEKIN Research GroupSan Sebastian, Spain

SPLC’15 Nashville 2015, TN

Onekin Reserch Group 2

SPL SettingEvolving SPLsFeature-Oriented SPLs

Onekin Research Group 3

SPL Scope of reuse

Deestral&Bosch2005: Product Derivation in Software Product Families: A Case Study

Onekin Reserch Group 4

Domain engineering development

Feature-Oriented SPLsFeature implementation =

Onekin Reserch Group 5

Application engineering development

1. Get initial feature configuration

2. Customization

3. Assemble

Customized core asset

Brand newasset

Onekin Reserch Group 6

It looks like two kinds of repositories exist

1 Core_Asset_Repository + N Product_Repository

Onekin Research Group 7

Where do we keep the assets?

VCSs

Onekin Reserch Group 8

Github highlights

More than 10 million of users

More than 24 million of repositories

Web-based Git Repository hosting service

Popular for collaborative development

"GitHub Press Info". github.com. Github. Retrieved 2015-07-23

Onekin Reserch Group 9

?A Look into a Github Repository

Repository Owner

Repository Name

User logged

Default branch

Source Code

Onekin Reserch Group 10

?A look into a Forked Repository

Cloned Source Code

All branches & commits

A link to the “original” repository

My account

Onekin Reserch Group 11

How do both repositories look like on Github?

Onekin Research Group 12

How does a core asset repository look like in Github?

Domain developer

Features implementation

Core asset repository name

Onekin Research Group 13

How does a Product Repository look like in Github?

Application developer Product repository name

Product assets

Onekin Reserch Group 14

The problemThe sync Challenge

Onekin Reserch Group 15

?Now, let’s have a show of hands …

Onekin Research Group 16

Should a product repository be obtained after a core asset repository?

Onekin Research Group 17

Should reusable core asset updates be propagated to existing products?

Onekin Research Group 18

Should product specific customizations be upgraded as core assets?

Onekin Research Group 19

If you answered “Yes” to any ….There is a sync challenge

Onekin Reserch Group 20

The problem: The Sync Challenge

The sync challenge implies to:

1. Create product repositories from core asset repositories along a feature configuration

2. Update product assets with newer versions available at core asset repository

3. Feedback product customizations from product repository to core asset repository

Onekin Reserch Group 21

Does Github support the sync challenge?

Fork & pull Request operate at high granularity. We want them at feature level

Fork Granularity: at repository level (branches and commit history) What if we only want a subset of the features?

Pull Requests Granularity: at branch level ( branches hold a project’s

snapshot) What if we only want the changes related to a given feature to

be propagated? What happens if my product is not reusing that feature?

Onekin Reserch Group 22

How can we tune Github to support engineers on the sync challenge?

Onekin Reserch Group 23

The solutionGitLine: a Firefox plug-in that extends Github functionality

Onekin Reserch Group 24

Github operations for the sync challenge3 OPERATIONS FOR PRODUCT ENGINEERS

1. Create product repositories from Core Asset repositories along a core asset configuration

PRODUCT FORK

2. Update product assets with newer versions from core asset repository

UPDATE PROPAGATION

3. Feedback product specific assets from product repositories to core asset repository

FEEDBACK PROPAGATION

Onekin Research Group 25

Product Fork operation

Product Fork ( User_Account X Core_Asset_Repository X Configuration_of_core_assets ) :: Product_Repository

Onekin Reserch Group 26

Product Fork: Accesing the Core Asset Repository

Onekin Reserch Group 27

Product Fork: Getting the feature configuration

Product Fork Update Propagation Feedback Propagation

Feature selection Configuration steps

Onekin Reserch Group 28

Behind the scenes …

… GitLine creates a new product repositoryinitialized only with the core assets of the selected features: deleting not wanted assets & branches & setting up the branching model for the user

Product Fork Update Propagation Feedback Propagation

Onekin Reserch Group 29

Product Fork: A new Product Repository

Product Fork Update Propagation Feedback Propagation

Onekin Research Group 30

Update Propagation Operation

Update Propagation ( User_Account X Core_Asset_Repository X Product_Repository):: Pull_Request

Onekin Reserch Group 31

Core Asset Repository has new updates

Product Fork

Update Propagation

Feedback Propagation

Onekin Reserch Group 32

Update Propagation: Enacting the operation

Onekin Reserch Group 33

Behind the scenes …

… GitLine is accessing the core asset repositoryand checks where there are newer feature versions that my product is reusing & brings them into a product’s repository dedicated branch

Product Fork

Update Propagation

Feedback Propagation

Onekin Reserch Group 34

Update Propagation pulling new versions of Core Assets

Onekin Reserch Group 35

Opening the update request: Diff view

Product Fork

Update Propagation

Feedback Propagation

Onekin Research Group 36

Feedback Propagation

Feedback Propagation ( User_Account X Product_Repository X customization_branch X Core_Asset_Repository ):: Pull_Request

Onekin Reserch Group 37

There is a new product specific asset

Product specific customizationWe want to feedback

Onekin Reserch Group 38

Selecting the product specific asset

Onekin Reserch Group 39

Behind the scenes …

… GitLine traverses the branch history to cherry-pick only the changes that occurred under that branch and propose them as feedback for a core asset repository feature.

Onekin Reserch Group 40

A new Feedback Pull Requestin the Core Asset Repository

Onekin Reserch Group 41

Opening the feedback request: Diff view

Product Fork Update Propagation

Feedback PropagationComparing PlayMovie Feature

Onekin Reserch Group 42

Almost reaching the end…

Onekin Reserch Group 43

What can you find in the paper?

Things I did not explained during the presentation:

A branching model for core asset repositories

A branching model for product repositories

The operational semantics for 3 sync repository operations

Onekin Reserch Group 44

A branching model for Core Asset Repository

4 main type of branches.Branch-per-purpose style

Onekin Reserch Group 45

What can you find in the paper?

Things I did not explained during the presentation:

A branching model for core asset repositories

A branching model for product repositories

The operational semantics for 3 sync repository operations

Onekin Reserch Group 46

A branching model for Product Repository

7 main type of branches.Branch-per-purpose style

Onekin Reserch Group 47

What can you find in the paper?

Things I did not explained during the presentation:

A branching model for core asset repositories

A branching model for product repositories

The operational semantics for 3 sync repository operations

Onekin Reserch Group 48

What can you find in the Web?

A realization of these operations as a Firefox plug-in: GitLine

GitLine is freely-available as a GitHub project

Onekin Reserch Group 49

https://github.com/letimome/GitLine

FORK & SEND PULL REQUEST

Onekin Reserch Group 50

http://letimome.github.io/GitLine

ASK FOR A LIVE DEMO!!

Onekin Reserch Group 51

Summary

ProblemSync DE & AE developments

ContributionBranching models for Core Asset & Product

RepositoryFormalization of three sync SPL operations

ValidationFeasibility: GitLine tool, Firefox plug-in for GitHub

Onekin Reserch Group 52

Limitations and future lines

Evaluation of the branching model & operations with practitioners

GitLine depends on Github

Provide GitLine with different composition mechanisms

53Onekin Reserch Group

@

Contact us,leticia.montalvillo@ehu.eus

Thanks for your attention!

Onekin Reserch Group 54

Extra to illustrate operations in action …

55

Product Fork Operation

Onekin Research Group

Onekin Research Group 56

Update Propagation

Enact update propagation…

Diff=

Onekin Research Group 57

Feedback Propagation

Onekin Research Group 57

Diff=

Enact Feedback…