Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 352199

Summary: Mapped Feature available versions node shows all IU versions from all mapped repos
Product: [Technology] CBI Reporter: Miles Daffin <miles.daffin>
Component: CBI p2 Repository AggregatorAssignee: Project Inbox <b3.aggregator-inbox>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: thomas
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Miles Daffin CLA 2011-07-15 07:34:13 EDT
I map 2 repos, A & B both of which contain FeatureX. Repo A contains FeatureX v1.1 and Repo B contains FeatureX v1.2. If I map RepoA/FeatureX explicitly the Available versions node shows 1.1 *and* 1.2. (If I disable RepoB I can still see both versions even though 1.2 is only available from the disabled RepoB. I have to close and re-open the model to see just version 1.1.)

This needs looking at but is actually quite useful :) Say I am trying to build a repo with 2 versions of the same feature in it. By default the Aggregator will only mirror the latest/greatest version. If I want both I have to use version ranges to ensure this. The fact that I get a global view of all versions in the repo allows me to visually test my version ranges for a particular feature. When an available version is included it has a green tick. Excluded versions have red arrows. All that is needed is to indicate where the version comes from somehow (VS/Contrib/MR), and to fix it so that versions disappear if the parent repo is removed or disabled (and vice versa).
Comment 1 Thomas Hallgren CLA 2011-07-15 08:00:39 EDT
There are five different locations where we can search for versions available:

1. in the parent repository.
2. from other enabled repositories in the current validation set
3. from enabled repositories in other validation sets
4. from disabled repositories.

If we show more than #1, then we need a good way to visualize the different sources. Here's one suggestion:

- The versions from #1 and #2 will appear like they do today.
- The versions from #3 will be grayed out.
- The versions from #4 will not be visible at all.
- All visible versions will be annotated with a match/don't match indication.

The normal versus grayed out appearance signifies what is included or not in the validation.

The reason for leaving out #4 is that a disabled repository is normally not loaded (it is only loaded if it has been enabled sometime since you opened the editor). Including versions under such circumstances would be confusing.
Comment 2 Miles Daffin CLA 2011-07-15 17:45:09 EDT
#4 should definitely not appear. As you say, the repo is not loaded when disabled. (If I disabled a repo I would expect to see the versions contributed by it to disappear from all available version lists too.)

#3 would it make sense for versions in a sub-set to appear in the super set (the set that extends and therefore I suppose includes the other set)?

How easy would it be to differentiate between #1 and #2? What threw me initially was seeing versions I did not think were in a particular repo. I had to check the repo browser to make sure. (And when I disabled other repos I thought might be contributing versions the list did not update.) I would be nice (not essential) to be able to tell if a version came from another repo.
Comment 3 Thomas Hallgren CLA 2011-07-18 17:16:59 EDT
Fixed in rev. 1534.
Comment 4 Miles Daffin CLA 2011-07-19 13:07:40 EDT
OK. Fix indicates where a version comes from using a comment in parentheses. (Additionally, text for versions coming from other mapped repos is greyed out.)

# If version comes from the same mapped repo: no comment necessary (#1).
# If version comes from a different mapped repo in the same contribution comment is "from other Repository in the Contribution".
# If version comes from a different contribution in the same validation set comment is "from other Contribution in the Validation Set".
# If version comes from a different validation set comment is "from other Validation Set".
# If version comes from a disabled mapped repo - we don't see it.

This is getting a bit convoluted I think. There are 2 possible refinements:

1. Change the text in the comments to make it simpler (see below)
2. Replace the comments with the model path to the version: Validation Set label/Contribution label/Mapped Repo label.

Here are some suggested minor changes to the label text:

# If version comes from a different mapped repo in the same contribution comment is "from another Repository in this Contribution".
# If version comes from a different contribution in the same validation set comment is "from another Contribution in this Validation Set".
# If version comes from a different validation set comment is "from another Validation Set".
Comment 5 Miles Daffin CLA 2011-07-19 13:14:12 EDT
As discussed, we do not expect to see versions from mapped repos that have been disabled. This is the case if the mapped repo is disabled when we load the model into the editor. But if we disable the mapped repo its contributed versions do not disappear from the available versions lists. We either have to update the version range in the mapped feature or close and reopen the model. Likewise, if we delete a mapped repo its contributed versions do not disappear from the available versions lists. (This looks tricky to get right.)
Comment 6 Miles Daffin CLA 2011-07-19 15:29:28 EDT
Noticed that comment text is not always grey. When is it supposed to be grey? This suggests that the version in questions comes from a mapped repo that is disabled. Is this what is meant?
Comment 7 Thomas Hallgren CLA 2011-07-20 02:16:11 EDT
(In reply to comment #6)
> Noticed that comment text is not always grey. When is it supposed to be grey?

Entries stemming from other ValidationSets are grey since they are not actually available during the validation. They are just there for reference.

I changed the texts.
Comment 8 Miles Daffin CLA 2011-07-25 08:04:30 EDT
OK. Changes verified.

One question. When should the list of available versions update? At the moment I can disable/enable and add/remove stuff but the list does not update until I open/close the model.
Comment 9 Thomas Hallgren CLA 2011-07-25 09:41:49 EDT
They should be updated immediately. Please open a separate bugzilla if that doesn't happen. Closing this one.
Comment 10 David Williams CLA 2016-09-16 15:52:09 EDT
[Bookkeeping change only. Moving bugs to the new "home" of aggregator, CBI.
Made no changes to assignee's for closed bugs, even though some were old inbox.]