It's all about the answers!

Ask a question

Why does Jenkins load components that are not in the workspace?


Andy Jewell (24236174) | asked Jun 24 '14, 8:14 p.m.
edited Jun 22 '16, 10:46 a.m. by David Lafreniere (4.8k7)
 HI. . . I have used both the RTC Eclipse client and lscm (workspace remove-components) to remove a component from a repository workspace.  I refresh and look and it's gone.  No errors.  But then, when I do a full load of that workspace into a brand new sandbox location, the component reappears!  It appears in both the sandbox and is back in the repository workspace itself.  What tha??  Is there something I don't know about?  Thanks for your suggestions!  (rtc 4.0.3)

Andy

Comments
Robert Wen commented Jun 24 '14, 10:05 p.m.

I'm a little confused.  You want to remove the component from the repository workspace, but not from the stream that the repository workspace is flowing to/from? 


Shashikant Padur commented Jun 24 '14, 11:10 p.m.
JAZZ DEVELOPER

Once the component is removed from the workspace it will show up as incoming component addition. Did you by any chance accept the incoming changes/additions before doing a full load?


Andy Jewell commented Jun 25 '14, 10:45 a.m.

Robert - correct, I want a partially loaded workspace.  This is possible by not loading all the components in the first place but it seems after loading the components into the workspace in the first place, it doesn't work to remove them from the configuration. 


Andy Jewell commented Jun 25 '14, 10:50 a.m.

No, Shashikant, I was not accepting components.  Maybe I have the wrong expectation.  Since a repository workspace can be partially loaded with components, it would make sense that components can be removed from the workspace (using --remove-components) and then those components would not load unless I accepted from the parent stream (using --flow-components).  I don't think this is a problem if the workspace is partially loaded from the beginning it only happens when trying to "downsize" the load of a workspace.  Is it not true that a workspace can be partially loaded (not configured with all the components of the parent stream)? Our team uses this feature all the time in the UI (i.e., only loading a subset of components).

2 answers



permanent link
Robert Wen (690412) | answered Jun 26 '14, 12:59 p.m.
 OK, I think this may be what you want.

You can turn off visibility of unloaded components in the Pending Changes view by going to the Pending Changes dropdown menu (downward-pointing triangle on the upper-right corner of the Pending Changes view) and making sure "Show components which are not loaded" is unchecked.

Hope this helps!

Comments
Andy Jewell commented Jun 26 '14, 6:31 p.m.

Hm, I never noticed that, pretty cool.  However, that's not my problem.  I will do a clean test to confirm, but this is what I see:

1.  Create a repository workspace from a workspace, select only a subset of components.
2.  In lscm, load that repository with all components.
3.  Update repository workspace to remove one or more components.  Do not remove these from the parent (target) stream.
4.  In lscm, load that repository with all components.  

What I expect here is for the sandbox to now only contain the components that were made in the update in step #3.  What happens is that the repository workspace is modified on the fly to include ALL components, then all components are loaded.

If the components are also removed from the parent stream, then it behaves normally, only the subset of components are loaded.


sam detweiler commented Jun 26 '14, 9:27 p.m.

I believe Load will load from the stream to the workspace and then into the sandbox.

If I create an empty workspace, and say Load, it gets the components from the stream into the workspace, and then onto my sandbox.  your behavior is consistent with this.

but u said 'build', which loads a(or more than one) STREAM into a workspace,
then the final result of THAT is loaded to the build users sandbox before the build process begins.  again, the two jenkins/RTC itegration tools work differently.
one loads a STREAM (all components), and one follows the Build Definition rules
(all unless excluded, or none if 'private build' is marked)

what happens if you remove the flow target from the workspace before u issue the load?



Andy Jewell commented Jun 27 '14, 11:31 a.m.
I'm not sure about that, here's the doc for load:

Purpose:
  Loads the contents of the specified workspace into the local file system. By
  default, the workspace is loaded into the current working directory.

I'm using 4.0.3 which I know is getting further and further out of date, but I tried to load an empty workspace and this is what I get:
c:\Users\O386600\1wk>lscm load -r dev -d test_workspace -i --all "test load workspace"
Nothing to load. File system unmodified. 
Now I add four components to the workspace, save and load again.  I get:
Successfully loaded items into the sandbox.

All four components are loaded.  This is what I expected, only loading the ws configuration. I stopped the daemon and cleaned up (rd /q /s test_workspace).  Then removed one component from the workspace and reloaded.  Hmm.. now it works!  Of course.  Well, via Jenkins it was reloading the ws from the stream.  Guess I can't repro. 


1
sam detweiler commented Jun 27 '14, 12:01 p.m.

yes, but that is different than the use case u described

" think that would work but in my case the workspace is loaded by Jenkins so the use case is"

jenkins will load from the stream, into the workspace, UNLESS
private build is checked in the connected build def.

please confirm which use case you are working on?  commandline/eclipse
or
jenkins


Andy Jewell commented Jul 01 '14, 12:25 p.m.

Oh, I see... that's interesting, it must use the API to load directly from the stream rather than using the workspace?  That does explain the problem.  I "resolved" this by removing the component from the stream which, in this case at least, was suitable.  I will change the question name then I think your answer is right on.  Thank you! 


sam detweiler commented Jul 01 '14, 12:52 p.m. | edited Jul 01 '14, 12:53 p.m.

 Build loads source from a workspace to a local user (build user) sandbox. then build command (ant, maven ... happens)

there are two approaches

1. the code is in a stream and needs to be built, but it needs a workspace, you cannot load source directly from a stream.
2. the workspace HAS the code already, don't load.

if it loads (1), it follows the rules in the build def..

ALL components (default) from the workspace or exclude components.
if it needs to create the workspace (load/replace, then I think it does ALL components all the time. (I haven't checked this cause I either do all, or private build exclude these components from existing workspace


showing 5 of 6 show 1 more comments

permanent link
Rohit Balduwa (945511) | answered Jun 25 '14, 1:08 a.m.
edited Jun 22 '16, 11:07 a.m. by David Lafreniere (4.8k7)
Hi Andy
Deleting a component from repository workspace will not delete the component from the Source control stream.
Steps you need to follow in the IBM RTC eclipse client:
1) Right click the repository workspace and click open.
2) Select the component you want to Remove and click Remove.
3) Save the repository workspace Editor.
4) On the pending changes view, you will see a component deletion, right click and deliver.
5) Now, verify in the source control stream whether the component is removed.
6) Now, Right click the repository workspace and click Load.
The component will not be listed now.

Let me know if this helps.

Regards,
Rohit

Comments
Andy Jewell commented Jun 25 '14, 10:44 a.m.

Thanks, Rohit.  In my case, I want to keep the component in the stream.  For example, we have about 20 components and some team members only work on two or three components so they only load two or three components into their stream.  Doing a full load of this workspace only loads those three components (unless in the UI you accept the components or in lscm you use the --flow-components option when accepting).  However, if you load five components and then subsequently change your mind and only want to load three, it will continue to load all five no matter what you do.


sam detweiler commented Jun 25 '14, 11:13 a.m.

what if you browse and select only the components you want loaded? (vs load all)


Andy Jewell commented Jun 26 '14, 11:40 a.m.

Sam, I think that would work but in my case the workspace is loaded by Jenkins so the use case is loading the entire repository workspace as it is configured.  It did work to remove the component from the parent stream AND the workspace but to me, this is broken.  A repo workspace should be able to have a subset of components and if you "load all" it will load only the components configured for that workspace.  And it does act that way if the workspace is created initially with the fixed subset of components.  Where it seems to get confused is if the initial workspace is trimmed down of components then it will want to reload everything.  Maybe this is just my world.


sam detweiler commented Jun 26 '14, 12:14 p.m. | edited Jun 26 '14, 12:16 p.m.

Which jenkins RTC plugin are u using?

the open source one loads the STREAM  into the build workspace, and then the build machine from there.  the components are in the stream.

the Product provided plugin gets info from the Build Definition, we we discussed before. you deleted the component from the workspace, and the workspace is connected to the stream.
far as I know, unless you said 'private build' (use ONLY this workspace), the model is load the (flow target) stream into the workspace, and then extract code to build from there.  you might try removing the stream flow target for a test

you did NOT push the component delete to the stream, so you have a content matching problem

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.