Commit 4c3be22
Lowercase ACL name in create_repos to match Hipster
Summary:
Hipster auto-lowercases ACL names on write but Mononoke's per-permission
push-time check is case-sensitive against the ACL name stored on the
repo. Without normalization, a repo whose name contains uppercase
characters ends up configured with an ACL name no live Hipster entry
matches, breaking every push that requires a permission grant.
Concrete failure caught this in production: XF-APAC GitHub-to-Mononoke
mirror sync, 2026-06-24 16:37–16:44 UTC (4 retries, ~62 min wall-clock
on the longest one). The repos were freshly created via
`scsc create-repos XF-APAC/dreamwright-v2 XF-APAC/storykit-mono`, the
Mononoke repo configs got `custom_acl_name="repos/git/XF-APAC"`, but
the live Hipster entry was `repos/git/xf-apac` (Hipster always
lowercases on `acl.create`). `gitimport --bypass-all-hooks` failed with
invalid request: In order to use BYPASS_ALL_HOOKS pushvar one needs
to be member of the scm group OR have access to write_no_hooks
action on repo ACL
even though `SANDCASTLE_TAG:scm_github_mirror_sync` was correctly
granted `write_no_hooks` on the (lowercase) ACL.
par-msl (the first mirror-sync tenant) was unaffected only because
`par-msl` is already entirely lowercase, so the bytes matched by
coincidence. Any tenant with mixed-case org slug would have hit this
on day one, but XF-APAC is the first such tenant we onboarded.
This diff lowercases the slug in both
`make_full_acl_name_from_repo_name` and
`make_top_level_acl_name_from_repo_name` so Mononoke stores the same
bytes Hipster does, regardless of how the org slug is cased on
github.com. The fix is forward-only — existing repos with uppercase
characters in `custom_acl_name` need their stored config updated
separately (XF-APAC's two repos will be patched manually in
configerator before this lands).
Reviewed By: YousefSalama
Differential Revision: D109585065
fbshipit-source-id: a13e51a2aa2e899f28b4f2f2894bf82c7b5dd2cc1 parent 7213fa7 commit 4c3be22
1 file changed
Lines changed: 75 additions & 2 deletions
Lines changed: 75 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
321 | 321 | | |
322 | 322 | | |
323 | 323 | | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
324 | 344 | | |
325 | | - | |
| 345 | + | |
326 | 346 | | |
327 | 347 | | |
328 | 348 | | |
| |||
332 | 352 | | |
333 | 353 | | |
334 | 354 | | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
335 | 358 | | |
336 | | - | |
| 359 | + | |
337 | 360 | | |
338 | 361 | | |
339 | 362 | | |
| |||
1354 | 1377 | | |
1355 | 1378 | | |
1356 | 1379 | | |
| 1380 | + | |
| 1381 | + | |
| 1382 | + | |
| 1383 | + | |
| 1384 | + | |
| 1385 | + | |
| 1386 | + | |
| 1387 | + | |
| 1388 | + | |
| 1389 | + | |
| 1390 | + | |
| 1391 | + | |
| 1392 | + | |
| 1393 | + | |
| 1394 | + | |
| 1395 | + | |
| 1396 | + | |
| 1397 | + | |
| 1398 | + | |
| 1399 | + | |
| 1400 | + | |
| 1401 | + | |
| 1402 | + | |
| 1403 | + | |
| 1404 | + | |
| 1405 | + | |
| 1406 | + | |
| 1407 | + | |
| 1408 | + | |
| 1409 | + | |
| 1410 | + | |
| 1411 | + | |
| 1412 | + | |
| 1413 | + | |
| 1414 | + | |
| 1415 | + | |
| 1416 | + | |
| 1417 | + | |
| 1418 | + | |
| 1419 | + | |
| 1420 | + | |
| 1421 | + | |
| 1422 | + | |
| 1423 | + | |
| 1424 | + | |
| 1425 | + | |
| 1426 | + | |
| 1427 | + | |
| 1428 | + | |
| 1429 | + | |
1357 | 1430 | | |
1358 | 1431 | | |
1359 | 1432 | | |
| |||
0 commit comments