Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

How can I move a snapshot without deleting the stream?

Hi. . . we use Jenkins for our build process which creates a workspace snapshot.  In order to pull out the differences of code being delivered, we compare this snapshot to the flow target stream.  We used to just compare the snapshot to the stream but found that we need more data for downstream forensics so now we snapshot the flow target stream and compare the snapshots.

We have anywhere from two to four parallel releases all delivering into PROD.  So we have scads and scads of incoming changes everywhere because each release is accepting changes from other releases.  On top of that, we have a ton of these build related snapshots that we have to constantly accept to reduce clutter.

I was thinking of a creating a snapshot storage stream off of PROD that had no flow targets set just to keep the snapshots in one place without having to accept them into every other stream.  I'm not sure off hand which lscm can move snapshots but I'm hoping there is one.

Does anyone have any other suggestion or see any problems with this idea?


- Andy

0 votes

Comments

Hi Andy,

could you elaborate on "We used to just compare the snapshot to the stream but found that we need more data for downstream forensics so now we snapshot the flow target stream and compare the snapshots" - when is the snapshot on the stream created?

Sonia

Hi, Sonia. . . in general when i say "downstream forensics", I'm referring to build and process troubleshooting where we want to know why things happened like they did.  What we find is that though we can look at a file history, that file history is the same in any stream (albeit with different subsets of the same history).  In brief, it's hard to say exactly when and by whom something was delivered (besides the "hoover over changeset" approach).  This information is not in "Stream events" (would be nice if it were!).  Programmatically the only way to get at a changeset differential is to compare a stream to a stream or a snapshot to a snapshot, etc.  Because it's not possible (that I'm aware of) to create a snapshot from a timestamp, if we want to know what was in the target stream at the time of delivery we need to snapshot the target stream.  Otherwise, when our logs show "compare snapshot snap1 stream tgtstream" it doesn't tell us enough (because we don't know the state of the stream at that time).  So we snapshot the target stream at build time.

 General update on the question, since I can't find any way to move a snapshot and the question as written presumes a snapshot can be moved, I'll reword the question for that purpose.  I had assumed it was somehow possible because it does it through the UI when you delete a stream ("select a new stream to store the snapshots").


Accepted answer

Permanent link
I agree that having a "snapshot storage" stream (or workspace) is the best way to group your snapshots.
To change the stream/workspace of the snapshot, in 4.0.5, you can use the:
    scm set attributes --snapshot --ownedby <stream/workspace> ...
command.

In earlier RTC versions, you would use the:
   scm snapshot promote <stream/workspace> ...
command.
Andy Jewell selected this answer as the correct answer

1 vote

Comments

The second method for my 4.0.3  version worked great.  Thank you!

Hm - just an update to my understanding, you probably already realized this.  Promote puts them in the destination stream/workspace but does not remove them from the source stream/workspace.  I'm not sure this will solve my issue since the build snapshot will still "want" to be promoted like the rest of the code.  Well, actually maybe now that it's in the other stream I can delete it.  Sorry to be thinking out loud, in any case I didn't know about this functionality and somehow I think it will work.. :)

My understanding is that "promote" does "move" the snapshot from the original stream/workspace to the specified stream/workspace (it just modifies the "owner" property, and "owner" is a single valued property).   And whether or not you can delete a snapshot depends on your permission in the team area that owns the stream that owns the snapshot. 

Your answer

Register or log in to post your answer.

Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 12,025
× 1,204
× 562
× 158

Question asked: Feb 25 '14, 11:16 a.m.

Question was seen: 6,771 times

Last updated: Feb 26 '14, 7:23 p.m.

Confirmation Cancel Confirm