Posts Tagged ‘AccuRev’

April Tour Updates

March 24th, 2010

SQE’s “Agile Comes to You” seminar tour has added new dates and locations for the month of April!  Due to great turnouts and positive feedback, AccuRev, Rally, AnthillPro and Coverity will continue their cross-country tour with upcoming stops in Colorado Springs and Minneapolis.

The half-day seminars are filled with Agile tools product demos, presentations from keynote speakers, Coverity, Rally, AccuRev and AnthillPro, and a question and answer session with a panel of Agile product experts.   Below is the panel from one of the most recent seminars in Seattle.

QA for 3 34 blog April Tour Updates

Attendees also learn about the new AgileCycle ALM suite of integrated software and services, designed to increase the speed and impact of Agile projects and enable Agile adoption.

Interested in Agile and want to check out AgileCycle? Join us in Colorado Springs on April 6th or in Minneapolis on April 7th.

April Tour Updates pic

Register here for Colorado Springs on April 6th.

Register here for Minneapolis on April 7th.

vim4accurev – New Release (v1.1)

October 2nd, 2009

I’m happy to announce that the latest official version of the AccuRev SCM plugin for Vim is now available!

Download release 1.1 here.

Major features include:

  • on-demand plugin enable/disable (aka Airplane Mode)
  • support annotate/blame
  • launching stream browser and graphical merge
  • ability to edit files and identify AccuRev workspace regardless of current working directory
  • updated docs

This version of the plugin requires Vim 7.x and supports AccuRev 4.6.x / 4.7.x.

Enjoy – dave

lg share en vim4accurev   New Release (v1.1)

Pattern for Floating Labels with Streams

September 1st, 2009

I’ve encountered a number of use cases in the field where people enjoy the use of  ‘floating’ labels.  Implemented correctly, floating labels are a good example of convention-over-configuration  usually eliminating repetitive, manual build system updates.   Implemented incorrectly, they can be a traceability curse.   In this writeup I’ll show two examples of how to implement a floating label pattern in AccuRev.

Deprecated Concept? If you’re used to using floating labels as ‘markers’ on a branch [in another CM system] for stable code or feature complete state, you’ll find that the AccuRev stream hierarchy and associated workflow is a much better solution – in some cases, eliminating the need for floating labels altogether.  In my experience, floating labels have been used because the traditional CM system didn’t support process – so you had to roll your own – ultimately leading to lots of scripting and a solution that doesn’t scale.

Stories of Misuse. Every now and then I hear stories about how an urgent quick fix or missing doc change -needed- to be included in the “release-4.0.1″ that just got labeled in source control a few days prior. In some traditional CM systems, you have the ability to commit new file changes, un-label the old version and re-label the new version. As easy as this sounds, this anti-pattern instantly breaks traceability [do your labels maintain history?] and can quickly lead to confusion as “release 4.0.1″ has multiple meanings depending on when the label was pulled, either before or after the re-label. Example. I once asked someone why they routinely re-label individual files and their answer was – “because creating a new full label takes about 30 minutes.”  Why so long? Because most CM systems label the individual files (or references) in a given configuration; the more files you have, the longer it will take to label the entire configuration.  I’ve even heard stories about creating labels (and branches!) that take upwards of an hour each run.  Unless you are using a time/txn-based CM system, labeling build events is required if you need to track and compare changes between builds over time.  If you are waiting 30-min per label, forget about the agile “10-minute” build – you haven’t even gotten to the compile step yet!

Valid Cases. In practice there are  cases where having a floating label makes sense, typically related to your build system.  Most cases have to do with marking transient build configurations.  For example, when doing nightly or continual integration builds, let the build script or CI server simply pull/poll a single label and let the developers or build engineer determine what content is bound to the label. This way, the build server can be “dumb” and just get whatever the developer or build engineer say it should have.  This eliminates the need to configure your build system with each-and-every new build label – especially painful for those build systems requiring manual edits of config xml files – ugh.

The Pattern.   Two examples are presented below showing how floating labels can be used to support continuous integration with streams.

Static Floating Label.  In this example, continuous builds are performed on the single stream App_Integration.  No need to change your CI configuration. New builds are kicked off whenever changes are  promoted [by team leads, etc] from the child project streams.

Static Floating Label
Static Floating Label

The CI/build tool is configured to monitor the single App_Integration stream.  As the configuration changes, the name of the build stream remains unchanged – hence, the App_Integration stream is the ‘floating label’.

When doing very-frequent builds (e.g. per-promote or even nightly) this pattern works well as long as you have the discipline to immediately fix any broken configurations.

Dynamic Floating Label.

In this example, individual build configurations for App_Integration are marked with snapshots.  New snapshots are created whenever changes are promoted [by team leads, etc] from child project  streams, or on schedule (e.g. Nightly).

Dynamic Floating Label
Dynamic Floating Label

The stream Int_Good_Build is dynamically reparented to either the latest snapshot (e.g. latest build) or reparented to an alternate (e.g. prior) snapshot representing the last known good build.  The ability to move this stream, on-demand and as needed, represents a dynamic ‘floating label’ pattern.  Simply reparent the stream, update the attached workspace and the files on disk will mirror the current release snapshot configuration.  The same pattern can be applied to production releases where internal snapshots capture detailed per-configuration changes, but the reparented floating label can represent the latest public release.

Summary. In all, I’m a big fan of creating snapshots for each build, and removing old[er] ones along the way.  There are two camps on the subject, and this will be left for another blog.  Thus, I like the visibility of knowning which snapshots have been created (implying a purpose), and having a ‘marker’ stream as a floating label (e.g. context) to identify the current build being tested and/or delivered to an Int or Test machine.   Lastly, having recent snapshots immediately available assist with debugging why the latest build is broken – diff by snapshot.  sweet.

/Happy Coding/ dave

Pattern for Versioning Generated Objects

May 5th, 2009

After building your software, do you check-in your generated binary  files? How about the output from test runs? If your software runs on multiple platforms or your test runs take hours/days to execute, you may want to consider storing the output — especially if binary reproducibility is critical.

Example. Consider shipping an application to a customer who 2 years later reports a defect. Can you reproduce their build “today”? Surely you have the exact versions of source files. But are you using the exact build file? Probably. How about the original version of the compiler? Maybe. But probably not. Don’t forget that your compilers get upgraded too — their optimization algorithms or bugfixes can change the binary execution format of your application. Thus, compiling source from 2 years ago may result in an equally functioning application at the user-level, but at the byte-level, things may have changed dramatically — and at a level where runtime defects (performance/memory) rear their ugly heads.

Myth #1: Committing generated  files results in longer checkout times. No developer wants to checkout source code and wait for or be inundated with megabytes of .o, .class, .jar, .war files that they are either never used or are going to be rebuilt anyway.  The AccuRev Truth: Use include/exclude rules on streams and workspaces to control which streams have access to generated objects and who will receive them during checkout.

Myth #2: Committing binary files slows down your CM system. Traditional SCM systems combine both meta data and content resulting in slower performance over time as the number of files increase (think labeling).  The AccuRev Truth: AccuRev stores meta-data separate from file contents and uses indexes to lookup and retrieve contents.  For example, transactions are labeled not files.  Using a card catalog (index lookup) to find your books is always faster than walking the isles (linear scan).

Myth #3: Storing generated artifacts will bloat the repository. Back in the day of wild-west coding, there was little rhyme or reason for where files were saved in the source tree.  The build system would simply compile the files it found, save the generated output right next to the source file, and as long as everything linked & compiled — it worked.  But in todays complex world of multi-layer software architectures, tiered deployments, mixed technologies, and sophisticated build tools, following a convention is almost a necessity (think  ruby on rails, maven, etc). The AccuRev Truth: Organizing the top-level source tree and configuring your build tool can make it very easy to carve out source vs. binary vs. tests vs. scripts, etc.  Using include/exclude rules, end-users can decide at the stream or workspace level what parts of the file tree need to be visible.

The Pattern. In this pattern for versioning generated artifacts, I’ll show how streams can be used to store generated files only in the appropriate stage of development and prevent unwanted exposure to developers.  Two options are present that can also be used in combination.

Option #1: sub-configurations

Option #1: sub-configurations

Option #1: Store and track generated artifacts as sub-configurations isolated from the mainline.   From a baseline snapshot such as a test build or release candidate, create a new child stream to store the generated artifacts.  Then create a second snapshot that represents both source code and generated artifacts. For a single “configuration” you now have two snapshots – one for source only and a second for source + binary.  Furthermore, you can diff these two snapshots to know exactly how the binary configuration is different from the source configuration.  You might also consider storing compiler files, debugging output, test output,the compilers themselves (!), etc.

Option #2: include/exclude rules

Option #2: include/exclude rules

Option #2: Store and track generated artifacts directly in mainline but exclude them from downstream access using stream-level exclude rules.   The top-most streams that need access to both source and binary will include the majority or entire filesystem footprint in their configurations.   The first stream that does not need access to generated objects will likely be the candidate to set an exclude rule on the folder(s) that contain those files.  The exclude rule is inherited to all children and grandchildren.

When using exclude rules, it is easiest to set a single rule on a top-level ‘./build’ or ‘./generated’ folder rather than creating a rule for each sub-folder in a large source tree.  Traditionally, make based build systems would generate the compiled files in-line with the source code.  Lately, ant based build systems would package all generated artifacts in a separate sub-tree off the root.  Regardless of your build tool, it’s best to have all generated artifacts in their own tree – it makes it easier to exclude as well as safer to clean!

In practice I see both patterns in use and both have equal merit depending simply on the situation at hand.  Option #1 is commonly used when generated artifacts are not to be included in the official release.  For example, transient or secondary artifacts such as test cases, debugging output, reports, etc.  These files are not promoted up to the release stream.  Option #2 is usually used when the generated artifacts are expected to be included in the official release snapshot.  Thus, they are promoted up through the test/build/release streams.  The build system for these types of ‘uber’ configurations may have multiple release targets creating different levels of release packages such as ‘minimal’, ‘app’ , ‘app-with-tests’ and ‘full’.  That is to say, the CM system may have all possible files but you can choose what actually gets deployed.  Ultimately, storing everything in the CM system may likely be the right choice for audit and reproducibility.

/Happy Coding/

Security Primer – Anatomy of the AccuRev Admin Trigger

March 27th, 2009

by Rob Mohr

Do you have the “Admin Trigger” installed and running in your AccuRev environment?  I hope so!

The “Admin Trigger” is the best way for you to restrict those non-ACE’d (AccuRev Certified Engineer) users from wreaking havoc on the process you’ve meticulously designed and implemented for your organization.  Make sure you lock it down!  It’s really simple to do!

Now, I’m not talking about taking flexibility away from your developers, they’ll need to control certain aspects of the process too.  It’s up to you where the line is drawn in the stream hierarchy and the Admin Trigger is the chalk.

The equator is commonly established on the integration stream.  Since the globe in this case is AccuRev, the line of demarcation runs north and south.  To the West (upstream from integration), ACE’rs set the rules on workflow, code promotion, stream configurations, and general access control.  To the East (downstream from integration), developers and development teams are free to make their own decisions to best support their process, products, projects, components, patches, bug fixing and development activities.

Have you read the private prototyping or stream-per-task blogs by Dave Thomas?  These are good examples of how dev teams and developers control how their activities are organized using streams while adhering to the overall enterprise software development life cycle (SDLC).

The Admin Trigger is a simple if-then-else perl script that fires on the server whenever certain commands are  executed.  Out-of-the-box, the script restricts “admin type” commands such as creating users, groups, depots, etc without needing additional customization.

 @cmdlist = qw/mkuser chref chdepot chslice lsacl addmember
                  rmmember mkgroup mkdepot mktrig rmtrig
                  setacl write_schema/;
    # is the user command in the above list?
    if (grep $_ eq $command, @cmdlist) {
    ...

The admin type commands are typically global in nature, meaning, that a single Admin group is granted permission for these commands.  Stream creation has a more granular scope allowing different groups to control their development process and stream management capabilities.

Simply list the streams in the trigger that only Admins have the ability to “manage.”  By default, other streams not listed are managed by the development teams themselves.  There are 2 sections in the trigger to set this up depending upon the commands to control.

Restricts: lock, unlock, chstream, incl, excl, incldo

    $admin_stream{"replace_with_admin_stream"} = 1;
    $admin_stream{"replace_with_admin_stream"} = 1;
    $admin_stream{"replace_with_admin_stream"} = 1;
    ...

Restricts: mkstream, mkws

    $basis_stream_deny{"replace_with_basis_stream_to_deny"} = 1;
    $basis_stream_deny{"replace_with_basis_stream_to_deny"} = 1;
    $basis_stream_deny{"replace_with_basis_stream_to_deny"} = 1;
    ...

Inside the trigger logic, each command is evaluated and will allow the operation to complete or not.

For example, the following section validates the “mkstream” command:

if ($command eq "mkstream") {
...
 # only a user listed as an administrator can create a new stream
 # based on an existing stream in the "basis_stream_deny" list
 if ( defined($basis_stream_deny{$stream2}) and `$::AccuRev ismember $principal "$admingrp"` == 0 ) {
   print TIO "Basing a new stream on existing stream '$stream2' disallowed:\n";
   print TIO "server_admin_trig: You are not in the $admingrp group.\n";
   close TIO;
   exit(1);
  }
}

There are other facilities in AccuRev to control the process and workflow too. Stream Locks grant users/groups the ability to promote to and from streams and Access Control Lists (ACLs) grant access to entire depots and subhierarchies.  Setting up these security measures combined with the Admin Trigger provide your organization with the flexible and granular security model it needs for the optimum development process.

Drop me a note and let me know the creative ways you’re using the Server Admin Trigger.

Getting the Most out of AccuRev’s Windows Explorer Integration

March 18th, 2009

As organizations become more advanced in their use of software configuration managment (SCM) they typically expand its use to include more than the software developers.  A common addition is around audibility and compliance of the entire development process which may require them to version more than just the source code, but also any requirements, project plans, design artifacts and documentation.  This enables the labeling of the big picture of who, what, where, why and how the software was developed.

With this expansion there are now more users of the SCM tools, many of whom have never used a version control solution before. A few examples of these new user types may be hardware designers, graphic designers, product managers, or the documentation team. These types of users are working with different types of files, and work in different tools than the traditional software developers and because of that may use version control tools in different ways.  These users may have historically created versions of files using naming convention such as:

ReleaseNotes_v1.doc, ReleaseNotes_v2.doc etc. all on their local computer.

Obviously this can be an error prone process and also a single point of failure if something were to happen to that user’s computer.  Since many of the files they work on are binary (.doc, .pdf, .ai, .dwg, .vsd etc.) they may want to work on these files in a serial mode so they don’t have to try to manually merge them when someone else makes changes to them in parallel.  So instead of the traditional use of AccuRev, taking advantage of our parallel development features, these users may want to work in exclusively locked workspaces or at least have exclusive locks on certain files to protect them.

In order to make this new type of user successful they need to use an interface that is familiar to them. With many source code control tools they may have to write scripts, manage configurations or interact with a command line interface to be able to get their work done. This type of interaction will likely not work well for these types of users, as many of them may not have the technical know how to work in those environments.  AccuRev can make this transition much more fluid and familiar for these users with the AccuBridge for Windows Explorer. This interface gives the user access to the AccuRev commands needed from within the familiarity of Windows Explorer as seen in exhibit 1.

AccuBridge for Windows Explorer

AccuBridge for Windows Explorer

» Read more: Getting the Most out of AccuRev’s Windows Explorer Integration

Are ClearCase Dynamic Views Still Necessary?

March 11th, 2009

by Brad Hart

In just about every situation in the last 8 years where I’ve gone into a prospect to talk about replacing ClearCase, I’ve been asked the question about ClearCase’s Dynamic Views and why AccuRev does not have a similar concept. It’s a fair question coming from those who are familiar with ClearCase and I’m posting this blog to help both give some background information on Dynamic Views and answer some of the common issues raised by former users of ClearCase before they made the switch to AccuRev. I used to work at Rational Software in both Support and in the Field and I spent a number of years as a ClearCase consultant before coming to AccuRev in 2001.

At the time Dynamic views were introduced, there was tremendous pain in the market using a local source copy model, especially in enterprise applications. Disk space was extremely expensive, and it was becoming increasingly infeasible to have large enough disks on each developer’s workstation. Networks were also much slower, and the time required to copy entire sets of source code to each developer’s workstation was unrealistic as applications grew in size and complexity. Dynamic views provided the appearance of each developer having a local copy of the source files, but without the time / disk space overhead associated with having real local copies. They also provided just-in-time access to files across a network connection which was transparent to the end user, similar to the way NFS works. Unlike NFS, which you only can access the latest version of files, the dynamic views allow the developer to reconfigure their view of the files to represent any given configuration past or present. Also, unlike a local copy model, reconfiguring what a developer sees does not require any file copying to reflect the changes. This saves time and money and the savings continue to scale the larger the development group gets.

Does it still hold water?
No. Both workstation and network hardware costs have dramatically dropped in recent years, and the performance has increased exponentially. It is very common and reasonable for developers to have near server-class systems on their desktops. In many cases, it is now a much better time savings to have developers work with local copies of their source files. In fact, Rational’s default usage model for developers is to do their development in a local copy source file model, contradicting the presence of Dynamic views. Dynamic views were a time and cost savings breakthrough when it was introduced, but given the changes in development environments in the current time, it is more often than not seen as a hindrance. There is also a much higher administrative burden associated with Dynamic views. Especially if you are working in a mixed environment (SAMBA, TAS, etc… need to be properly configured and maintained). Also, Dynamic views are notoriously unreliable and unusable over remote connections. Another major objection to Dynamic views from the developer perspective is that most developers don’t want “the rug pulled out from under them.” Your files are constantly changing in your view….how are you supposed to develop/build and test like that? Add in the fact that ClearCase does not have atomic transactions, and developers using Dynamic views will constantly have inconsistent sets of code to work on. Bottom line is that even Rational recommends developers use Snapshot views (like AccuRev workspaces) and only use the Dynamic views for integrations. Since AccuRev truly builds in parallel development, you don’t need an integration view/workspace. All your work can be done directly from one workspace.

Five things I’ve heard from developers on why they think dynamic views are important to an effective development environment:

WYSIWYG: The final test of your code changes before check-in is exactly the same thing as testing the release area code directly. No need to “check it out again in a different place just to make sure I checked in everything right.”

AccuRev allows your private work (keeps) and your check-ins (promote) to all occur from the same place (you don’t have to check out to a different place). AccuRev builds in best-practices like private-branching (workspace streams), atomic transactions, and copy-merge. You don’t get that out of the box with ClearCase. AccuRev’s built-in best practices absolutely improve the entire process. You absolutely must merge against the latest code before you promote your changes (for overlapped files). Plus, developers have total control of their workspace bringing in new changes as they are ready. That way if something is broken, they will know whether it is their code, or the latest code from the mainline. With Dynamic views, you will have to go find out for yourself and it is constantly changing. I have heard a lot of the “rug being pulled out from under me” analogies regarding dynamic views.

» Read more: Are ClearCase Dynamic Views Still Necessary?

AccuRev Teams Up with VersionOne on Agile Webinar Series

March 10th, 2009

AccuRev CTO, Damon Poole, is a guest speaker for an Agile webinar series, Agile 101: Laying the Foundation for Agile Development, presented by VersionOne.

Damon will be presenting this Wednesday on the following topic, and again on April 1 to discuss The Algorithms and Architecture of Agile vs. Traditional Software Development.

Breaking the Major Release Habit
March 11th
12:00 – 1:00pm EST

Are you frustrated with your release schedule? Are you considering moving to more frequent releases or wondering if there are ways to tweak your release schedule? Although the traditional pattern for software releases is to have a major release every 6-12 months or more and minor releases in between, there are many other release patterns to choose from. This session will examine the various factors and options involved, discuss their pros and cons, use examples drawn from a wide variety of companies, and give you the information you need to make an informed choice and then implement it.

Register

Use Case: I went from ClearCase to AccuRev

March 5th, 2009

In May of 2005, the company I worked for, Polycom, decided to switch our Software Configuration Management tool from ClearCase to AccuRev. Initially, this decision was not taken well by the developers in my business unit since they had been using Base ClearCase for several years.  However, after seeing how much easier AccuRev was to use and that it did everything that we needed for our development tasks, we became firm believers that AccuRev really is a “Best of breed” Configuration Management tool.

We evaluated a couple of CM tools before settling on AccuRev.  Among the tools we looked at were IBM Rational ClearCase UCM (which I was very familiar with), CVS, and Accurev.  CVS was being used by development teams in both offices and it was determined to be a tool that would not scale well for us.  After evaluating ClearCase UCM and AccuRev, it was decided that AccuRev was the way to go, for several reasons.  One reason Clearcase UCM did not do well was that we could not even get it to work at one of our offices that was using Linux for development (they were using 9 different types of Linux at the time).  AccuRev positively shined during this part of the evaluation by the fact that it was very easy to setup and use in a Linux environment.  Another reason and a huge advantage for AccuRev was the fact that it was very easy to use over a WAN between multiple sites (i.e., Austin TX and Andover, MA) without a mechanism like MultiSite.  The AccuRev servers that the development team in Andover used were located in Austin, TX.  For the 3 years that that I worked with our team using AccuRev, I never had any major issues using it over the network.  A third big reason was that we also did not have to pay for ClearCase MultiSite licenses which meant a big cost savings for the company.  This last reason was major factor in management choosing AccuRev over ClearCase UCM.

After selecting AccuRev as our new CM tool, we had to migrate the current source code that was in ClearCase. At the time that we were doing this, there was no migration tool to take source code in ClearCase and move it over to AccuRev. We decided to archive the existing ClearCase Version Object Bases (VOBs) and leave them as is on their current servers in the Andover, MA office.  This was determined by our management team to be the best way to start off using AccuRev.  Most of this legacy code was for really old products that had been “End of Lifed”.  So, we were not really losing much by doing this.  We then imported the latest code from the VOBs that we cared about.  The import of this source code was just brought in as flat files.   This worked out well for us and for those who wanted to keep legacy history around.

The training for using AccuRev was very short.  AccuRev sent a trainer to our office in Andover and we had 2 groups of developers (about 15 each), attend a training session that was less than 3 hours long.  One half day of training for the developers.  It was that simple.  After this training, I was available to help the user community with any questions that they had.  I do have to say, I did not spend much time at all helping fix issues related to AccuRev.  For any issues that did come up and I couldn’t help out with immediately, AccuRev Technical Support was always there to help.  For the record, I did not attend any special AccuRev Administrators Training.  AccuRev does have AccuRev Certified Engineer Training available and that was something I wanted to take.  Actually, whatever administration was needed for AccuRev took place in the Austin, TX office.  The person who did that did it a part time basis.  This is also much different than ClearCase.  I have been a full time ClearCase Administrator at several companies and that is a full time job.  When I was working with ClearCase, at least 20 and up to 30 percent of my time was spent on administrative tasks related to ClearCase.  So, I was able to devote that extra time to work on other types of things, like the install kits for our products using InstallShield.  We had been considering hiring a consultant to do that work and we ended up saving the money that we would have spent on that.

» Read more: Use Case: I went from ClearCase to AccuRev

Agile Development Transformation Workshop for Managers – Lexington, MA

February 4th, 2009

AccuRev is co-presenting a one-day seminar on Agile Development Transformation:

agile workshop Agile Development Transformation Workshop for Managers   Lexington, MA
“Mitigating Risk with Agile Development: Great Software, Great Business Results.

Where:10 Maguire Rd, Bldg. 1, Lexington, MA
When: Thursday, February 26, 9:30 – 3:30

Details and registration

Speakers: Rich Mironov (Enthiosys); Johnny Scarborough (GlobalLogic); Damon Poole (AccuRev)
Cost: $50 for qualified registrants ( List price $595 ). Seating limited to 50 attendees.

This one-day session will include detailed presentations, interactive exercises and open discussion on:

  • Agile development approaches including distributed agile methods, the history of agile, and agile manifesto
  • A detailed walk-through of Scrum, one agile approach
  • The organizational changes required for successful agile adoption: executive commitment, cross-functional teams, and coaching
  • Hear first-hand from one of your peers about how to bring about agile adoption and improved results.
  • Roadmaps, releases, iterations and the iron triangle
  • Business drivers, business value and customer collaboration approaches
  • How to evaluate technologies when adopting agile

This seminar is intended for CTOs, Vice Presidents & Directors of:

  • Software Development or Engineering
  • Product Management
  • Business Units

All attendees will receive free copies of two new books:

Scaling Software Agility: Best Practices for Large Enterprises by Dean Leffingwell
The Art of Product Management by Rich Mironov

Co-sponsors:

GlobalLogic  AccuRev 

RallyElectric Cloud