monocular icon indicating copy to clipboard operation
monocular copied to clipboard

Monocular creates links that 404 for maintainers

Open venezia opened this issue 8 years ago • 5 comments

On the kube-lego page on kubeapps.com, the Maintainers have links, but the links 404.

If we don't have a solid link to an author's profile page, we shouldn't just create a link that will likely 404

Thanks

venezia avatar Oct 23 '17 20:10 venezia

To fix this I would suggest using one of two options.

Option 1: Use mailto links and email:

  • It's what Cargo does (Rust package manager). See an example
  • NPM does this (for JavaScript). Users have pages on npmjs.com and their email addy. Here's an example
  • Packagist (for PHP) displays email addresses. An example.

Turns out email is pretty common.

Option 2: A URL property on chart maintainers and use that:

Some don't like to give out their email address. The Drupal community provided user pages and forms to email people to protect a maintainers email. GitHub allows you to commit with a fake/github email address to hide yours.

An option is to use a URL of someone's choosing and create a link to the maintainer using that.

Option 1 + 2?

If the URL is present and if not fall back to the email address.

mattfarina avatar Oct 23 '17 20:10 mattfarina

I just opened kubernetes/helm#3056 for the helm side of the discussion.

mattfarina avatar Oct 23 '17 20:10 mattfarina

Thanks for finding this @venezia. We actually used to use mailto, but in kubernetes/charts we decided to gradually move to GitHub IDs for maintainers and wanted Monocular to point to the GitHub ID as that is a more useful author link (I couldn't find a reference for this decision, I believe it was one made during a charts dev call).

See https://github.com/kubernetes-helm/monocular/blob/master/src/ui/src/app/chart-details/chart-details-info/chart-details-info.component.ts#L52 - we try to form the GitHub profile link if the repo source matches "github.com".

Repos with other sources will use the mailto link. We could try to detect if the name is a GitHub ID (a simple check would be if it doesn't have spaces), but this seems a bit hacky. We can assume that anything in stable and incubator should use GitHub IDs and if this isn't the case, the chart should be updated.

I've created kubernetes/charts#2576 to fix the issue in kube-lego. @mattfarina I've commented there about somehow checking for this as part of the linting process?

prydonius avatar Oct 24 '17 10:10 prydonius

If kubernetes/helm#3056 gets added to the spec then we can support it in Monocular, I guess I would choose based on the following:

  1. if maintainer[0].url is present
  2. if repo.source == github.com/kubernetes/charts/... (currently we just check for github.com, but this probably needs to be more specific to k8s/charts)
  3. mailto

WDYT?

prydonius avatar Oct 24 '17 10:10 prydonius

Sounds good to me

mattfarina avatar Oct 24 '17 13:10 mattfarina