Page MenuHomePhabricator

Fix issues identified in CX publishing dashboard on Grafana
Closed, ResolvedPublic2 Estimated Story Points

Description

Event Timeline

For now i still can't find a match for the publish fail log in both logstash and grafana, probably i miss something

from the publish fail method, in some cases the error is from the captcha, we don't log an error event, it is possible that we track the publish fail in grafana but don't log the captcha errors

mw.cx.TargetArticle.prototype.publishFail = function ( errorCode, messageOrFailObjOrData, data, jqXHR ) {
	// ...

	// Event logging
	mw.hook( 'mw.cx.translation.publish.error' ).fire(
		this.sourceLanguage,
		this.targetLanguage,
		this.sourceTitle,
		this.getTargetTitle(),
		data
	);

        // ...

	const editResult = data.edit;
	// Handle captcha
	// Captcha "errors" usually aren't errors. We simply don't know about them ahead of time,
	// so we save once, then (if required) we get an error with a captcha back and try again after
	// the user solved the captcha.
	if ( editResult && editResult.captcha && (
		editResult.captcha.type === 'image' ||
		editResult.captcha.type === 'simple' ||
		editResult.captcha.type === 'math' ||
		editResult.captcha.type === 'question'
	) ) {
		this.loadCaptchaDialog().then( this.showErrorCaptcha.bind( this, editResult ) );
		return;
	}

	// ...
};

Change #1189437 had a related patch set uploaded (by Huei Tan; author: Huei Tan):

[mediawiki/extensions/ContentTranslation@master] CX: Reorder the event track for the Catcha "errors"

https://gerrit.wikimedia.org/r/1189437

Change #1189437 merged by jenkins-bot:

[mediawiki/extensions/ContentTranslation@master] CX: Do not log captcha errors as translation publish errors

https://gerrit.wikimedia.org/r/1189437

Question, here's the code

// Event logging
mw.hook( 'mw.cx.translation.publish.error' ).fire(
	this.sourceLanguage,
	this.targetLanguage,
	this.sourceTitle,
	this.getTargetTitle(),
	data
);

const editError = data.error;
if ( editError ) {
	this.handleEditError( editError );
	return;
}

// Handle (other) unknown and/or unrecoverable errors
this.showErrorUnknown( editResult, data, jqXHR );

Should we move the event logging to only "unknown error"? the handleEditError is the known error like blacklist/abusefilter/invalid title/bad token/etc

Change #1191658 had a related patch set uploaded (by Huei Tan; author: Huei Tan):

[mediawiki/extensions/ContentTranslation@master] Send event log for only unknown publish failure error

https://gerrit.wikimedia.org/r/1191658

Change #1191658 merged by jenkins-bot:

[mediawiki/extensions/ContentTranslation@master] CX: Log only unknown publish failures

https://gerrit.wikimedia.org/r/1191658

the number of publish failed event tracking number close to zero, this is what we expected.

image.png (1,630×1,018 px, 88 KB)

abi_ changed the point value for this task from 4 to 2.
abi_ moved this task from Need QA to Done on the LPL Essential (2025 Jul-Oct) board.

I think the current state looks good

image.png (2,560×1,758 px, 378 KB)