Page MenuHomePhabricator

Emails sent for historical commits when importing repo to Diffusion
Closed, ResolvedPublic

Description

This is a strange issue. But essentially, we import a repo with notifications disabled but with some repo's users still get emails for historical activity.

Our noted reproduce steps by the gent doing the imports:

https://phabricator.wikimedia.org/T78154#960491

Repository we have noted this behavior with: https://phabricator.wikimedia.org/diffusion/UINF/

Example user who has history in that repo who complained of email flood: https://phabricator.wikimedia.org/p/lcawte/

Example of their history: https://phabricator.wikimedia.org/diffusion/UINF/browse/master/lcawte

A user who has chosen to not receive emails for new commits via audit seems not to get these emails.

Thus:

https://phabricator.wikimedia.org/settings/panel/emailpreferences/ -> Audit -> "A commit is created" -> Ignore

This does keep them from being sent for that particular user.

Note we are still running Phab at commit 8bb390fecd0a849e9e45eb309ee9822d3f55fc60

Event Timeline

chasemp raised the priority of this task from to Needs Triage.
chasemp updated the task description. (Show Details)
chasemp added projects: Diffusion, Audit.
chasemp added a subscriber: chasemp.
chasemp updated the task description. (Show Details)Jan 7 2015, 7:35 PM
chasemp added a project: Wikimedia.

side note, we've imported some other repo's like https://phabricator.wikimedia.org/diffusion/OPUP/ and I have personally never gotten an email for my historical activity. So it's some repos only? It has taken us a bit to find the common thread on this.

Is it possible that the affected repos are being imported by creating a new hosted repo and then pushing to it, versus using "Import existing repository"?

chasemp added a comment.EditedJan 7 2015, 11:36 PM

Is it possible that the affected repos are being imported by creating a new hosted repo and then pushing to it, versus using "Import existing repository"?

I don't think so but let's ask @WikiChad ?

Specifically, if you do that, the repo gets "imported" immediately and then the push is treated like new commits. We should probably fix/change that, but not sure if that's what is happening here.

Is it possible that the affected repos are being imported by creating a new hosted repo and then pushing to it, versus using "Import existing repository"?

I don't think so but let's ask @WikiChad ?

I don't believe so, especially least not when creating it via the web UI. I did do a bunch of these via Conduit so perhaps the common piece here?

Note: A user reported receiving the same types of emails form this repo https://phabricator.wikimedia.org/diffusion/EVED/

https://phabricator.wikimedia.org/diffusion/EVED/

@WikiChad, could you share your conduit script? Could we maybe try EVED both ways (web UI and conduit) with an affected user on board?

epriestley closed this task as Resolved.Mar 3 2015, 11:44 AM
epriestley claimed this task.

I believe this was fixed by rP8599145 and rPf6915a7. Specifically:

  • Some publishing rules were not very consistent about checking publishing configuration, importing status, or both. We are now more consistent.
  • New hosted repositories were immediately marked "Imported", which was technically correct but not consistent with user expectation if they then imported an existing repository by pushing a ton of commits. We now detect large pushes to empty repositories and treat them as imports of existing repositories (i.e., disable publishing actions).

Let us know if you're still seeing issues after upgrading past those changes?

See additional discussion in T6516. This is not fixed until D11964. The root issue is a discrepancy between the web and Conduit workflows which I missed until it did bad things.