Perforce Directory Standard PDS Doc Id PDSDiagrams pptx

  • Slides: 52
Download presentation
Perforce Directory Standard (PDS) Doc Id: PDS-Diagrams. pptx, v 5. 2 (October 18, 2013).

Perforce Directory Standard (PDS) Doc Id: PDS-Diagrams. pptx, v 5. 2 (October 18, 2013). Copyright © 2008 -2013, Perforce Software, Inc.

PDS Characteristics • Shared Global namespace within the enterprise • Common elements conveyed by

PDS Characteristics • Shared Global namespace within the enterprise • Common elements conveyed by directory structure (non-streams) or stream model: – Product Family or Business Unit Name – Product Name – Streams, conveying lifecycle info – Branch Container Directories • Even if Perforce deployment is initially small, presume it will permeate the enterprise when defining a PDS.

PDS Classic Components Product Family & Product Levels //Product. Family /Product Typically one or

PDS Classic Components Product Family & Product Levels //Product. Family /Product Typically one or two “organization” directory levels per depot, e. g. Product Family, Business Unit, etc. Permanent Streams & Branch Containers /live /svcs /main /rel /latest /int /custom /dev /Maj. min-[P|R|D|I] /exp /sb /demo (sandbox) Low Level Dirs /src /test /etc /doc These are samples only. Low level directory structure is outside the scope of an PDS.

PDS Streams Components Product Level – Stream Depot /Product Permanent Streams & Branch Containers

PDS Streams Components Product Level – Stream Depot /Product Permanent Streams & Branch Containers - Stream names /live /main /rel-* Low Level Dirs /src /doc /test

PDS Branching Patterns A relatively small set of best practice branching patterns result from

PDS Branching Patterns A relatively small set of best practice branching patterns result from a wide variety of development environments. Some Common Branching Patterns: ØBasic Maintenance ØAdvanced Maintenance ØPatch Maintenance ØOrganic Development ØBasic Planned Development ØAdvanced Planned Development ØCustomization ØBasic Hosted ØStandard Hosted with Emergency Bug Fix (EBF)

Branch Pattern Combinations svcs/Customer/main rel/2. 0. 01 -P rel/2. 0. 02 -P svcs/Customer/latest rel/2.

Branch Pattern Combinations svcs/Customer/main rel/2. 0. 01 -P rel/2. 0. 02 -P svcs/Customer/latest rel/2. 0. 03 -P rel/2. 0 -R rel/2. 0 -D /main dev/VS 2 K 8 dev/FGS 218 dev/64 Bit Organic Basic Planned Development + Basic Advanced Patch + Maintenance Basic Maintenance + Customization

Branch Patterns & Classic Directory Structures rel/2. 0 -R //fgs/rel/2. 0 -R/src/… /main //fgs/main/src/…

Branch Patterns & Classic Directory Structures rel/2. 0 -R //fgs/rel/2. 0 -R/src/… /main //fgs/main/src/… dev/VS 2 K 8 dev/FGS 218 //fgs/dev/VS 2 K 8/src/… //fgs/dev/64 Bit/src/… //fgs/dev/FGS 218/src/… dev/64 Bit Organic Basic Planned Development + Basic Advanced Patch + Maintenance Basic Maintenance + Customization

Branch Patterns & Streams Directory Structures 2. 0 -R //fgs/2. 0 -R/src/… main //fgs/main/src/…

Branch Patterns & Streams Directory Structures 2. 0 -R //fgs/2. 0 -R/src/… main //fgs/main/src/… FGS 218 VS 2 K 8 //fgs/VS 2 K 8/src/… //fgs/64 Bit/src/… //fgs/FGS 218/src/… 64 Bit Organic Basic Planned Development + Basic Advanced Patch + Maintenance Basic Maintenance + Customization

PDS Animated Samples On animated slides, the Smiley Face in the lower right corner

PDS Animated Samples On animated slides, the Smiley Face in the lower right corner appears to indicate when animations are done.

Organic Development To Do for 3. 1: //fgs/main/src/main. c#7 //fgs/main/api/hello. h#1 q New ü

Organic Development To Do for 3. 1: //fgs/main/src/main. c#7 //fgs/main/api/hello. h#1 q New ü New Feature 304: Add ‘Goodbye’ messages. //fgs/main/src/hello. c#4 //fgs/main/src/main. c#9 q Deprecate ü Deprecate Windows-specific API calls in in favor of of universal API calls. //fgs/main/src/makefile#18 //fgs/main/src/goodbye. c#2 q Support ü Support XML-style config file input. //fgs/main/src/api/hello. h#4 q Add ü Add HTML output format. //fgs/main/src/hello. c#28 //fgs/main/etc/greetings. cfg#4 q Add ü Add call to to test driver stubs//fgs/main/src/makefile#22 in in makefile. //fgs/main/etc/skins. cfg#124 //fgs/main/etc/greetings. cfg#43 //fgs/main/etc/version. c#3 3. 0 3. 1 /main Dev Test 3. 2 4. 0

Limitations of Organic Model Or Why Planned Dev? Organic Development Model Limitations: 1. Doesn’t

Limitations of Organic Model Or Why Planned Dev? Organic Development Model Limitations: 1. Doesn’t encourage a stable mainline. 2. Doesn’t scale well. 3. Inefficient – No parallel development. 4. Inflexible – Can’t easily pull feature sets from a release. 5. Not Agile.

Basic Maintenance //fgs/rel/4. 0 -R/src/main. c#5 Does this bug, initially 4. 0. 0 discovered

Basic Maintenance //fgs/rel/4. 0 -R/src/main. c#5 Does this bug, initially 4. 0. 0 discovered and fixed 4. 0. 1 in 4. 1 -R, rel/4. 0 -R//fgs/rel/4. 0 -R/src/hello. c#3 need to be back-ported to 4. 0 -R? The ideal way//fgs/rel/4. 1 -R/src/main. c#1 to make such a change, from the 4. 1. 0 rel/4. 1 -R //fgs/rel/4. 1 -R/src/hello. c#3 perspective of keeping the merge as simple as possible, is to initiate the change in the oldest //fgs/rel/5. 0 -R/src/main. c#2 //fgs/rel/5. 0 -R/src/master. c#1 appropriate release branch first, and then merge the rel/5. 0 -R //fgs/rel/5. 0 -R/src/hello. c#2 //fgs/rel/5. 0 -R/src/hi. c#1 change to all subsequent release branches, in order. 4. 0. 2 ? 4. 0. 3 4. 1. 1 Scenario #3 for 4. 0. 3: On occasions where a change deprecated, to exist in or refactored Change to code that the has need been for overhauled, Scenario #1 4. 0. 3: older branches discovered only after a change has “To Do” to the nthfor degree in 5. x. Do engine nothing! Or, add apropagates new to The Generation 3 isintegration seamlessly renames across Change to code that hasn’t changed much in 4. x or 5. x. Just Merge It. been made, back porting (merging from newer to consider impact in subsequent releases. branches. older release branches) is necessary. 4. 1 5. 0 4. 0 /main //fgs/main/src/master. c#4 //fgs/main/src/main. c#29 //fgs/main/src/hi. c#1 //fgs/main/src/hello. c#42 Scenario #2 for 4. 0. 3: Code moved/renamed in 5. 0; semantically similar.

Basic Maintenance (Streams) Note the older-tonewer flow. Streams communicates the change in flow.

Basic Maintenance (Streams) Note the older-tonewer flow. Streams communicates the change in flow.

Advanced Maintenance rel/8. 0 -R 8. 0. 0 //fgs/rel/8. 0 -R/src/master. c#59 //fgs/rel/8. 0

Advanced Maintenance rel/8. 0 -R 8. 0. 0 //fgs/rel/8. 0 -R/src/master. c#59 //fgs/rel/8. 0 -R/src/hi. c#29 8. 0. 2 8. 0. 1 8. 0. 3 rel/8. 0 -D Sample Emergency Bug Fix Criteria: § It is time-critical andcan’t wait for the next standard patch. § The entire code/build/test/push cycle will take 48 hours or less. //fgs/rel/8. 0 -D/src/master. c#8 § Litmus Test: If you’re willing to wake up a VP at 2 AM, it qualifies. //fgs/rel/8. 0 -D/src/hi. c#2 § Warning: AVOID Abusing EBF! If abused, the ability to make real emergency fixes diminshes, since the *-R won’t accurately match code used to ship the last patch. /main 8. 0 //fgs/main/src/master. c#59 //fgs/main/src/hi. c#29

Patch Maintenance 8. 0. 01 rel/8. 0. 01 -P rel/8. 0. 02 -P 8.

Patch Maintenance 8. 0. 01 rel/8. 0. 01 -P rel/8. 0. 02 -P 8. 0. 0 (GA) //fgs/rel/8. 0. 03 -P/src/master. c#1 //fgs/rel/8. 0 -03 -P/src/hi. c#2 8. 0. 02 rel/8. 0. 03 -P 8. 0. 03 rel/8. 0 -R //fgs/rel/8. 0 -R/src/master. c#3 //fgs/rel/8. 0 -R/src/hi. c#2 /main 8. 0 //fgs/main/src/master. c#59 //fgs/main/src/hi. c#29

Basic Planned Development rel/3. 1 -R 3. 1. 0 3. 1. 1 3. 1.

Basic Planned Development rel/3. 1 -R 3. 1. 0 3. 1. 1 3. 1. 2 rel/3. 2 -R 3. 0 /main “Sharable QA Pass To Do for 3. 2: Quality” q Add support for Java/C++ Bridge. To Do for 3. 1: q Feature Correct performance issue (BUG 429) q New 304: Add ‘Goodbye’ q Fix off-by-one index error. messages. q Add DHTML output format. q Deprecate Windows-specific API calls. q Fix exit codes in test file drivers. q Support XML-style config input. q Add HTML output format. q Add call to test driver stubs in makefile. To Do for 4. 0: q Allow 1: 1 and 1: n mappings in cfg files. q Fix “Black Screen of Death” (BUG 994) q Provide Optimized/Debug options. q Add limited SQL interface via API. q Fix exit codes in test drivers. QA Pass dev/3. 1 dev/4. 0 dev/3. 2

Merge Down, Copy Up Part 1: Merge Down • Merge files changed in one

Merge Down, Copy Up Part 1: Merge Down • Merge files changed in one branch with corresponding files in other branches. • Moves changes “down, ” from more firm to less firm branch. • Uses 'p 4 merge' and 'p 4 merge' commands. • Requires potentially complex merge work, and sometimes manual conflict resolution. • Perforce helps greatly to simplify this complex process.

Merge Down, Copy Up Part 1: Merge Down (Continued) • Can introduce instability in

Merge Down, Copy Up Part 1: Merge Down (Continued) • Can introduce instability in the target, less. • Best done by someone intimately familiar with: • The software and coding language, • Requirements for the change, • Insight to the history of changes, and • Awareness of business and technical drivers for those changes. • Is often done as a piecemeal operation, e. g. by subsystem or areas of subject matter expertise, or areas of code ownership/responsibility.

Merge Down, Copy Up Part 2: Copy Up (aka “Promotion”) • Promotes exact copies

Merge Down, Copy Up Part 2: Copy Up (aka “Promotion”) • Promotes exact copies of tested, trusted files to the next higher level. • Is an integration from a less stable to a more stable branch. • Requires no resolve (as it is a simple copy). • Uses the 'p 4 copy' command. • Can be performed as a wholesale operation by a centralized Configuration Management or Release Engineering team.

Merge Down, Copy Up Merge Down before Copy Up Or, Pull before Push

Merge Down, Copy Up Merge Down before Copy Up Or, Pull before Push

Selective Promotion Plan A: Strict Merge Down/Copy Up • Doesn’t rely on or trust

Selective Promotion Plan A: Strict Merge Down/Copy Up • Doesn’t rely on or trust human dependency knowledge. • Safe: Only fully tested configurations of files, latest or up to a point in time, are promoted. • Enforces a degree of process simplicity that can have collateral benefit. • Optimal when the used with narrow, modular architectures, and/or if human dependency awareness is low.

Selective Promotion Plan B: Selective Promotion • Relies on and trusts human dependency knowledge.

Selective Promotion Plan B: Selective Promotion • Relies on and trusts human dependency knowledge. • Allows promotion of configurations of files that never existed together at the same time. • Best used when human awareness of technical dependencies is high. • Sometimes necessary, albeit risky, with monolithic code bases.

Selective Promotion Anti-Patterns to Avoid! • Avoid selective promotion with overlapping files. • Avoid

Selective Promotion Anti-Patterns to Avoid! • Avoid selective promotion with overlapping files. • Avoid “Promote by Activity Status. ” • Distilling detailed code change data into activity status information is Good. • Driving code promotion based on activity status sounds Good, but rarely works or scales well.

Dev -> Stabilization -> Maintenance RC 1 RC 2 3. 1. 1 (Patch) rel/3.

Dev -> Stabilization -> Maintenance RC 1 RC 2 3. 1. 1 (Patch) rel/3. 1 -R Stabilization 3. 0 /main “Sharable Quality” 3. 1 dev/FGS 34 Early Dev Maintenance Dev Sample process and typical lifecycle phase transitions are illustrated here. While PDS is intended to promote best practices and good processes, it is not a Process Standard. Examples here are for illustration only. Phases Early Dev: Requirements in flux. Dev: Requirements locked. Normal development. Stabilization: Code complete, test coverage 85%, < 3 critical bugs, < 20 major. GA: Code complete. Test coverage 100%. No known critical or major bugs. < 20 minor bugs.

Advanced Planned Development /main Advanced Planned Releases: To Do for Feature Set 9. x-Perf:

Advanced Planned Development /main Advanced Planned Releases: To Do for Feature Set 9. x-Perf: 9. 0 9. 1 9. 2 § Just as OOqencourages Make “Hello, design World”before displaycoding, faster. APD encourages planning before //fgs/main/… q Fixcoding. I/O bottlenecks for large data sets on NTFS. § When planning, groupmax feature sets with considerations like: q Overcome file handle limitations on Windows. Reduce default ‘sleep’ values in Mac/OSX Startup. § Groupqtogether features that will heavily overlap code areas, q Reduce system startup delays; get boot time tofamiliar 45 s. based on technical requirements analysis by those with system architecture. //fgs/int/9. x-I/… int/9. x-I § Give Feature Sets. Toshort that. Set do 9. x-Bld: not imply release order. Do fortags Feature Add 64 bitbysupport for Linux. § Groupqfeatures categories such as: q Add 1024 bit support for Cray XMP 2020. § 9. x-Perf: Performance improvements q Standardize all makefiles on template compatible § 9. x-Enb: Enabling infrastructure (for future changes) with Common Build System. § 9. x-Port: Platform ports dev/9. x-FSA q Add call to test driver stubs in makefiles. § 9. x-Bld: Build system changes (no product functionality change) dev/9. x-Bld § 9. x-FSA: Required for 9. x-FSA: 9. x To Do forfeatures Feature Set § 9. x-FSB: Optional feature forin 9. x q Implement “Undo” Feature GUI. (may be retargeted) dev/9. x-Perf q Add undo_last() CLI. § 9. x-FSC: “Nice To in Haves” qtogether Add undo_last() code. with similar business drivers, § Group sets ofserver features //fgs/dev/9. x-Perf/… Add undo_last() in API. e. g. theqsame customer/sponsor.

Customization svcs/Cust. Tag //fgs/svcs/Navy/main/… latest //fgs/svcs/Navy/latest/… 3. 1. 0 rel/3. 1 -R //fgs/rel/3. 1

Customization svcs/Cust. Tag //fgs/svcs/Navy/main/… latest //fgs/svcs/Navy/latest/… 3. 1. 0 rel/3. 1 -R //fgs/rel/3. 1 -R/… rel/3. 2 -R //fgs/main/… /main 3. 1 3. 2 Customization has begun. Development Don’t forget –delivers each generic 3. 2 to product /main, and change creates made a generic should product be reviewed Sometimes, selective “cherry picking” integrations are performed Selective Promotions are used to integrate functionality from new release towhen determine branch iffor itthat needs it. originated to be integrated into the customization branch. changes as customizations are later deemed to releases to customization branches initially seeded with older releases. be generic software product improvements or bug fixes.

Basic Hosted live //fgs/live/… QA FAIL /main QA Pass //fgs/main/… Good for: v Relatively

Basic Hosted live //fgs/live/… QA FAIL /main QA Pass //fgs/main/… Good for: v Relatively stable/inactive hosted apps supported by very small teams. QA Pass

Standard Hosted live //fgs/live/… QA FAIL //fgs/main/… /main QA Pass latest //fgs/dev/latest/… Good for:

Standard Hosted live //fgs/live/… QA FAIL //fgs/main/… /main QA Pass latest //fgs/dev/latest/… Good for: v Hosted apps supported by larger teams. v Relatively stable/inactive apps, OR active apps where individual contributors have little or no overlap in terms of affected files. v Apps that work on one release at a time.

Standard Hosted w/EBF live /main //fgs/main/… //fgs/live/… QA Pass latest //fgs/dev/latest/… Good for: v

Standard Hosted w/EBF live /main //fgs/main/… //fgs/live/… QA Pass latest //fgs/dev/latest/… Good for: v Hosted apps supported by larger teams. v Relatively stable/inactive apps, OR active apps where individual contributors have little or no overlap in terms of affected files. v Apps that work on one release at a time. v Apps with potential for urgent/critical bug fixes.

Advanced Best Practice: Auto Merge 8. 5 -R (Patch Branch) 9. 0 -R (Patch

Advanced Best Practice: Auto Merge 8. 5 -R (Patch Branch) 9. 0 -R (Patch Branch) MAIN 9. 0 Human Change 8. 5 Automerge Features: v Frequent merging reduces merge complexity, often even for manual merges. v Preserves original human author through merge flow. v Reminder and Active modes. Auto-merging is an advanced practice; it requires custom automation.

Static PDS Samples Static slides for review and discussion

Static PDS Samples Static slides for review and discussion

Organic Development //fgs/main/src/main. c#7 //fgs/main/src/hello. c#4 //fgs/main/src/makefile#18 //fgs/main/src/api/hello. h#4 //fgs/main/etc/greetings. cfg#4 //fgs/main/etc/skins. cfg#124 3.

Organic Development //fgs/main/src/main. c#7 //fgs/main/src/hello. c#4 //fgs/main/src/makefile#18 //fgs/main/src/api/hello. h#4 //fgs/main/etc/greetings. cfg#4 //fgs/main/etc/skins. cfg#124 3. 0 3. 1 /main Dev Test 3. 2 4. 0

Organic Development (Streams)

Organic Development (Streams)

Basic Maintenance 4. 0. 0 rel/4. 0 -R 4. 0. 1 rel/4. 1 -R

Basic Maintenance 4. 0. 0 rel/4. 0 -R 4. 0. 1 rel/4. 1 -R 4. 0. 2 4. 1. 0 4. 1. 1 rel/5. 0 -R /main 4. 0 4. 1 5. 0 4. 0. 3

Basic Maintenance (Streams) Note the older-tonewer flow. Streams communicates the change in flow.

Basic Maintenance (Streams) Note the older-tonewer flow. Streams communicates the change in flow.

Advanced Maintenance 8. 0. 2 rel/8. 0 -R 8. 0. 0 8. 0. 1

Advanced Maintenance 8. 0. 2 rel/8. 0 -R 8. 0. 0 8. 0. 1 rel/8. 0 -D /main 8. 0. 3

Advanced Maintenance (Streams)

Advanced Maintenance (Streams)

Patch Maintenance 8. 0. 01 rel/8. 0. 01 -P rel/8. 0. 02 -P 8.

Patch Maintenance 8. 0. 01 rel/8. 0. 01 -P rel/8. 0. 02 -P 8. 0. 0 (GA) rel/8. 0 -R /main 8. 0. 02 rel/8. 0. 03 -P 8. 0. 03

Patch Maintenance (Streams)

Patch Maintenance (Streams)

Basic Planned Development rel/3. 1 -R 3. 1. 0 3. 1. 1 3. 1.

Basic Planned Development rel/3. 1 -R 3. 1. 0 3. 1. 1 3. 1. 2 rel/3. 2 -R 3. 0 /main “Sharable Quality” dev/3. 1 dev/4. 0 dev/3. 2

Basic Planned Development (Streams)

Basic Planned Development (Streams)

Advanced Planned Development 9. 0 /main 9. 1 //fgs/main/… int/9. x-I //fgs/int/9. x-I/… dev/9.

Advanced Planned Development 9. 0 /main 9. 1 //fgs/main/… int/9. x-I //fgs/int/9. x-I/… dev/9. x-FSA dev/9. x-Bld dev/9. x-Perf //fgs/dev/9. x-Perf/… 9. 2

Advanced Planned Development (Streams)

Advanced Planned Development (Streams)

Customization svcs/Cust. Tag //fgs/svcs/Navy/main/… latest 3. 1. 0 rel/3. 1 -R //fgs/rel/3. 1 -R/…

Customization svcs/Cust. Tag //fgs/svcs/Navy/main/… latest 3. 1. 0 rel/3. 1 -R //fgs/rel/3. 1 -R/… rel/3. 2 -R //fgs/main/… /main 3. 1 3. 2

Customization (Streams)

Customization (Streams)

Basic Hosted live //fgs/live/… QA FAIL /main QA Pass //fgs/main/… Good for: v Relatively

Basic Hosted live //fgs/live/… QA FAIL /main QA Pass //fgs/main/… Good for: v Relatively stable/inactive hosted apps supported by very small teams. QA Pass

Basic Hosted (Streams)

Basic Hosted (Streams)

Standard Hosted live //fgs/live/… QA FAIL //fgs/main/… /main QA Pass latest //fgs/dev/latest/… Good for:

Standard Hosted live //fgs/live/… QA FAIL //fgs/main/… /main QA Pass latest //fgs/dev/latest/… Good for: v Hosted apps supported by larger teams. v Relatively stable/inactive apps, OR active apps where individual contributors have little or no overlap in terms of affected files. v Apps that work on one release at a time.

Standard Hosted (Streams)

Standard Hosted (Streams)

Standard Hosted w/EBF live /main //fgs/main/… //fgs/live/… QA Pass latest //fgs/dev/latest/… Good for: v

Standard Hosted w/EBF live /main //fgs/main/… //fgs/live/… QA Pass latest //fgs/dev/latest/… Good for: v Hosted apps supported by larger teams. v Relatively stable/inactive apps, OR active apps where individual contributors have little or no overlap in terms of affected files. v Apps that work on one release at a time. v Apps with potential for urgent/critical bug fixes.

Standard Hosted w/EBF (Streams) Enable merge downs

Standard Hosted w/EBF (Streams) Enable merge downs

Questions?

Questions?