• No results found

Software Configuration Management

N/A
N/A
Protected

Academic year: 2021

Share "Software Configuration Management"

Copied!
21
0
0

Loading.... (view fulltext now)

Full text

(1)

Software Configuration

Management

1

Software Configuration Management

• Four aspects – Version control – Automated build – Change control – Release

• Supported by tools

(2)

Software products

• A product is a set of components/documents

– Code – Test suites

– Operation manuals (administrators, end-users) – Requirements

– Specifications

– Design documentation – Plans/schedules

3

Software products

• Need to keep track of how you created a product

– Rules for building the executable – Version of code

– Version of libraries – The compiler

– The operating system

• An SCM tool should be able to keep track of all of these (and more)

(3)

SCM

• Keep track of how software changes over time and be able to reproduce any version of the software

• Control how software changes -- make sure needed changes have been made and no improper changes have been made

5

Many versions

• Sequence of versions during development – Prototypes, daily (weekly) builds

– Alpha/beta release – Final release

• Different released versions – Linux - many versions

(4)

Merging versions

• During development, each subgroup works independently. How do they merge work?

• Customer using version 6.3.4 reports a bug that is then fixed. How do we apply this fix to our 27 later versions still being used?

7

Non-code resources

• Test suite for version 6.4.3 does not work for other versions. It is almost like the test suites for 6.4.2 and 6.4.4.

• Manual for version 6.4.3 is slightly different than for other versions.

• Design …

• Use cases ...

(5)

Change request

• We decided to implement a change.

– Has it been implemented fully? (tests, code, manuals, documentation)

– What parts of the system were affected by that change?

• I look at a program/document

– Why is it like this?

– When was it written, and by whom?

• Tracing both ways: change control and version control linked through IDs

9

Versions

3.2 3.3

3.2.1.2

mainline branch release

3.1

(6)

Branches

• Traditional advice for old version control:

– Avoid (long-lived) branches if possible

• Modern version control (Git, Hg…) – Encourage use of (short-lived) branches

• Good reasons to branch:

– Fixing bugs in customer version – Experimental version

– Political fights

11

Bad reasons to branch

• Support different hardware platforms

– Make subclasses / use conditional compilation / make portability library

• Support different customers

– Separate unchanged code from changed code – Unchanged code goes in a library

– Make subclasses / use conditional compilation for changed code

(7)

Normal Changes

• Programmer checks out code

• Changes made locally

• Changes tested locally

• Programmer checks in code

13

Simultaneous Changes

• How do we handle these?

(8)

Simultaneous Changes

Pessimistic view:

• Don’t Allow… use locking.

• Manual Merging

15

Simultaneous Changes

Optimistic view:

• Automatic Merging – Often works

– Sometimes cannot be done due to conflicts – Sometimes appears to work

(9)

SCM according to the SEI

• A discipline for controlling the evolution of software systems

• Has many aspects – Identification – Control

– Status accounting – Audit and review

17

Identification

• What are the configuration items? (I.e., what is under configuration management?)

• How do you name them?

• What is the relationship between items?

– Versions – Baseline

(10)

Versions

19

V3

V3.3.2 V3.1

V3.2

V3.3 V3.3.1

V3.1.1 V3.1.2

Baselines

• A baseline is a software configuration item that has been reviewed and agreed upon, and that can be changed only through formal change control procedures.

• Intermediate versions that haven’t been reviewed are SCIs but not baselines.

(11)

Releases

• A release is a software configuration item that the developers give to other people

• Releases should be baselines

21

Control

• Who is allowed to read/write configuration items?

• How do you know if changes are allowed/correct?

(12)

Status accounting

• Reporting the status of components and change requests

– Which components have changed this week?

– Which components did Bob change?

– Which components have the most changes?

– Which change requests are more than a month old and of priority 3 or greater?

23

Audit and review

• How do we know that the build script is OK?

• How do we know that only authorized people can change the database interface?

• Can we actually run the version from July 3, 2015?

(13)

Change control

• Change request/engineering change order – New feature

– Bug report

• Change control authority - decides which changes should be carried out

• Code changes should be linked to change requests

25

Bugzilla

Originally developed for Mozilla

http://bugzilla.mozilla.org

https://developer.mozilla.org/en-US/docs/Mozilla/QA/Bug_writing_guidelines

Bugzilla is a database for bugs. It lets people report bugs and assign these bugs to the appropriate developers. Developers can use

(14)

Bugzilla

• Each bug report has ID, name of reporter, description of bug, component, developer, dependency, attachments

• Status: unconfirmed, new, resolved, verified, closed

• Severity: blocker, critical, major, normal, minor, trivial, enhancement

27

Resolving a bug… Bug Statuses

FIXED

INVALID: not a bug, or not a bug in Mozilla WONTFIX : a bug that will never be fixed LATER: a bug that won’t be fixed now

REMIND: maybe now, maybe later DUPLICATE

WORKSFORME

(15)

Topics to ponder

• What are the dynamics of various groups using a change control system?

– Developers – Testers – Users – Managers

• What about security issues in Bugzilla or other change control systems?

29

Build management

• How do you build the product?

– Which compiler? Which flags? Which version?

– Which source files?

– Which libraries should be linked?

• Should build software be managed be placed

(16)

Building

• Building should be automatic

• Test build procedure - build regularly

• Need a tool (or tools)

– make - original Unix tool, 30 years old – ant - Java based, uses XML (used by JPF) – Hundreds more …

31

Build tool

• Knows components of system

• How to compile

• How to make final executable

• How to make debugging version

• How to delete temporary files

• How to test

• How to make manual

• …

(17)

Ant snippet

<target name="compile-jpf" depends="init, compile-app"

description="compile JPF core classes">

<javac srcdir="${src.dir}"

destdir="${build.jpf.dir}"

debug="${debug}"

source="1.5"

deprecation="${deprecation}">

<classpath>

<path refid="lib.path"/>

<pathelement path="${build.app.dir}"/>

</classpath>

</javac>

<copy file="default.properties" todir="${build.jpf.dir}/gov/nasa/jpf"/>

</target>

33

Daily build and smoke tests

• Ways to break the build process – Check in bad code

– Forget to include file in makefile – Move a library

• Every day (night?) build the latest version of product and run simple test suite

(18)

To make SCM work requires

• Bureaucracy

• Discipline/training

• Tools

– Version control – cvs, subversion, git…

– Change control – bugzilla, mantis…

– Building – make, ant…

35

SCM Manager

• Complex tools need experts to manage them

• An SCM expert will – Maintain tools

– Maintain configuration files, make branches – Do the merging

– Create policies on version control, change control

(19)

Alternatives

• Toolsmith supports SCM tools

• Architect defines configuration files

• Developers merge their code back into mainline

• Managers and technical leads define policies for version control and change control

37

“Software Configuration Management Patterns:

(20)

Various tests

• Smoke test

– Ensures that the system still runs after you make a change

• Unit test

– Ensures that a module is not broken after you make a change

• Regression test

– Ensures that existing code doesn’t get worse as you make other improvements

39

Developer issues

• Private Workspace

– Prevent integration issues from distracting you, and from your changes causing others problems, by developing in a Private Workspace.

• Private System Build

– Avoid breaking the build by doing a Private System Build before committing changes to the

Repository

(21)

Codeline Policy

• Active Development Line

• Release Line

– Holds bug fixes for a release

• Private Versions

• Task Branch

– Hide a disruptive task from the rest of the team

• Release Prep Codeline

41

Summary of SCM

• Four aspects – Version control – Change control – Building

– Releasing

• Supported by tools

References

Related documents

Certain subtests have range restrictions and a skewed distribution of scores in normals, caution should be exercised in attempting to interpret individual patient performance on

 Second phase: system analysis using DEMATEL method;  Third phase: selection of key environmental factors figure 1.. 3.1 First Phase:

Chapter 7 Employers and worker representatives’ perceptions regarding good practice health and safety measures for older workers (interview study)

Hypertension: Blood Pressure Measurement Percentage of patient visits for patients aged 18 years and older with a diagnosis of hypertension who have been seen for at least 2

Reveal Systems TrueForms Software Online Plug-in Version 4.6.0.23.. Below are the changes that have been made to the TrueForms IE add-on

The Asian Development Bank (ADB) established the Asia Pacific Project Preparation Facility (AP3F) in October 2014 to provide the additional resources and technical

The Campus Activities Program (CAP) must identify relevant and desirable student learning and development outcomes and provide programs and services that encourage the achievement

Hierro Níquel / Negro En cajas de cartón de 2 gruesas Nickel-plated or black steel In cardboard boxes containing 2 gross En acier nickelé ou noir. En boîtes de carton contenant