canonical / charmhub.io

GNU General Public License v3.0
9 stars 24 forks source link

search results for Mattermost displays 2 results for the same link #1194

Closed anasereijo closed 2 years ago

anasereijo commented 2 years ago

I searched for Mattermost and got 3 search results:

Screenshot 2021-12-02 at 12 17 22

at first look, the first 2 results look very similar, but the authors are different: the first one is by Mattermost Charmers and the second one is by Paul Collins. When overlaying the card, we can see different URLs for both cards.

Screenshot 2021-12-02 at 12 17 51 Screenshot 2021-12-02 at 12 18 08

but when we click they both open the same URL > https://charmhub.io/mattermost-k8s by Paul Collins.

Solutions:

hatched commented 2 years ago

There is a hardcoded redirect for these charms.

https://github.com/canonical-web-and-design/charmhub.io/blob/90b47f7c47c0a011a381832e0b6b637ddee93b8c/redirects.yaml#L3

jkfran commented 2 years ago

Hi @Roadmaster, do you know if we should remove mattermost-charmers-mattermost from the store? I think I was asked by you or @mthaddon to set up this redirection.

Roadmaster commented 2 years ago

mattermost-charmers-mattermost is imported from https://jaas.ai/u/mattermost-charmers/mattermost, and as a rule we don't remove or change visibility status from imported charms as it will cause breakage when accessing the charm via the compatibility API. Someone might want to deploy the old charm as well, and removing it will prevent them from doing so.

The cause of the confusing "when clicking, both open the same URL" is the hard redirect that Jeff mentioned. If the redirect is an issue, I would suggest reconsidering that redirect.

jkfran commented 2 years ago

Okay, this is the issue created by @mthaddon to set up the redirection. Let see his opinion on this.

mthaddon commented 2 years ago

The redirect was put in place because mattermost themselves refer to that "old" link (mattermost-charmers-mattermost) in a blog post, but the charm was renamed to mattermost-k8s and published directly on charmhub. As such we'd prefer the redirect to remain in place. Ideally if someone tried to deploy mattermost-charmers-mattermost they would get mattermost-k8s instead, and if this is true after charmstore is shut down that's fine too (i.e. deploying cs:~mattermost-charmers/mattermost actually means you're deploying mattermost-k8s).

jkfran commented 2 years ago

Okay, so does it means that we need to leave as it is? Having two charms on the results and one redirecting to the other one is not nice.

@Roadmaster what do you think now after @mthaddon comment?

Roadmaster commented 2 years ago

HI there,

I was double-checking this and realized mattermost-charmers-mattermost should actually not be findable, because it's not promulgated on charmstore.

I will reimport the charm today, it should be done in about 1 hour. This should solve the findability issue.

As for Tom's request " Ideally if someone tried to deploy mattermost-charmers-mattermost they would get mattermost-k8s instead" - I don't think we have this kind of juju API-level redirect. We might be able to play around with our charm mapping mechanism to make it happen but I would definitely suggest waiting until we have done the cutover to charmhub. Otherwise, if contacting the authors of the blog post in question is an option, that would be cleaner - update the name at the source instead of hacking around on our side.

Roadmaster commented 2 years ago

LOL. the reason mattermost-charmers-mattermost is findable is because it's among the set of featured charms (to appear in the front page).

Can you please confirm (@mthaddon or @jkfran ) that we don't want that charm featured anymore?

(if you go to the front page right now you won't see it though, because its package_id changed when I reimported it).

If you want it to be de-featured:

1- I remove it from the featured list which requires running an update process on my sie 2- I delete and reimport it (yet again). 3- At this point all should be as desired.

If you like, I can feature mattermost-k8s instead. Let me know either way.

jkfran commented 2 years ago

@Roadmaster lol, I think feature mattermost-k8s instead is the right thing to do, @mthaddon ?

jkfran commented 2 years ago

I think we can close this issue now. Thank you all!