| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
Introduces JobFactory
Bug: T245900
Change-Id: I094cc9325e5eaf2717ae510ef988a72407195224
|
|
|
|
|
|
|
|
|
| |
This reverts commit 2bdc0b2b7209441a42a784157633a8a01b321922.
Reason for revert: T166010#8349431
Bug: T166010
Change-Id: Idcd3025647aec99532f5d69b9c1718c531761283
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Moving:
- DerivativeRequest
- FauxRequest
- FauxRequestUpload
- PathRouter
- WebRequest
- WebRequestUpload
Bug: T166010
Change-Id: I5ea70120d745f2876ae31d039f3f8a51e49e9ad8
|
|
|
|
|
|
|
| |
This is really hard to read. What is code, what is string? These
places are so simple, they really don't need the "{$var}" syntax.
Change-Id: I589dedb8c0193eec4eef500bbb896b5b790b727b
|
|
|
|
|
|
|
| |
Seen in RefreshSecondaryDataUpdateTest::testEnqueueOnFailure()
Bug: T289926
Change-Id: I22eb808ab27e702033c4df05ec299554f944590b
|
|
|
|
|
|
|
|
| |
Part 1, proof of concept. Hundreds of files left to go. These changes
brought to you in large part by vim macros.
Bug: T305805
Change-Id: I44789091e9f6394c800a11b29f22528c8dcacf71
|
|
|
|
| |
Change-Id: Icdb301d352d302f70fefba9b40df2368cb217fd2
|
|
|
|
|
|
|
|
|
|
|
|
| |
Automatically refactors wg prefixed globals to use MediaWikiServices config using Rector. Doesn't include files that set globals or files that fail CI.
Rector Gist: https://gist.github.com/tchin25/7cc54f6d23aedef010b22e4dfbead228
* This patch uses a modified source code rector library for our specific use case and the rector will have different effects without it.
A writeup for future reference is here: https://meta.wikimedia.org/wiki/User:TChin_(WMF)/Using_Rector_On_MediaWiki
Change-Id: I1a691f01cd82e60bf41207d32501edb4b9835e37
|
|
|
|
| |
Change-Id: Icaea2b6665cfc3b811d94f70c93452237f5e72bf
|
|
|
|
| |
Change-Id: I8d8407d704eac97d4b0574369e315e28e23a89a8
|
|
|
|
| |
Change-Id: I2f374169f2b55a7be03507ce1f1c838428b56b75
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
For compliance with the new version of the table interface policy
(T255803).
This patch was created by an automated search & replace operation
on the includes/ directory.
Bug: T257789
Change-Id: Ie32c1b11b3d16ddfc0c83a757327d449ff80b2e4
|
|\ \ |
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
For compliance with the new version of the table interface policy
(T255803).
This patch was created by an automated search & replace operation
on the includes/ directory.
Bug: T257789
Change-Id: If560596f5e1e0a3da91afc36e656e7c27f040968
|
|/
|
|
|
|
|
|
|
|
|
| |
For compliance with the new version of the table interface policy
(T255803).
This patch was created by an automated search & replace operation
on the includes/ directory.
Bug: T257789
Change-Id: I5ffbb91882ecce2019ab644839eab5e8fb8a1c5f
|
|
|
|
|
|
|
| |
This marks some base classes as stable for subclassing.
Bug: T247862
Change-Id: I7b77075849aa40960f2486b463e498a3ea8058e9
|
|
|
|
|
|
|
|
|
|
|
| |
PHP doesn't care much but I think we humans do because we should
call methods by the name we give them. Method fixed are;
- isOk() -> isOK()
- setOk() -> setOK()
- teardown() -> tearDown()
Change-Id: I6b3f0cf3902887058efa426968da380803869e0b
|
|
|
|
| |
Change-Id: I156411062ae7831c935869d226fc4934bde55107
|
|
|
|
|
|
|
|
| |
The Job::factory method throws an InvalidArgumentException if a given
job specification is invalid. The error message for this exception was
worded in correctly. This patch improves the message to avoid confusion.
Change-Id: I6cab739263c1d3530c0650823db022dd5a4b60bc
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Remove duplicate $params check from Job::factory done in Job::__construct.
* In Job::factory(), restore use of a valid title as default for passing as
constructor arg to old job classes. Their constructor may expect it to
be valid.
Keep the invalid dummy in Job::__construct, and document why.
* tests: Update test case for failure mode when using Job::factory
with a class that requires a title. It asserted getting an invalid
title. This now restores the behaviour prior to fc5d51f12936ed,
which is that job classes that require a title, get a valid one.
* tests: Remove test case for testToString that used
an explicitly passed but invalid params value. I've converted
that to expect the exception we now throw instead.
* tests: Update getMockJob(), also used by testToString, which was
relying on undocumented behaviour that 'new Title' is public
and gets namespace=0 and title=''. Before fc5d51f12936ed,
title params weren't in toString() and it asserted outputting
three spaces (delimiter, empty string from formatted title,
delimiter).
In fc5d51f12936ed, this changed to asserting "Special:" which
seems unintentional as we didn't pass it the internally reserved
NS_SPECIAL/'' value, and yet was caught by the dbkey=='' check.
Given this test case doesn't deal with titles, omit it for now.
A job can either have a $title and title/namespace in params,
or neither. This test was asserting an in-memory scenario
where $title can be an object, but title/namespace absent from
params.
Bug: T221368
Depends-On: I89f6ad6967d6f82d87a62c15c0dded901c51b714
Change-Id: I2ec99a12ecc627359a2aae5153d5d7c54156ff46
|
|
|
|
|
|
|
|
|
|
| |
Simplify the code of jobs that do not care about titles and removes
the direct Title dependency from JobQueue. Remove getTitle() from
IJobSpecification itself. Move all the Job::factory calls into a
single JobQueue::factoryJob() method.
Depends-on: Iee78f4baeca0c0b4d6db073f2fbcc56855114ab0
Change-Id: I9c9d0726d4066bb0aa937665847ad6042ade13ec
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Follows-up 9b4938c40d02c, 4bff6f1558, and 766549999c.
It seems despite being optional and documented as 'array|Title',
Phan still thinks it is wrong to pass Title.
Try removing the explicit default of empty array,
the lower code already does this anyway.
This should fix build failures that are preventing merges
in repos where Phan is finding Job::__construct(string, Title)
where it currently fails as follows:
CompileArticleMetadataJob.php:11
PhanTypeMismatchArgument Argument 2 (params) is …\Title|string but
\Job::__construct() takes array
Change-Id: I1c3aee273e0917e30b9c18b49b24fc7f966ff57c
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Follows-up 9b4938c40d02c, and 4bff6f1558. The latter of which
updated ::factory() instead of __construct(). Oops.
This should fix build failures that are preventing merges
in repos where Phan is finding Job::__construct(string, Title)
where it currently fails as follows:
CompileArticleMetadataJob.php:11
PhanTypeMismatchArgument Argument 2 (params) is …\Title|string but
\Job::__construct() takes array
As Phan is reading the php doc I guess.
Change-Id: I128d57ead6bcb9dbae99d41a1f23192c3f6fbdba
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Follows-up 9b4938c40d02c.
This should fix build failures that are preventing merges
in repos where Phan is finding Job::__construct(string, Title)
where it currently fails as follows:
CompileArticleMetadataJob.php:11
PhanTypeMismatchArgument Argument 2 (params) is …\Title|string but
\Job::__construct() takes array
As Phan is reading the php doc I guess.
Change-Id: I94b442f06b6858d136546bf22f2465cf8f071ab0
|
|
|
|
| |
Change-Id: I3a97008d324f600a1c9f6005673073277ee564fa
|
|\ |
|
| |
| |
| |
| | |
Change-Id: I7d32edd5913e12a3380ca9f7f5a318e1682725bf
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
| |
Remove the $title argument from these methods to simplify subclasses that
do not have a meaningful title to use. The Job::getTitle() method can be
overriden by subclasses to return something meaningful.
The old call signature is still supported for backwards compatibility.
This will automatically determine what getTitle() returns as before.
Use "Blankpage" as the "not applicable" title for jobs instead of one
that looks like some error occured.
Change-Id: I3d5bd012d9cef1e7daaccfb0d5d319552eb89fb6
|
|
|
|
| |
Change-Id: I9a85562b205db604d2746ec5db0e72dacdb93c6d
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Find: /isset\(\s*([^()]+?)\s*\)\s*\?\s*\1\s*:\s*/
Replace with: '\1 ?? '
(Everywhere except includes/PHPVersionCheck.php)
(Then, manually fix some line length and indentation issues)
Then manually reviewed the replacements for cases where confusing
operator precedence would result in incorrect results
(fixing those in I478db046a1cc162c6767003ce45c9b56270f3372).
Change-Id: I33b421c8cb11cdd4ce896488c9ff5313f03a38cf
|
|
|
|
|
| |
Bug: T179624
Change-Id: I0d78a926c8c513fd652a424e8a51ded20e524a4a
|
|
|
|
|
|
|
|
|
| |
The replaces the hacky use of onTransactionIdle(), which no longer runs
immediately in explicit transaction rounds since d4c31cf841.
Also clarified TransactionRoundDefiningUpdate comment about rounds.
Change-Id: Ie17eacdcaea4e47019cc94e1c7beed9d7fec5cf2
|
|
|
|
| |
Change-Id: I5b653a3dacd6dc73a80b6bbcc282fdd5dad6e49a
|
|
|
|
|
|
|
|
|
|
|
|
| |
$wgJobClasses can now specify a factory function for creating a job,
instead of a class to be instantiated directly. This makes it possible
to inject services in a job constructor, and register a factory function
that calls the constructor with default services.
This follows Ieb85493a7765 and Ia2107dc5af78, which introduced factory
functions for API modules and special pages.
Change-Id: I0461e59da2a8fa6681e3b1fcdfc38bfed7f3ac32
|
|
|
|
| |
Change-Id: Icf2e03efcfd9232fe4ead776096b61cef1c06141
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We currently push a request id into structured logging (monolog/
logstash) to allow seeing all logs that were triggered by the same
request. This extends that to pass the id through jobs so jobs triggered
by a web request also share the same id and can be tracked together.
This web request id will follow jobs both directly created by a request,
and jobs created by those jobs.
This should give us some more visibility when debugging into what
started a particular job, and if a large number of jobs blowing up the
job queue are somehow related.
Change-Id: Iedbd031e6e9bb18fd6f7b923c8c305102255ab4b
|
|
|
|
|
|
| |
Previously it would result in array(x) in fairly simple cases.
Change-Id: I6bfe67faa45835babb2c7e259b5cd158e0f0a649
|
|\ |
|
| |
| |
| |
| |
| | |
Bug: T126450
Change-Id: I8a6588209647252a4509078aaa7bf0cb1d9d299a
|
|/
|
|
|
|
|
|
|
|
| |
Per wikitech-l consensus:
https://lists.wikimedia.org/pipermail/wikitech-l/2016-February/084821.html
Notes:
* Disabled CallTimePassByReference due to false positives (T127163)
Change-Id: I2c8ce713ce6600a0bb7bf67537c87044c7a45c4b
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Focus on updating links that would *not* already be updated
by jobs, not those that already *will* be updated.
* Place the jobs into a dedicated queue so they don't wait
behind jobs that actually have to parse every time. This
helps avoid queue buildup.
* Make Job::factory() set the command field to match the value
it had when enqueued. This makes it easier to have the same
job class used for multiple queues.
* Given the above, remove the RefreshLinksJob 'prioritize' flag.
This worked by overriding getType() so that the job went to a
different queue. This required both the special type *and* the
flag to be set if using JobSpecification or either ack() would
route to the wrong queue and fail or the job would go in the
regular queue. This was too messy and error prone. Cirrus jobs
using the same pattern also had ack() failures for example.
Change-Id: I5941cb62cdafde203fdee7e106894322ba87b48a
|
|
|
|
|
|
|
| |
* The delay time should not count
Bug: T102743
Change-Id: I9e8b1f33b65681fd9f4f667233bce280bf6f227d
|
|\ |
|
| |
| |
| |
| |
| |
| | |
* This makes lazyPush() simple to use in more cases
Change-Id: I22e74485eaf3120e5669c5ee55dc7ab7310d7300
|
|/
|
|
|
| |
Bug: T101054
Change-Id: I5dc13d79a5ec2e8cb6679e3ff2535b5cb031ca30
|
|
|
|
| |
Change-Id: I4b4e4e38e8d416c3445c52ced311f5fbfcde868a
|
|
|
|
| |
Change-Id: Id23cc987b3f1e23b35b0eedbfc5c9978774a0ebd
|
|
|
|
| |
Change-Id: If42b982ac339cc6aaf56ef2ed6c78867b83d2e56
|
|
|
|
|
|
| |
* This means that redis job UUIDs now show up in these places
Change-Id: Icea168de7e1590bfe275646bc2ccbb7151f032ae
|