Why does Jenkins load components that are not in the workspace?
2 answers
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
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.
what if you browse and select only the components you want loaded? (vs load all)
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.
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
Comments
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:
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?
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.
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
1 vote
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!
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
Comments
Robert Wen
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
JAZZ DEVELOPER Jun 24 '14, 11:10 p.m.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
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
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).