[Wikitech-l] Zuul CI status now displayed on Gerrit changes

2023-03-23 Thread Antoine Musso

Hello,

I have deployed a change to Gerrit which makes it display the ongoing 
CI/Zuul build if there is any.


If Jenkins jobs are running, you would see below the commit message some 
gray chipset with the name of the Zuul pipeline (test, gate-and-submit 
..). The Check tab shows the jobs details 
(https://phabricator.wikimedia.org/F36925186).


By exposing the Zuul CI status directly in the Gerrit web UI, people 
will notice a build error earlier. That also saves the hassle of having 
to monitor https://integration.wikimedia.org/zuul/.


There are a few glitches:

 * the way I have implemented it abuses the model proposed by Gerrit
   and in progress jobs are always considered a SUCCESS but will be
   marked as ERROR when they fail.
 * code is entirely running in the client browser. It is unable to send
   notifications or triggers any email when a build has failed. The
   EarlyWarning bot by Kosta Harlan
    does it though)
 * I am not a JavaScript developer per see but learned about TypeScript
   for static analysis and rediscovered QUnit. So at least there are
   some basic guarantees.
 * there are surely a bunch of edge cases that I have not properly handled

The code for those that are curious is at 
https://gerrit.wikimedia.org/g/operations/software/gerrit/+/refs/heads/deploy/wmf/stable-3.5/plugins/wm-zuul-status.js


If you see problems, JavaScript errors etc please paste them on 
https://phabricator.wikimedia.org/T214068 :)


Antoine "hashar" Musso


___
Wikitech-l mailing list -- wikitech-l@lists.wikimedia.org
To unsubscribe send an email to wikitech-l-le...@lists.wikimedia.org
https://lists.wikimedia.org/postorius/lists/wikitech-l.lists.wikimedia.org/

[Wikitech-l] Re: Use case for sha1 in revisions

2023-03-23 Thread Bináris
Thank you, now it is quite clear!
___
Wikitech-l mailing list -- wikitech-l@lists.wikimedia.org
To unsubscribe send an email to wikitech-l-le...@lists.wikimedia.org
https://lists.wikimedia.org/postorius/lists/wikitech-l.lists.wikimedia.org/

[Wikitech-l] Re: Use case for sha1 in revisions

2023-03-23 Thread Dan Andreescu
As for external use, it's very useful.  Before MW instrumented reverts, we
have ~20 years of revisions and we don't know which ones revert previous
revisions.  With the sha, we join and determine this information.  You can
see that code here
,
and the use of sha1.

On Thu, Mar 23, 2023 at 2:16 PM Gergő Tisza  wrote:

> On Wed, Mar 22, 2023 at 11:06 PM Brian Wolff  wrote:
>
>> This kind of sounds like a non-answer, but its mostly useful if you want
>> a hash of the revision. I dont think mw core really uses it, but it can be
>> useful for quickly detecting duplicate revisions. I think primarily it is
>> for external users.
>>
>
> Core does duplicate detection (when so configured) for adding the revert /
> reverted change tags.
>
> On Thu, Mar 23, 2023 at 4:03 AM Vi to  wrote:
>
>> Afair this avoids a new rev to be createad if you click "save" without
>> changing contents.
>>
>
> That actually uses to slot sha1 now (I guess as a micro-optimization
> because that way you don't need to re-hash slots which weren't edited).
> ___
> Wikitech-l mailing list -- wikitech-l@lists.wikimedia.org
> To unsubscribe send an email to wikitech-l-le...@lists.wikimedia.org
> https://lists.wikimedia.org/postorius/lists/wikitech-l.lists.wikimedia.org/
___
Wikitech-l mailing list -- wikitech-l@lists.wikimedia.org
To unsubscribe send an email to wikitech-l-le...@lists.wikimedia.org
https://lists.wikimedia.org/postorius/lists/wikitech-l.lists.wikimedia.org/

[Wikitech-l] Re: Parsing a page: any sections missing

2023-03-23 Thread JJMC89
Probably February 23 for dewiki. T332243
 is the bug report due to this
unannounced breaking API change.


On Thu, Mar 23, 2023 at 11:39 AM Martin Domdey  wrote:

> Hi Thiemo,
>
> since when is it so? February 22nd it worked properly last time.
>
> Kind regards
> Doc Taxon ...
>
> Am Do., 23. März 2023 um 19:35 Uhr schrieb Thiemo Kreuz <
> thiemo.kr...@wikimedia.de>:
>
>> The page contains __NOTOC__. That's why the "sections" property is empty.
>>
>> Best
>> Thiemo
>> ___
>> Wikitech-l mailing list -- wikitech-l@lists.wikimedia.org
>> To unsubscribe send an email to wikitech-l-le...@lists.wikimedia.org
>>
>> https://lists.wikimedia.org/postorius/lists/wikitech-l.lists.wikimedia.org/
>>
> ___
> Wikitech-l mailing list -- wikitech-l@lists.wikimedia.org
> To unsubscribe send an email to wikitech-l-le...@lists.wikimedia.org
> https://lists.wikimedia.org/postorius/lists/wikitech-l.lists.wikimedia.org/
___
Wikitech-l mailing list -- wikitech-l@lists.wikimedia.org
To unsubscribe send an email to wikitech-l-le...@lists.wikimedia.org
https://lists.wikimedia.org/postorius/lists/wikitech-l.lists.wikimedia.org/

[Wikitech-l] Re: Parsing a page: any sections missing

2023-03-23 Thread Martin Domdey
Hi Thiemo,

since when is it so? February 22nd it worked properly last time.

Kind regards
Doc Taxon ...

Am Do., 23. März 2023 um 19:35 Uhr schrieb Thiemo Kreuz <
thiemo.kr...@wikimedia.de>:

> The page contains __NOTOC__. That's why the "sections" property is empty.
>
> Best
> Thiemo
> ___
> Wikitech-l mailing list -- wikitech-l@lists.wikimedia.org
> To unsubscribe send an email to wikitech-l-le...@lists.wikimedia.org
> https://lists.wikimedia.org/postorius/lists/wikitech-l.lists.wikimedia.org/
>
___
Wikitech-l mailing list -- wikitech-l@lists.wikimedia.org
To unsubscribe send an email to wikitech-l-le...@lists.wikimedia.org
https://lists.wikimedia.org/postorius/lists/wikitech-l.lists.wikimedia.org/

[Wikitech-l] Re: Parsing a page: any sections missing

2023-03-23 Thread Thiemo Kreuz
The page contains __NOTOC__. That's why the "sections" property is empty.

Best
Thiemo
___
Wikitech-l mailing list -- wikitech-l@lists.wikimedia.org
To unsubscribe send an email to wikitech-l-le...@lists.wikimedia.org
https://lists.wikimedia.org/postorius/lists/wikitech-l.lists.wikimedia.org/


[Wikitech-l] Parsing a page: any sections missing

2023-03-23 Thread Martin Domdey
Hi,

I'm parsing a page, but get not one section with page
https://de.wikipedia.org/wiki/Wikipedia:WikiProjekt_Kategorien/Warteschlange
,
using this:
https://de.wikipedia.org/wiki/Spezial:ApiSandbox#action=parse&format=json&page=Wikipedia%3AWikiProjekt%20Kategorien%2FWarteschlange&prop=sections&formatversion=2

The parsing of other pages is working properly.

What's wrong?

Kind regards
Doc Taxon ...
___
Wikitech-l mailing list -- wikitech-l@lists.wikimedia.org
To unsubscribe send an email to wikitech-l-le...@lists.wikimedia.org
https://lists.wikimedia.org/postorius/lists/wikitech-l.lists.wikimedia.org/

[Wikitech-l] Re: Use case for sha1 in revisions

2023-03-23 Thread Gergő Tisza
On Wed, Mar 22, 2023 at 11:06 PM Brian Wolff  wrote:

> This kind of sounds like a non-answer, but its mostly useful if you want a
> hash of the revision. I dont think mw core really uses it, but it can be
> useful for quickly detecting duplicate revisions. I think primarily it is
> for external users.
>

Core does duplicate detection (when so configured) for adding the revert /
reverted change tags.

On Thu, Mar 23, 2023 at 4:03 AM Vi to  wrote:

> Afair this avoids a new rev to be createad if you click "save" without
> changing contents.
>

That actually uses to slot sha1 now (I guess as a micro-optimization
because that way you don't need to re-hash slots which weren't edited).
___
Wikitech-l mailing list -- wikitech-l@lists.wikimedia.org
To unsubscribe send an email to wikitech-l-le...@lists.wikimedia.org
https://lists.wikimedia.org/postorius/lists/wikitech-l.lists.wikimedia.org/

[Wikitech-l] Re: Use case for sha1 in revisions

2023-03-23 Thread Bináris
Vi to  ezt írta (időpont: 2023. márc. 23., Cs,
12:03):

> Afair this avoids a new rev to be createad if you click "save" without
> changing contents.
>

Great! Thx.
___
Wikitech-l mailing list -- wikitech-l@lists.wikimedia.org
To unsubscribe send an email to wikitech-l-le...@lists.wikimedia.org
https://lists.wikimedia.org/postorius/lists/wikitech-l.lists.wikimedia.org/

[Wikitech-l] Re: Use case for sha1 in revisions

2023-03-23 Thread Vi to
Afair this avoids a new rev to be createad if you click "save" without
changing contents.

Vito

Il giorno gio 23 mar 2023 alle ore 11:35 Bináris  ha
scritto:

> Thanks!
>
> Brian Wolff  ezt írta (időpont: 2023. márc. 23., Cs,
> 7:06):
>
>> This kind of sounds like a non-answer, but its mostly useful if you want
>> a hash of the revision. I dont think mw core really uses it, but it can be
>> useful for quickly detecting duplicate revisions. I think primarily it is
>> for external users.
>>
>> --
>> Brian
>>
>> On Wednesday, March 22, 2023, Bináris  wrote:
>>
>>> Hi,
>>> can someone please tell me a use case for sha1 in revisions?
>>> https://www.mediawiki.org/wiki/API:Revisions
>>>
>>> (Of course, I tried first on talk page.)
>>> --
>>> Bináris
>>>
>> ___
>> Wikitech-l mailing list -- wikitech-l@lists.wikimedia.org
>> To unsubscribe send an email to wikitech-l-le...@lists.wikimedia.org
>>
>> https://lists.wikimedia.org/postorius/lists/wikitech-l.lists.wikimedia.org/
>
>
>
> --
> Bináris
> ___
> Wikitech-l mailing list -- wikitech-l@lists.wikimedia.org
> To unsubscribe send an email to wikitech-l-le...@lists.wikimedia.org
> https://lists.wikimedia.org/postorius/lists/wikitech-l.lists.wikimedia.org/
___
Wikitech-l mailing list -- wikitech-l@lists.wikimedia.org
To unsubscribe send an email to wikitech-l-le...@lists.wikimedia.org
https://lists.wikimedia.org/postorius/lists/wikitech-l.lists.wikimedia.org/

[Wikitech-l] Re: Use case for sha1 in revisions

2023-03-23 Thread Bináris
Thanks!

Brian Wolff  ezt írta (időpont: 2023. márc. 23., Cs,
7:06):

> This kind of sounds like a non-answer, but its mostly useful if you want a
> hash of the revision. I dont think mw core really uses it, but it can be
> useful for quickly detecting duplicate revisions. I think primarily it is
> for external users.
>
> --
> Brian
>
> On Wednesday, March 22, 2023, Bináris  wrote:
>
>> Hi,
>> can someone please tell me a use case for sha1 in revisions?
>> https://www.mediawiki.org/wiki/API:Revisions
>>
>> (Of course, I tried first on talk page.)
>> --
>> Bináris
>>
> ___
> Wikitech-l mailing list -- wikitech-l@lists.wikimedia.org
> To unsubscribe send an email to wikitech-l-le...@lists.wikimedia.org
> https://lists.wikimedia.org/postorius/lists/wikitech-l.lists.wikimedia.org/



-- 
Bináris
___
Wikitech-l mailing list -- wikitech-l@lists.wikimedia.org
To unsubscribe send an email to wikitech-l-le...@lists.wikimedia.org
https://lists.wikimedia.org/postorius/lists/wikitech-l.lists.wikimedia.org/