Page MenuHomePhabricator

[Bug] SonarQube bot is not working for push-notifications service
Closed, ResolvedPublic

Description

Steps to Reproduce

  1. Submit a patch
  2. See that scan is working fine for revision-patchset in https://sonarcloud.io/dashboard?id=mediawiki-services-push-notifications

Expected Results

  • After the scan is complete the SonarQube bot should comment in the gerrit patch

Actual Results

  • SonarQube does not comment in the gerrit patch

Additional notes

  • @kostajh identified that the bot is getting 400 status when attempting to post the comment [1]
[2020-07-22T07:48:14.710609+00:00] app.ERROR: HTTP/1.1 400 Bad Request returned for "https://gerrit.wikimedia.org/r/a/changes/mediawiki%2Fservices%2Fpush-notifications~604830/revisions/23/review". [] []

[1] https://gerrit.wikimedia.org/r/c/mediawiki/services/push-notifications/+/604830/29#message-f5f0929947d6f9f0ec3ee6bdc2c2cd00cbfde325

Event Timeline

MSantos created this task.Aug 4 2020, 7:23 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptAug 4 2020, 7:23 PM
MSantos triaged this task as Medium priority.Aug 5 2020, 12:07 PM

@thcipriani @hashar is it possible that there is some more detail in the Gerrit logs that would explain what is wrong with the POST request?

I don't see anything in the gerrit error log for the date in question afaict; which makes sense for 400-level error to me.

More recent patchsets seem to have comment from sonarqubebot: https://gerrit.wikimedia.org/r/c/mediawiki/services/push-notifications/+/621031/1#message-cb9a227b2a11eaf214d49daedc3a09a68645edbe

Did this already get resolved?

kostajh closed this task as Resolved.Aug 19 2020, 7:56 AM
kostajh claimed this task.

Hmm, I didn't change anything in the Sonarqubebot code. There are a fair number of "400 Bad Request" errors in the logs for various repositories (161, although there are some duplicates there due to additional logging I added). I guess we can close this and reopen if the problem becomes reproducible again.

There are a few errors 400 in the Apache access log around 2020-07-22T07:48:14, though nothing matching that specific URL. So yeah that is a mystery :-\