userstyles.world icon indicating copy to clipboard operation
userstyles.world copied to clipboard

Mirrior update Fail for some userstyles...

Open decembre opened this issue 2 years ago • 19 comments

I think i understand how to do for mirror update, i read your help about it, but...

By example this was updated on Userstles.org and USO (v.9to v.10): Flickr WideScreen (Viewer) - FlickRiver

But it is not updated to USw.

Seems there is the same problem with an other by example: Userstyles / Greasy Fork Enhancer Dark-Grey v.202 For this one, i make the update by hand. Now, for the next update on userstyles.org, it can be updated? Or i broke something ?

I notice a BBcode problem (`) around its description imported: Maybe that's break the update ? Normaly it should be fixed, as you said here: The Description Section don't keep the original text formatting (but that's good in the Notes section): That's a bug. I'll fix it for the next release.

Other things: When i wanted try something to have this auto update, i try to add in the form: "Mirror source code URL If your style was imported, this takes priority over original URL." the url of UserCSS from USO (the same i used for the import): https://raw.githubusercontent.com/33kk/uso-archive/flomaster/data/usercss/126659.user.css

Not the solution, no update of the userstyle.

But when i wanted remove my change, it is not possible. I see it always in the userstyle info page and its edit page.

I tested the same thing with: Userstyles / Greasy Fork Enhancer Dark-Grey v.202

decembre avatar Jan 09 '22 18:01 decembre

I believe this is due to USo-archive's mirroring of userstyles, which is set to every 12 hours. The versions that I'm seeing are the same ones you can see in USo-archive; if they weren't mirrored from USo, then the issue happens over there. We still check for updates on every 30 minutes, which I'll increase to every 60 minutes or more in v2.0 of USw.

To summarize, it all depends on the timing of you pushing your changes to USo and USo-archive mirroring them.

I notice a BBcode problem (`) around its description imported [...] Maybe that's break the update ?

Nope, that's doesn't matter. As for rendering metadata mirrored from USo-archive, I have a way to decouple it from being processed by our Markdown engine, but it's a hack-y solution that requires some safe-guarding.

But when i wanted remove my change, it is not possible.

Oh, right, this is something I forgot to implement. It's because empty fields are skipped if we don't use a specific way to tell what should be updated in the database.

vednoc avatar Jan 13 '22 22:01 vednoc

Thanks! I remember of this timing thing.

The update seems working for all (a part the BBcode problem), as i can see...all, but not the screenshot. By example for: Flickr WideScreen (Viewer) - FlickRiver

decembre avatar Jan 14 '22 01:01 decembre

Yep, we don't have the logic to handle mirroring screenshots. Not sure if we want it to be another option, or if we should include it in the "mirror metadata" option. I suppose the former makes more sense.

vednoc avatar Jan 14 '22 22:01 vednoc

So, for now we need to update the screenshot our self?

I don't remember well, but it seems that for other userstyles, the auto update take care to the screenshot too... I am not certain.

decembre avatar Jan 15 '22 01:01 decembre

Yes, for now. We only have logic to handle screenshots when creating/importing userstyles. There's nothing in the updater module that checks whether the screenshots are the same or not.

vednoc avatar Jan 15 '22 01:01 vednoc

Ok! ;-)

decembre avatar Jan 15 '22 07:01 decembre

Seems have a problem too for this one (it stay at v.27) Youtube WideScreen (New Design Polymer) v.27

Mirror uso-archive.surge.sh (v.28), Updated at: 09/10/2022 à 15:29:40: Youtube WideScreen (New Design Polymer) v.28

decembre avatar Oct 10 '22 19:10 decembre

Looks like it's still cached on the CDN:

image

vednoc avatar Oct 10 '22 19:10 vednoc

I don't understand: my last version is v.28

decembre avatar Oct 10 '22 19:10 decembre

Yes, but it hasn't updated on cdn.jsdelivr.net, which is from where your userstyle is mirrored. USo-archive uses GitHub's own CDN, which does have the latest version of your userstyle. Try setting "Mirror source code URL" to use GitHub's link. That should work.

vednoc avatar Oct 10 '22 19:10 vednoc

From uso.kkx.one (work for me now, before it don't with Waterfox classic..): Youtube WideScreen (New Design Polymer) v.28 I need to copy this link (from the "View JSON" button): https://cdn.jsdelivr.net/gh/33kk/uso-archive@flomaster/data/styles/188453.json

In the field of: "Mirror source code URL - If your style was imported, this takes priority over original URL." That's right?

Sorry, the "If your style was imported, this takes priority over original URL" don't be very clear for me... :-)

decembre avatar Oct 10 '22 20:10 decembre

Nope. On old USo-archive version, you can either copy the "UserCSS" link or the link on "Install" button. They're the same. It's this link that you need to put in that field:

  • https://raw.githubusercontent.com/33kk/uso-archive/flomaster/data/usercss/188453.user.css

On new USo-archive version, you can copy the "Install with Stylus" link, but it might have cache issues. You get this:

  • https://cdn.jsdelivr.net/gh/33kk/uso-archive@flomaster/data/usercss/188453.user.css

I suppose we might want to overwrite that with a link to GitHub. Any thoughts, @Gusted? Additionally, we should make its description more clear.

vednoc avatar Oct 10 '22 20:10 vednoc

Ok i put the first link and wait and see.... This way don't change nothing for the stats ?

Note around: I suggested some time ago a "Stats keeper " function (by example, show the number of installs since the last refresh by example): seems accepted, but....

decembre avatar Oct 10 '22 20:10 decembre

It should mirror in 10 minutes. If it doesn't, I'll have another look tomorrow.

As for stats, there's a rewrite coming up that will redo everything. Once those changes are in, we should able to show you stats since you were last logged in or something along those lines.

vednoc avatar Oct 10 '22 20:10 vednoc

Fine, as usual!

decembre avatar Oct 10 '22 20:10 decembre

Looks like it was successful. 🎉

vednoc avatar Oct 10 '22 21:10 vednoc

Yes! Big thanks man! But before it was updated normally... strange, no ?

decembre avatar Oct 10 '22 21:10 decembre

You're welcome! It would've updated at some point, but not sure when. Perhaps we could change mirroring from every 30 minutes to every few hours, because we could be preventing their cache refresh/invalidation.

vednoc avatar Oct 10 '22 21:10 vednoc

I let you put your hands in the machine with pleasure!

decembre avatar Oct 10 '22 21:10 decembre

Seems the return of the same problem for this userstyle....

I test the other link you give to me: https://cdn.jsdelivr.net/gh/33kk/uso-archive@flomaster/data/usercss/188453.user.css

decembre avatar Nov 04 '22 04:11 decembre

I find it fascinating that there's a log message how it was mirrored, yet the versions don't match. Could you put https://raw.githubusercontent.com/33kk/uso-archive/flomaster/data/usercss/188453.user.css as the mirror URL? I might go ahead and rewrite all jsdelivr URLs. P.S. We did change mirroring from 30 minutes to every 4 hours and that might've had some effect, though it's impossible to tell.

vednoc avatar Nov 04 '22 04:11 vednoc

The problem around BBcode problem (`) seems always present too... That's why i update only the code.

I do your suggestion soon when i do my next release (YouTube change perpetually...)

decembre avatar Nov 04 '22 04:11 decembre

I can see that there's a difference in what you get when importing from jsdelivr and githubusercontent links. That's the reason why it would be good to rewrite these links instead of treating them differently. IIRC we used to this better before USo-archive switched to jsdelivr.

vednoc avatar Nov 04 '22 05:11 vednoc

that's the reason why it would be good to rewrite these links instead of treating them differently.

On your side or mine ?

decembre avatar Nov 04 '22 05:11 decembre

New version published: v.32

Change for update link done to (but that was the same that previously i used): https://raw.githubusercontent.com/33kk/uso-archive/flomaster/data/usercss/188453.user.css

wait and see...

decembre avatar Nov 04 '22 05:11 decembre

On our side. I got a part of the metadata when using githubusercontent link and the entire metadata when using the jsdelivr link. That's because we treat the latter as a special link. Maybe it's time to promote this file to a module and handle things properly.

vednoc avatar Nov 04 '22 05:11 vednoc

What a work for you!

I need to revert to ?: https://cdn.jsdelivr.net/gh/33kk/uso-archive@flomaster/data/usercss/188453.user.css

decembre avatar Nov 04 '22 05:11 decembre

Nope. Keep it as is.

vednoc avatar Nov 04 '22 05:11 vednoc

Ok...

decembre avatar Nov 04 '22 05:11 decembre

In retrospect, I should've rewritten the URL in this commit: https://github.com/userstyles-world/userstyles.world/commit/14271785aefa77a456a14bc7eb011050962b40c1 Oh well, more technical debt for me to deal with. (=

vednoc avatar Nov 04 '22 05:11 vednoc