← Back to team overview

launchpad-reviewers team mailing list archive

Re: [Merge] ~pappacena/launchpad:bug-oci-project-navigation into launchpad:master

 

Review: Needs Fixing

The code itself looks OK to me, but I think the OCI project selection UI needs more work than the follow-up branch you posted: I don't think that users will reliably work out the required pillar/OCI-project syntax, nor do I think that they should have to.  We really need the underlying token to be constructed via a picker that allows choosing the pillar and the OCI project name separately.

The UI is, of course, a bit tricky, and we probably need to think about ways to minimize confusion.  One idea I had looks a bit like this, and I'm interested in your thoughts:

 * Given current project direction from Mark, I think we can restrict OCI bug handling to OCI projects under distributions for the moment.
 * Distributions have a `default_traversal_policy` that can serve as a bit of a hint as to whether they mainly contain source packages or OCI projects.  (Using this is a slight hack, but we know that the new distribution that we'll mainly care about for all this will have the policy set to `OCI_PROJECT`.)
 * The combination of these two things means we can avoid new UI for the moment.  Instead, people can pick "Distribution: <new distribution that only contains OCI projects>" and put the OCI project name in the "Package" field.  We'd need a new vocabulary that is like `DistributionSourcePackageVocabulary` but that can return either `DistributionSourcePackage` or `OCIProject` rows depending on the distribution (perhaps called `DistributionPackageVocabulary` or similar), and the bugs UI would use that instead of the current one.

I think the only downside of that is that the inner field would say "Package" when it actually means "source package or OCI project", unless we can think of a clear single-word way to express that.  But the benefits are substantial: we don't need to confuse users in the common case of just trying to file a bug against Ubuntu; and people who actually are working on OCI projects get a usable picker so that they don't have to remember the tokenization syntax and so forth.  We could even have JS to change the field presentation to "OCI project" if you select an OCI-flavoured distribution.

If we need to work out how to expose bugs for project-based OCI projects in the UI, then we can do that separately.  I think we'd probably want something similar that makes it clear in the UI that they're subordinate to the parent project.  However, as long as these aren't required at the product design level then I'd rather not expose that capability for now, and avoid having to do the UI design work and potentially confuse users.

What do you think?

Diff comments:

> diff --git a/lib/lp/registry/model/ociproject.py b/lib/lp/registry/model/ociproject.py
> index 4dab589..fdc30ab 100644
> --- a/lib/lp/registry/model/ociproject.py
> +++ b/lib/lp/registry/model/ociproject.py
> @@ -146,6 +168,23 @@ class OCIProject(BugTargetBase, StormBase):
>          """See `IOCIProject`."""
>          return self.pillar.bug_supervisor
>  
> +    def getAllowedBugInformationTypes(self):
> +        """See `IDistribution.`"""
> +        return FREE_INFORMATION_TYPES

This may need to be extended now that private OCI projects can exist (but that could be in a separate branch).

> +
> +    def getBugSummaryContextWhereClause(self):
> +        """See BugTargetBase."""
> +        # Circular fail.
> +        from lp.bugs.model.bugsummary import BugSummary
> +        return BugSummary.ociproject_id == self.id
> +
> +    def _getOfficialTagClause(self):
> +        return self.pillar._getOfficialTagClause()
> +
> +    @property
> +    def official_bug_tags(self):
> +        return self.pillar.official_bug_tags
> +
>      def newRecipe(self, name, registrant, owner, git_ref,
>                    build_file, description=None, build_daily=False,
>                    require_virtualized=True, build_args=None):


-- 
https://code.launchpad.net/~pappacena/launchpad/+git/launchpad/+merge/394181
Your team Launchpad code reviewers is subscribed to branch ~pappacena/launchpad:bugtask-oci-project.


References