build engine and build definition visibility
I have been working on a utility to clone a project from one server to another.
making progress.
my userid has permissions such that I cannot delete anything on the source server.
time for another test.
create a new project base, run scripts to clone the data..
hm.. copying builds fail.
in eclipse, they are not all shown anymore.. only some build definitions.
if I open one, I can see the supporting build engine and open it, and its related build defs (which is bigger than the list I see in the eclipse UI)..
this is 3.0.1.3 client and server.
anyone seen anything like this? I closed eclipse and re-opened.. no change.
|
3 answers
has something to do with the Team Artifacts filter..
All project & Team areas - shows limited data
My Projects ... - shows everything
weird
|
Hi Sam, that does sound weird. When you create the copies, are you setting the context id on the items at all? The context id controls overall visibility of an item. For all Build items it should be the item id of the project area for the associated process area of the build engine / definition. Build results and their secondary items take it from the definition (but I assume you're not copying results). If you leave the context id null, the save operation sets it as appropriate. Actually, I doubt the context id is the problem as, if it was incorrect, switching the TA filter wouldn't affect the visibility.
How are you propagating the owning process area? I assume you must maintain a map from original to new for these, and any other referenced items (e.g. build engine -> supported build definitions).
If you want to try to debug it, the relevant query is in com.ibm.team.build.internal.ui.domain.BuildDomainContentProvider.getBuildDefinitionStatusRecords(IProjectAreaHandle, IProgressMonitor)
|
(have I mentioned before how I hate the text limit on questions!.. here is another 'answer' to be able to hold the text.)
thanks.. to create the BuildEngine and BuildDefinition objects I use
IBuildEngine buildEngine_new = BuildItemFactory.createBuildEngine((IProcessArea) new_project);
and
IBuildDefinition newbuildDef = BuildItemFactory.createBuildDefinition((IProcessArea) new_project);
so they are associated with the new repository project object.
I am not setting the 'contextID' explicitly.
I also lost all contact to the build engines and builddefs on the new repository.
they were there, but not visible in any project area. I had to run thru and delete them and recreate to get them visible again.
in the production system project, where I don't have write authority, I can see only some of the BE and BD if I set the filter to 'All projects'
if I specify a filter and click the project specifically, I can see ALL the BE and BDs.
no idea what is going on.
the BE to supported BD (and vice versa) is working fine.
Comments The APIs you're using are the correct ones to use. I can't explain the filtering problem either. If you're able to view the project area in the TA view (i.e. the client has connected to it OK), you should be able to view its builds, and all builds should be visible when the filter is 'All Project and Team Areas'. Could it be just a refresh problem, i.e. if you restart the client does the problem go away? How were you able to delete the items if they weren't visible?
sam detweiler
commented Jan 10 '14, 2:32 p.m.
restart eclipse doesn't resolve the issue. restart clean doesn't resolve the issue, disconnect from project, reconnect doesn't affect the issue.
to delete I wrote code to list them and delete them..
I must admit I'm really puzzled by this. Might need you to debug into BuildDomainContentProvider.getBuildDefinitionStatusRecords
sam detweiler
commented Jan 13 '14, 1:55 p.m.
Ok, will put that onto my list of things to do . thanks |
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.