Page MenuHomePhabricator

Restore resolved security-team-reviews tasks
Closed, ResolvedPublic

Description

I'm just noticing that some (all?) of the older, resolved Application Security Reviews (née security-team-reviews) no longer exist? e.g. this recently-resolved review:

T239778: Security review of banner with FB and Twitter share buttons

It would be nice to restore these, if possible, as I know old reviews are sometimes referenced both in Phab and on-wiki, and I also personally find it handy to reference past reviews for any number of reasons.

Event Timeline

gotcha, I'll see what can be done

@sbassett do you happen to have more examples at hand?

I get Unhandled Exception: You must use withSourcePHIDs() to query edges.
Is that also what you see? Please always include error messages in bug reports.

(Plus curious which steps were performed here that led to this...)

Edit: Ah, this task seems to be about project tags on tasks. Sorry! I had T242186 in mind.

@chasemp: I can't seem to reproduce the exception. Can you explain what happened? I'd like to fix move_project as that's something we use quite often and I don't want to run into this same issue next time I move some projects.

Quotes from T242032: make security-team-reviews a subproject of security-team-services

tldr The beginning of this is I attempted T242032: make security-team-reviews a subproject of security-team-services with move_project. It did move the project to be a subproject of Security-Team-Services, but the workboard failed to load. After some debugging my thought was even with tinkering to address the issue I'm never going to feel good I didn't miss something. Better to set up another project and leave #deprecated-security-team-review alone for debugging.


Then updates noted in another task to fix things up...

I had to do some switcharoo project stuff

@chasemp: I wonder what that means and if it might have led to T242186. Or not.

Translation of I had to do some switcharoo project stuff is mass bulk add of a temp project to do a rename to the original projects name because the move_project execution ate the workboard. The move_project command executed was:

Well unf I think the script is a bit stale and/or I did something janky but either way the workboard is currently nuked and I'll have to fix it up. Not a big deal but fyi.

phab1001:/srv/phab/phabricator/bin# ./move_project --child Security-Team-Reviews --parent Security-Team-Services --keep-members child --subproject

Done.

Then:

@sbassett discovered any task with the old project was failing to load (I assume as workboard status lookup was failing) and reported T242163: Restore resolved security-team-reviews tasks which I addressed by essentially having the same thought as @Aklapper in https://phabricator.wikimedia.org/T242186#5785785 to mass remove and add the new project on closed tasks (which i had done on open tasks already)

All in all noisy and messy, and my apologies. I think all is settled now, other than what the heck happened to the workboard at https://phabricator.wikimedia.org/project/view/944/

Meh. Even though https://phabricator.wikimedia.org/maniphest/query/iOXFoS3DwML3/#R seems to indicate that no task has the deprecated-security-team-reviews tag anymore, at least one related task can no longer be reached with the same error: T216692: Security review for WikibaseSchema 😕

Meh. Even though https://phabricator.wikimedia.org/maniphest/query/iOXFoS3DwML3/#R seems to indicate that no task has the deprecated-security-team-reviews tag anymore, at least one related task can no longer be reached with the same error: T216692: Security review for WikibaseSchema 😕

Thanks for pointing that out. I'm not sure what the deal is atm.

@mmodell any wisdom here would be appreciated

Ok was security-team-reviews previously a subproject of something? I don't think the breakage was related to the workboard, it's related to the project graph which somehow wound up empty. Specifically $all_sources is empty at rPHAB /src/applications/project/query/PhabricatorProjectQuery.php:303 presumably because phabricator can't find any reachable ancestors for the project in getAllReachableAncestors at rPHAB /src/applications/project/query/PhabricatorProjectQuery.php:761 ... Most likely root cause, the project doesn't have a parent project phid, therefore $project->getParentProjectPHID() returns null at line 773

Ok was security-team-reviews previously a subproject of something?

The original #security-team-reviews which is now https://phabricator.wikimedia.org/project/view/944/ was not a subproject of anything prior to my knowledge. I was out for a bit there so it's possible but I can't find a task to indicate that was done in the past

I don't think the breakage was related to the workboard, it's related to the project graph which somehow wound up empty. Specifically $all_sources is empty at rPHAB /src/applications/project/query/PhabricatorProjectQuery.php:303 presumably because phabricator can't find any reachable ancestors for the project in getAllReachableAncestors at rPHAB /src/applications/project/query/PhabricatorProjectQuery.php:761 ... Most likely root cause, the project doesn't have a parent project phid, therefore $project->getParentProjectPHID() returns null at line 773

oh interesting

@chasemp - Just checked a bunch of my old reviews and all of them look fine now. Hopefully we can figure out all of the weird edge-case ones that are still vanished into the aether.

Meh. Even though https://phabricator.wikimedia.org/maniphest/query/iOXFoS3DwML3/#R seems to indicate that no task has the deprecated-security-team-reviews tag anymore, at least one related task can no longer be reached with the same error: T216692: Security review for WikibaseSchema 😕

Thanks for pointing that out. I'm not sure what the deal is atm.

@mmodell did anything point to why this task is still hosed?

T216992 renders for me without problems; looks like all fixed to me? (And huge thanks for everybody's help sorting this out)

T216992 renders for me without problems; looks like all fixed to me? (And huge thanks for everybody's help sorting this out)

indeed, all seems well?

The problem was caused by the sub-subprojects which had a projectPath which didn't get updated by the move script. I fixed the projects manually with the following sql:

update project set projectPath='iCi8GLzD7Eds' where id='3782' limit 1;
update project set projectPath='iCi8GLzD5p8C' where id='3781' limit 1;

I intend to fix the move_project script so that it handles rewriting the projectPath column properly.