metacpan-web icon indicating copy to clipboard operation
metacpan-web copied to clipboard

unable to add to favorites

Open 532910 opened this issue 5 years ago • 7 comments

I pressed ++ (add to favorites) on https://metacpan.org/release/Plack. It incremented the number and now it shows me on https://metacpan.org/release/Plack/plussers But I don't see Plack on https://metacpan.org/account/favorite/list And when I reload https://metacpan.org/release/Plack the number is decreased but it still shows me on https://metacpan.org/release/Plack/plussers

532910 avatar Oct 13 '19 00:10 532910

Is it still this way? The last time I hit ++ on a package, it took a day or two to register.

jgamble avatar Oct 14 '19 21:10 jgamble

Same for https://metacpan.org/release/Moose

532910 avatar Nov 06 '19 19:11 532910

Same problem here.

sbakker avatar Nov 26 '19 10:11 sbakker

Same for me. Sometimes it is added, sometimes it's not. Also, favourites list seems to have some caching issues, as I get different results if I refresh it.

ikorchynskyi avatar Jan 29 '21 11:01 ikorchynskyi

@ikorchynskyi are you seeing the numbers fluctuate or just change once on the refresh?

oalders avatar Jan 29 '21 18:01 oalders

Hi @oalders,

Sorry for the delay in getting back to you. Seems there was a some change, that prevents me to have more than one identity at https://metacpan.org/account/identities (e.g. so I must select either github or google profile but not both). And it seems that favorites are separated per identity, so now I am able to add a repo to favorites under my github account.

But still, there is some weird behavior for favorites page, for example, on github identity:

  1. Start with empty faves:
$ curl https://metacpan.org/account/login_status
{"faves":[],"logged_in":true}
  1. Add Ref-Util repo to favs:
$ curl https://metacpan.org/account/favorite/add --data-raw "remove=0&release=Ref-Util-0.204&author=ARC&distribution=Ref-Util"
{"success":true}
  1. Check favorites
$ curl https://metacpan.org/account/login_status
{"logged_in":true,"faves":[{"author":"ARC","date":"2021-05-07T12:51:23","distribution":"Ref-Util"}]}
  1. Add MCE repo to favs:
$ curl https://metacpan.org/account/favorite/add --data-raw "remove=0&release=MCE-1.874&author=MARIOROY&distribution=MCE"
{"success":true}
  1. Check favorites again (no MCE here, and also no "blue ++" on distro page after refresh)
$ curl https://metacpan.org/account/login_status
{"logged_in":true,"faves":[{"distribution":"Ref-Util","author":"ARC","date":"2021-05-07T12:51:23"}]}
  1. Now, remove Ref-Util from favs and check fav list
$ curl https://metacpan.org/account/favorite/add --data-raw "remove=1&release=Ref-Util-0.204&author=ARC&distribution=Ref-Util"
{"success":true}
$ curl https://metacpan.org/account/login_status
{"logged_in":true,"faves":[{"author":"MARIOROY","distribution":"MCE","date":"2021-05-07T12:52:59"}]}

ikorchynskyi avatar May 07 '21 13:05 ikorchynskyi

Thanks @ikorchynskyi. That's helpful. I think we may need to check whether our Elasticsearch replication is keeping all of the back ends in sync.

oalders avatar Jun 18 '21 21:06 oalders