AtlasCamp 2014: Stash State of the Union

39
Jason Hinch, Full-stack Developer, Atlassian Stash State of the Union

description

Over the last year, Stash added new features at a rapid pace, and thousands of new customers embraced Stash for behind-the-firewall Git repository management. There is still a massive opportunity for developers to build add-ons to extend Stash further. Full stack developer Jason Hinch will take you through the latest and greatest from the Stash development team, the main plugin points for extending Stash, and a new Stash API coming later this year.

Transcript of AtlasCamp 2014: Stash State of the Union

Page 1: AtlasCamp 2014: Stash State of the Union

Jason Hinch, Full-stack Developer, Atlassian

Stash State of the Union

Page 2: AtlasCamp 2014: Stash State of the Union

ECOSYSTEM HEALTH

Agenda

QUESTIONS

NEXT 12 MONTHS

PLUGIN POINTS

Page 3: AtlasCamp 2014: Stash State of the Union

Agenda

QUESTIONS

NEXT 12 MONTHS

PLUGIN POINTS

ECOSYSTEM HEALTH

Page 4: AtlasCamp 2014: Stash State of the Union
Page 5: AtlasCamp 2014: Stash State of the Union

• Team

• 20+ developers

• Customer base

• 2100+ customers

• Releases

• 3 major, 15 minor, 59 bug fix

Stash is growing

Page 6: AtlasCamp 2014: Stash State of the Union

• Empower our ecosystem

• Stable API for major versions

• Java API

• REST API

• Developer docs

Committed to plugins

Page 7: AtlasCamp 2014: Stash State of the Union
Page 8: AtlasCamp 2014: Stash State of the Union

As of May 2014

86Stash Add-Ons on Marketplace

Page 9: AtlasCamp 2014: Stash State of the Union

• 9000+ downloads

• Commercial add-on

• Charts for repository stats

• Commit & line activity

• Contributors

Awesome Graphs

Page 10: AtlasCamp 2014: Stash State of the Union

• 3000+ downloads

• Commercial add-on

• Powered by SubGit

• SVN migration

• Incremental

• Once time import

Svn Mirror for Stash

Page 11: AtlasCamp 2014: Stash State of the Union

• 10-15 free add-ons

• Experiment with features

• Keep Stash lean

• Validate our plugin points

Add-ons by Atlassian

Page 12: AtlasCamp 2014: Stash State of the Union

ECOSYSTEM HEALTH

PLUGIN POINTS

Agenda

QUESTIONS

NEXT 12 MONTHS

Page 13: AtlasCamp 2014: Stash State of the Union

• Servlets

• Web Fragments

• Web panels

• Web items

• Web section

• Page decorators

• LESS css

• Soy templates

• Atlassian UI (AUI)

Built on the Atlassian Platform

Page 14: AtlasCamp 2014: Stash State of the Union

Repository Hooks

Page 15: AtlasCamp 2014: Stash State of the Union

• Pre-receive

• Post-receive

• Pull request merge

• Per repositoryconfiguration

• Since Stash 2.1

Repository Hooks

Page 16: AtlasCamp 2014: Stash State of the Union

atlassian-plugin.xml

Implementation

Soy template

Soy files

Page 17: AtlasCamp 2014: Stash State of the Union

NamingConventionHook.java

Page 18: AtlasCamp 2014: Stash State of the Union

NamingConventionHook.java

Page 19: AtlasCamp 2014: Stash State of the Union

NamingConventionHook.java

Page 20: AtlasCamp 2014: Stash State of the Union

static/config.soy

Existing values

Validation errors

Page 21: AtlasCamp 2014: Stash State of the Union

Cancelable Events

Page 22: AtlasCamp 2014: Stash State of the Union

• Implement CancelableEvent

• Correspond to modification request

• Prevent action from being performed

• Veto message sent back to UI

Cancelable Events

Page 23: AtlasCamp 2014: Stash State of the Union

• Pull requests

• Permissions

• Repositories

• Projects

What can be canceled

Page 24: AtlasCamp 2014: Stash State of the Union

MyListener.java

Page 25: AtlasCamp 2014: Stash State of the Union

File Handlers

Page 26: AtlasCamp 2014: Stash State of the Union

• Pluggable source rendering pipeline

• Take control any source and diff

• Selectively handle rendering

• Asynchronous by design (promise based)

File Handler

Page 27: AtlasCamp 2014: Stash State of the Union

atlassian-plugin.xml

Included whenrendering source

JS files

File handler registry

Page 28: AtlasCamp 2014: Stash State of the Union

stl-handler.js

Page 29: AtlasCamp 2014: Stash State of the Union
Page 30: AtlasCamp 2014: Stash State of the Union

PLUGIN POINTS

NEXT 12 MONTHS

ECOSYSTEM HEALTH

Agenda

QUESTIONS

Page 31: AtlasCamp 2014: Stash State of the Union

Stash Data Center

Page 32: AtlasCamp 2014: Stash State of the Union
Page 33: AtlasCamp 2014: Stash State of the Union

• Problem areas

• Caching / State

• Locking / State control

• Background tasks

• Shared technologies with JIRA/Confluence

• Atlassian Cache

• Atlassian Scheduler

• Atlassian Beehive

• How-to guides coming soon

Cluster-safety

Page 34: AtlasCamp 2014: Stash State of the Union

• Test Data

• Number of repositories

• Size of repositories

• Measure

• Execution time

• Memory consumption

• Concurrency

• Techniques

• Paging

• Limiting

• Streaming

• Documentation coming

Scaling for the enterprise

Page 35: AtlasCamp 2014: Stash State of the Union

Front-end API

Page 36: AtlasCamp 2014: Stash State of the Union

• JavaScript AMD modules

• Stable for major version

• Valid inputs will return same outputs

• Function names will remain the same

• Deprecation warnings

• Documented

JavaScript API

Page 37: AtlasCamp 2014: Stash State of the Union

• Standard LESS import

• Stable for major version

• Variable names (not value)

• Mix-in names (not output)

• Deprecation documented

• Release TBA

LESS API

Page 38: AtlasCamp 2014: Stash State of the Union

• Great opportunities

• Try writing a plugin for Stash

• Scale with Stash

• Give us feedback

Take aways

Page 39: AtlasCamp 2014: Stash State of the Union

NEXT 12 MONTHS

QUESTIONS

PLUGIN POINTS

ECOSYSTEM HEALTH

Question time