It's all about the answers!

Ask a question

How can I move a snapshot without deleting the stream?


Andy Jewell (24236374) | asked Feb 25 '14, 11:16 a.m.
edited Feb 26 '14, 11:52 a.m.
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

Comments
Sonia Dimitrov commented Feb 26 '14, 11:24 a.m.
JAZZ DEVELOPER

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


Andy Jewell commented Feb 26 '14, 11:47 a.m. | edited Feb 26 '14, 11:53 a.m.

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.


Andy Jewell commented Feb 26 '14, 11:51 a.m. | edited Feb 26 '14, 11:53 a.m.

 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
Geoffrey Clemm (30.1k33035) | answered Feb 26 '14, 4:08 p.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
edited Feb 26 '14, 4:11 p.m.
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

Comments
Andy Jewell commented Feb 26 '14, 5:44 p.m.

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


Andy Jewell commented Feb 26 '14, 5:50 p.m.

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.. :)


Geoffrey Clemm commented Feb 26 '14, 7:23 p.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

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 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.