Hello,
*TL;DR*
As part of our work on partial blocks, the Anti-Harassment Tools team has
been refactoring MediaWiki’s code related to blocking, including the Block
class. While “Block” still exists as an alias, extension developers and
anyone who works on code related to blocks should examine their code and
adjust accordingly. Please read further for more information.
*The reason*
With the introduction of partial blocks, and as a follow up to the previous
email we shared with this list several months ago, several cleanup efforts
were scheduled. One of our major tasks involved making sure that
restrictions of overlapping blocks are merged on enforcement[0]. To add
this type of functionality to the large block class in a way that would be
maintainable and extendable going forward, we found it necessary to do some
refactoring.
*Introducing a BlockManager service*
The first piece of cleanup work was the creation and addition of a
BlockManager class[1][2], which is responsible for managing the blocks that
apply to a user, considering that multiple blocks may impact the same user
- e.g. if the user is in a blocked (or partially blocked) IP range as well
as having a separate block (or partial block) on their user account or IP
address.
This work has so far involved moving several methods from the User and
(formerly) Block classes into the BlockManager. The User class uses the
BlockManager to get the correct state of a specific block and its
restrictions.
*Refactoring Block into AbstractBlock, SystemBlock, and DatabaseBlock (and
adding MultipleBlock)*
In order for block restrictions and enforcement to be properly evaluated
even in cases where there may be multiple blocks that apply, the blocks
were split into three main types[3]:
* DatabaseBlock: These blocks are stored in the database. Most blocks are
DatabaseBlocks; most extensions that deal with blocks only deal with
DatabaseBlocks. Blocks obtained using `DatabaseBlock::newFrom*` (formerly
`Block::newFrom*`) are DatabaseBlocks.
* SystemBlock: These blocks are temporary, and created by the system on
enforcement (e.g. blocks against blacklisted IP addresses).
* CompositeBlocks: These are blocks that were created from multiple other
blocks[0]. Like SystemBlocks, these are created temporarily on enforcement,
and not saved.
All three classes inherit the new base class “AbstractBlock”.
“Block” is now an alias for the DatabaseBlock class, and should be
considered deprecated.
*Followup: How to update your code*
The team has followed up with code in production to correct type hinting
and the uses we’ve encountered that require changes.“Block” is still an
alias of the new DatabaseBlock class, so there is no urgency in changing
existing code dealing with DatabaseBlocks (and most blocks are
DatabaseBlocks), but code maintainers and extension developers should
correct the uses of any blocking behavior as necessary, and as fits their
products.
Here are general tips for approaching any changes you may want to make to
adhere to the new block features:
* Any use of static Block methods such as Block::newFrom* should be changed
to use DatabaseBlock
* Any use of the Block constructor should be changed to the SystemBlock or
DatabaseBlock constructor. If the block has the `$systemBlockType`
property, then it should be a SystemBlock. If it is saved to or loaded from
the database, it should be a DatabaseBlock. (In the vast majority of cases,
it will be DatabaseBlock.)
* Any typehint for Block that could be expecting more than one type of
block should be changed to AbstractBlock - e.g. a block returned from
methods that call User::getBlockedStatus could be any type of block. If
expecting a DatabaseBlock, then Block will work for now, but should be
updated to DatabaseBlock
As always, if you find any bugs, please submit a ticket and tag it against
“Anti-Harassment” tag and “MediaWiki-User-management” tag.
Thank you,
The Anti Harassment Tools Team
*References*
[0] Restrictions of overlapping blocks should be merged on enforcement
https://phabricator.wikimedia.org/T206163
[1] Introduce a BlockManager service for getting and combining the blocks
that apply to a user/IP https://phabricator.wikimedia.org/T219441
[2] Clean up code related to blocking
https://phabricator.wikimedia.org/T225011
[3] Refactor Block to AbstractBlock, DatabaseBlock and SystemBlock
https://phabricator.wikimedia.org/T222737
--
Moriel Schottlender (she/her)
Senior Software Engineer
Tech Lead | Community Tech and Anti Harassment Tools
Wikimedia Foundation https://wikimediafoundation.org/
Hello,
This is an announcement about a new installment of the Language Showcase, a
series of presentations about various aspects of language diversity and its
connection to Wikimedia Projects.
This new installment will deal with Machine Translation and how we are
seeing their use in Wikimedia projects.
This session is going to be broadcast over YouTube, and a recording will be
kept for later viewing. You can also participate in the conversation on IRC
or with us on the hangout. However, please do let us know earlier so that
we can send you a hangout invite.
Please read below for the event details, including local time, YouTube
links and do let us know if you have any questions.
Thank you!
Amir
== Details ==
# Event: Language Showcase #2
# When: June 26, 2019 (Wednesday) at 13:00 UTC (check local time
https://www.timeanddate.com/worldclock/fixedtime.html?iso=20190626T1300)
# Where:
https://www.youtube.com/watch?v=uG3eU1tohok
IRC - #wikimedia-office (on Freenode)
# Agenda:
The usage of Machine Translation in Wikimedia projects.
--
Amir Elisha Aharoni · אָמִיר אֱלִישָׁע אַהֲרוֹנִי
http://aharoni.wordpress.com
“We're living in pieces,
I want to live in peace.” – T. Moore
Hello,
The committee has finished selecting new members and the new committee
candidates are (In alphabetical order):
- Amir Sarabadani
- Lucie-Aimée Kaffee
- MusikAnimal
- Tonina Zhelyazkova
- Tony Thomas
And auxiliary members will be (In alphabetical order):
- Huji
- Matanya
- Nuria Ruiz
- Rosalie Perside
- Tpt
You can read more about the members in [0]
The changes are:
* Nuria and Rosalie are moving from main member to auxilary members
* MusikAnimal is moving from auxilary member to main
* Tonina Zhelyazkova is joining the main members
This is not the final structure. According to the CoC [1], the current
committee publishes the new members and call for public feedback for *six
weeks* and after that, the current committtee might apply changes to the
structure based on public feedback.
Please let the committee know if you have any concern regarding the members
and its structure until *19 June 2019* and after that, the new committee
will be in effect and will serve for a year.
[0]:
https://www.mediawiki.org/wiki/Code_of_Conduct/Committee/Members/Candidates
[1]:
https://www.mediawiki.org/wiki/Code_of_Conduct/Committee#Selection_of_new_m…
Amir, On behalf of the Code of Conduct committee
Best
---------- Forwarded message ---------
From: Aditya Jain <adi2007jain(a)gmail.com>
Date: Tue 18 Jun, 2019, 4:52 PM
Subject: Feedback regarding Hashtags tool's statistics page
To: <libraries(a)lists.wikimedia.org>, <1lib1ref(a)lists.wikimedia.org>, <
wikitech-l(a)lists.wikimedia.org>
Hashtag Search <https://hashtags.wmflabs.org/> is a tool that allows users
to search for uses of hashtags in Wikimedia edit summaries. As of now, the
functionalities of the tool are quite basic - Few simple search options are
provided and the results are listed with the option to download them as
CSV. Many Wikimedia campaigns such as 1Lib1Ref use this tool to track edits
and users might want to get into more details for a particular search.
Along with my mentor Sam Walton, I have been working on a GSoC project “Create
a subpage for statistics and charts related to hashtag search’’
<https://phabricator.wikimedia.org/T186706>. The aim of this project is to
create a subpage for helpful statistics and graphs related to the results
of a search.
After making some progress we have displayed the three primary graphs that
we were looking for - Top projects, Top users and edits over time. Users of
the tool can also download each of these statistics as CSV. They can also
view a complete list of editors and projects. We have setup a test instance
of the tool which you can find here: https://hashtags-staging.wmflabs.org/
After clicking on the above link a search form is provided where you can
search for a hashtag. Fill the form and make a search (You can also click
on one of the trending tags). Click on the “Show statistics” button in the
stats box. You will now arrive at the statistics page. Scroll the page to
see the graphs. You can also download the results as CSV. Search form is
also provided on the statistics page so that you could modify the search
directly.
Now we are trying to collect feedback from users of the tool so that we can
enhance the current functionality of the tool. Also we would love to know
what more statistics we could show on the subpage. If you have any
suggestions for us please let us know by commenting on my Pull Request:
https://github.com/WikipediaLibrary/hashtags/pull/31 or commenting on the
Phabricator for the project: https://phabricator.wikimedia.org/T218986.
Thanks,
Aditya
Hello,
I've set up the redisJobRunnerService and redisJobChronService from here:
https://github.com/wikimedia/mediawiki-services-jobrunner
They're working well and processing jobs as they should be, but I was
wondering if anyone knows of any documentation about the configuration
to fine-tune the prioritisation of various job types differently. All
I've really been able to find about the configuration is the README in
the repo.
Thanks,
Aran
Hello. At least ten hours the revisions watching database is blocked.
Reproducing steps:
1) Open the history of some page you have non-visited new revisions in your
watchlist.
2) Make sure you see green marks "updated since my last visit".
3) Open the page itself.
4) Go back to the history.
5) The green marks removed as expected.
6) Wait five minutes.
7) Refresh the history.
8) The marks are back.
The problem exists on some wikis, not all of them. For example, I can see
it on hewiki and can't on ruwiki. There is a possibility that hewiki is the
only one. Before I file a phab task, was there some anticipated database
blocking?
Thank you.
Igal (User:IKhitron)
Hi Community Metrics team,
This is your automatic monthly Phabricator statistics mail.
Accounts created in (2019-05): 272
Active Maniphest users (any activity) in (2019-05): 1036
Task authors in (2019-05): 563
Users who have closed tasks in (2019-05): 328
Projects which had at least one task moved from one column to another on
their workboard in (2019-05): 292
Tasks created in (2019-05): 2548
Tasks closed in (2019-05): 2149
Open and stalled tasks in total: 42273
Median age in days of open tasks by priority:
Unbreak now: 12
Needs Triage: 495
High: 867
Normal: 1091
Low: 1499
Lowest: 1464
(How long tasks have been open, not how long they have had that priority)
Active Differential users (any activity) in (2019-05): 10
TODO: Numbers which refer to closed tasks might not be correct, as
described in https://phabricator.wikimedia.org/T1003 .
Yours sincerely,
Fab Rick Aytor
(via community_metrics.sh on phab1003 at Wed Jun 19 08:27:43 UTC 2019)
Hello,
We have requested a 30 minutes read-only window for s4 (commonswiki) for
the 19th June from 05:00-05:30 UTC to switchover our primary commonswiki
database master - https://phabricator.wikimedia.org/T224516
db1068 is an old host that will be decommissioned (T217396) and which also
suffers from intermittent memory problems (T213664).
We are going to do this Wednesday 19th June from 05:00 to 05:30 AM UTC (we
do not expect to use the 30 minutes window, if everything goes as expected).
Impact: Writes will be blocked, reads will remain unaffected.
Communication will happen at #wikimedia-operations
If you are around at that time and want to help with the monitoring, please
join us!
Thanks
Manuel.