Why does Jenkins load components that are not in the workspace?
![]()
Andy Jewell (242●2●57●72)
| asked Jun 24 '14, 8:14 p.m.
edited Jun 22 '16, 10:46 a.m. by David Lafreniere (4.8k●7)
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
|
2 answers
![]()
Rohit Balduwa (945●3●11)
| answered Jun 25 '14, 1:08 a.m.
edited Jun 22 '16, 11:07 a.m. by David Lafreniere (4.8k●7)
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 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?
|
![]()
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 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.
I believe Load will load from the stream to the workspace and then into the sandbox.
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
yes, but that is different than the use case u described
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)
showing 5 of 6
show 1 more comments
|
Comments
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?
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?
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.
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).