storj / changesetchihuahua

Provide notifications of Gerrit activity to Slack
Apache License 2.0
0 stars 0 forks source link

"<updater name> added <reviewer name> as a reviewer on change <change>" messages mention only the last reviewer #1

Open amwolff opened 2 years ago

amwolff commented 2 years ago

Recently, Changeset Chihuahua Gerrit->Slack integration started to mention only the last reviewer in the length of reviewers added. It's probably easier to explain this with an example:

I added two distinct reviewers on a change, including Sean. Here's what it looks like in the Slack channel:

Artur M. Wolff added Sean Harvey as a reviewer on change [gateway-mt@6799] [{mod,pkg}: bump storj.io/gateway](https://review.dev.storj.io/c/storj/gateway-mt/+/6799)
Artur M. Wolff added Sean Harvey as a reviewer on change [gateway-mt@6799] [{mod,pkg}: bump storj.io/gateway](https://review.dev.storj.io/c/storj/gateway-mt/+/6799)
thepaul commented 2 years ago

Thanks for the bug report! I thought this was going to be an easy one to fix, with all the debug logs I keep, but it's proving to be quite a mystery.

The history shown in Gerrit agrees with you: at 2022-02-03T19:14:33Z, you added Sean and Bill as reviewers on gateway-mt@6799 at the same time.

But here are the only relevant Gerrit events received by the changeset chihuahua daemon:

At 2022-02-03T19:14:37.935Z:

{"reviewer":{"name":"Sean Harvey","email":"sean@storj.io","username":"halkyon"},"adder":{"name":"Artur M. Wolff","email":"artur@storj.io","username":"amwolff"},"patchSet":{"number":1,"revision":"6f346ff1885926931f495e85e4dfa6150aba70f3","parents":["801eaae827ba714feffacf5236b72ffbe83bec02"],"ref":"refs/changes/99/6799/1","uploader":{"name":"Artur M. Wolff","email":"artur@storj.io","username":"amwolff"},"createdOn":1643915443,"author":{"name":"Artur M. Wolff","email":"artur@storj.io","username":"amwolff"},"kind":"REWORK","sizeInsertions":243,"sizeDeletions":323},"change":{"project":"storj/gateway-mt","branch":"main","id":"Ia1d5c89172152cd9f2932f310cb733233ded5958","number":6799,"subject":"{mod,pkg}: bump storj.io/gateway","owner":{"name":"Artur M. Wolff","email":"artur@storj.io","username":"amwolff"},"url":"https://review.dev.storj.io/c/storj/gateway-mt/+/6799","commitMessage":"{mod,pkg}: bump storj.io/gateway\n\nThis change bumps storj.io/gateway to slurp the updated underlying MinIO\nand other new changes. As expected, the existing code required some\nadjustments.\n\nDepends on https://review.dev.storj.io/c/storj/gateway/+/6787.\n\nChange-Id: Ia1d5c89172152cd9f2932f310cb733233ded5958\n","createdOn":1643915443,"status":"NEW"},"project":{"name":"storj/gateway-mt"},"refName":"refs/heads/main","changeKey":{"key":"Ia1d5c89172152cd9f2932f310cb733233ded5958"},"type":"reviewer-added","eventCreatedOn":1643915674}

Then at 2022-02-03T19:14:39.036Z:

{"reviewer":{"name":"Sean Harvey","email":"sean@storj.io","username":"halkyon"},"adder":{"name":"Artur M. Wolff","email":"artur@storj.io","username":"amwolff"},"patchSet":{"number":1,"revision":"6f346ff1885926931f495e85e4dfa6150aba70f3","parents":["801eaae827ba714feffacf5236b72ffbe83bec02"],"ref":"refs/changes/99/6799/1","uploader":{"name":"Artur M. Wolff","email":"artur@storj.io","username":"amwolff"},"createdOn":1643915443,"author":{"name":"Artur M. Wolff","email":"artur@storj.io","username":"amwolff"},"kind":"REWORK","sizeInsertions":243,"sizeDeletions":323},"change":{"project":"storj/gateway-mt","branch":"main","id":"Ia1d5c89172152cd9f2932f310cb733233ded5958","number":6799,"subject":"{mod,pkg}: bump storj.io/gateway","owner":{"name":"Artur M. Wolff","email":"artur@storj.io","username":"amwolff"},"url":"https://review.dev.storj.io/c/storj/gateway-mt/+/6799","commitMessage":"{mod,pkg}: bump storj.io/gateway\n\nThis change bumps storj.io/gateway to slurp the updated underlying MinIO\nand other new changes. As expected, the existing code required some\nadjustments.\n\nDepends on https://review.dev.storj.io/c/storj/gateway/+/6787.\n\nChange-Id: Ia1d5c89172152cd9f2932f310cb733233ded5958\n","createdOn":1643915443,"status":"NEW"},"project":{"name":"storj/gateway-mt"},"refName":"refs/heads/main","changeKey":{"key":"Ia1d5c89172152cd9f2932f310cb733233ded5958"},"type":"reviewer-added","eventCreatedOn":1643915674}

(The two events are the same.)

I really don't want to say it's Gerrit's fault when it's way more likely to be my own error, but I'm having a hard time seeing how that could happen. Do you know of any other instances of this problem happening?

thepaul commented 1 year ago

After looking into this more, it’s definitely a Gerrit bug. Looking into fixing it on the Java side.