[07:47:00] Hi! I recently created a Developer account with UNIX username `kavaljeetsingh`. [07:47:01] My Wikimedia account is `Kavaljeet_Singh`. Gerrit and Phabricator work correctly, but when I try to join Toolforge I get: [07:47:01] "Wikimedia account 'Kavaljeet Singh' is already attached to another Developer account." [07:47:02] I don't remember creating any previous Developer account. Could someone help me identify the linked account or fix the account association? [08:00:54] Kavaljeet_Singh: yes I'll take a look [08:02:48] fyi. https://ldap.toolforge.org/user/kavaljeetsingh says it was created ~1year ago [08:04:40] dcaro: indeed, I can't find anything obviously wrong so far, have you run into this issue before ? [08:05:49] Thanks for checking. [08:05:50] If `kavaljeetsingh` was created about a year ago, could you please tell me which Wikimedia account is linked to it? My Wikimedia account is `Kavaljeet_Singh`, and Toolforge says it is attached to another Developer account when I try to join. [08:06:32] godog: not sure, it's been a while since I played with ldap and such (there's now bitu in between too) [08:06:55] dcaro: ok thank you [08:06:59] Kavaljeet_Singh: the SUL account linked to it is https://meta.wikimedia.org/wiki/Special:CentralAuth/Kavaljeet_Singh [08:07:39] Kavaljeet_Singh: doing what action exactly triggers the message ? e.g. which url ? [08:08:26] The message appears when I go to https://admin.toolforge.org/, click "Join now" to request Toolforge membership, and then try to link my Wikimedia account using OAuth. [08:08:27] The error shown is: [08:08:27] "Wikimedia account 'Kavaljeet Singh' is already attached to another Developer account." [08:10:08] Kavaljeet_Singh: can you go to https://idm.wikimedia.org? that might give some more info [08:13:46] I checked IDM and it shows: [08:13:47]  Phabricator User: Kavaljeet_Singh [08:13:47]  SSH username: kavaljeetsingh [08:13:48] *Wikimedia Global Account (SUL): Kavaljeet Singh [08:13:48] So it looks like my Developer account and Wikimedia account are already linked, but Toolforge membership still gives: [08:13:49] "Wikimedia account 'Kavaljeet Singh' is already attached to another Developer account." [08:16:54] Kavaljeet_Singh: would you mind opening a phab with the issue and tag it #toolforge and #striker ? I'm afraid I'm out of my depth here with striker [08:18:14] ok [08:18:16] to be clear this is striker throwing IntegrityError while saving the user, afaics [08:18:21] https://github.com/wikimedia/labs-striker/blob/c064ff937c6653be754adc4d974ace0c0e729449/striker/labsauth/views.py#L125 [08:19:12] Kavaljeet_Singh: thank you [08:19:22] ok i will create the task thank you [08:22:33] godog: this might give you a bit more info `root@cloudweb1004:~# docker logs --tail 10000 striker.service 2>&1 | grep Kavaljeet` [08:23:24] dcaro: thank you, good point [08:25:17] (note that my stirker foo is also starter level) [08:26:13] heheh [08:30:18] Would you recommend that I create a Phabricator task for this issue, or should I wait while you investigate? [08:33:52] Kavaljeet_Singh: the former, a good idea anyways to track work on phab [08:36:05] ok done [08:36:33] thank you, what's the task ? [08:41:32] I created a Phabricator task for this issue: T429759 [08:41:33] Thanks for investigating. [08:41:33] T429759: Cannot join Toolforge: Striker throws IntegrityError while saving user - https://phabricator.wikimedia.org/T429759 [15:43:10] !log paws rm -rf /srv/paws/files-to-remove/* for T429578 [15:43:14] Logged the message at https://wikitech.wikimedia.org/wiki/Nova_Resource:Paws/SAL [15:43:15] T429578: PAWS disk space is running out - https://phabricator.wikimedia.org/T429578 [18:19:11] !log lucaswerkmeister@tools-bastion-15 tools.ranker deployed 934c610ff6 (l10n updates: ps) [18:19:14] Logged the message at https://wikitech.wikimedia.org/wiki/Nova_Resource:Tools.ranker/SAL [18:52:37] !log codesearch shutting down instance sourcebot1 - T429496 [18:52:41] Logged the message at https://wikitech.wikimedia.org/wiki/Nova_Resource:Codesearch/SAL [18:52:41] T429496: shutdown sourcebot1 instance in cloud VPS - https://phabricator.wikimedia.org/T429496 [18:53:20] !log codesearch deleting proxy codesearch-sourcebot.wmcloud.org - T429496 [18:53:23] Logged the message at https://wikitech.wikimedia.org/wiki/Nova_Resource:Codesearch/SAL [18:54:52] oh shit, i deleted the wrong instance by accident :( [18:57:42] is there any way to re-create a deleted cloud VPS instance from backup? [19:27:50] mutante: maybe?? ^^ andrewbogott [19:28:47] bliviero: thank you, I already pinged him and got some info. [19:28:56] maybe possible but not sure [19:29:13] trying first how much of a problem I have to re-create it [19:29:51] !log codesearch deleted instance codesearch9 by accident :( - creating instance codesearch10 on trixie - T429828 T429496 [19:29:58] Logged the message at https://wikitech.wikimedia.org/wiki/Nova_Resource:Codesearch/SAL [19:29:59] T429828: re-create codesearch instance - https://phabricator.wikimedia.org/T429828 [19:29:59] T429496: shutdown sourcebot1 instance in cloud VPS - https://phabricator.wikimedia.org/T429496 [19:30:09] mutante: ok [19:53:27] lucaswerkmeister are you there ? [19:53:44] I'm having trouble importing m3api in typescript [19:55:08] have you ever considered adding an "exports" entry in your package.json ? so that other imports than the root (such as browser.js) are supported and have type declaration associated with them [19:56:44] !log codesearch creating instance codesearch11 on bookworm - hound services failed to start on trixie - verify if it's distro related - T429828 T429496 [19:56:50] Logged the message at https://wikitech.wikimedia.org/wiki/Nova_Resource:Codesearch/SAL [19:56:50] T429828: re-create codesearch instance - https://phabricator.wikimedia.org/T429828 [19:56:51] T429496: shutdown sourcebot1 instance in cloud VPS - https://phabricator.wikimedia.org/T429496 [20:28:08] Gouvernathor: I think I ran into the same issue and considered it [20:28:15] didn't get around to it yet [20:34:01] I did a PR [20:34:08] to your repo [20:34:32] it has the consequence of hiding all other implicit exports, so it needs a major version hike [20:34:41] but locally it works [20:35:01] nothing to be done about m3api-oauth2 though, since it doesn't have type exports [20:35:18] I might rewrite it in native typescript if I end up using it in production [20:35:26] well "native" [20:44:29] y tho [20:44:41] just add type stubs if you really need it typed? [20:53:22] the import itself is flagged as an error by typescript [20:53:53] you have all the stubs imported in npm, and yet they're not used [20:54:13] (talking about m3api) [20:54:49] as for m3api-oauth, well those type stubs have nothing to do in an app *importing* the module, it should be imported *with* the module [20:55:02] well, the package [20:56:03] interesting, I didn’t get notified about that MR AFAICT [20:56:08] *looks for a setting* [20:56:54] so I'm going to add a lot of ts-expect-error for now, to try and just make it work, and then if it does I'm going to make a version that works and is typed all by itself, and you'll be free to merge it back [20:57:58] !log codesearch - re-created on trixie! oof:)) should be working - https://codesearch.wmcloud.org/search/ T429828 [20:58:02] Logged the message at https://wikitech.wikimedia.org/wiki/Nova_Resource:Codesearch/SAL [20:58:02] T429828: re-create codesearch instance - https://phabricator.wikimedia.org/T429828 [20:58:04] also, why is the base package on the wikimedia gitlab but the oauth package is on github ? [21:00:31] Gouvernathor: the github is just a mirror of the actual source on gerrit.wikimedia.org [21:00:50] and when that was created I guess Wikimedia gitlab did not exist yet [21:00:55] another forge ? well that's a relief [21:01:07] I use Codeberg myself [21:01:38] yea. gerrit is the way to go if you want to contribute to it. you can with a dev account [21:02:13] I'm not sure, I think I'll make my own version of things and let people cherry pick my changes [21:06:47] Gouvernathor: what I meant was adding a `.d.ts` file with `declare module "m3api-oauth2" { ... }` instead of just ts-ignore’ing everything [21:06:59] yes, I understand [21:07:08] and I think my app is not the place for this [21:07:21] (by the way, https://gitlab.wikimedia.org/-/profile/notifications seems to be the place where I can configure that I’d like to watch the whole m3api group ^^) [21:08:10] so I think that when I start doing typing and stuff, it will be better placed in .ts files rather than .d.ts, and first and foremost, in the package itself [21:12:33] actually, I think the issue I might have had is something else… (re @lucaswerkmeister: Gouvernathor: I think I ran into the same issue and considered it) [21:13:04] right, `sideEffects` is the weird `package.json` property I remembered, not `exports` https://webpack.js.org/guides/tree-shaking/ [21:13:43] Gouvernathor: sure, but I was responding to your suggestion that you’d rewrite the whole library? [21:14:05] where a .d.ts file seems like a much lower effort solution IMHO [21:14:06] I was talking about the oauth package, which has no typing [21:14:39] I don't agree, I believe doing things in typescript from the beginning helps making working code [21:14:54] buf if you don't want what I will produce, that's fine [21:16:23] also I have a question about using it [21:16:40] I'm working from a tool that uses classic server-side oauth [21:16:58] “I believe doing things in typescript from the beginning helps making working code” – the library *has* working code, it’s been tested, I see no need to rewrite it? [21:17:26] if m3api-oauth2 gets types, it’ll be the same way that m3api has them – have typescript compile a `.d.ts` file based on the existing jsdoc comments [21:17:38] (I don’t know why typescript can’t just use the jsdoc comments directly – I didn’t just write those for fun…) [21:17:56] why didn't you write them in typescript then ? [21:18:13] because I’ve had thoroughly mixed experiences with typescript? [21:18:21] suit yourself [21:19:27] anyway, regarding the merge request, I think it might work out better if you create a Phabricator task (tagged with m3api) describing the issue you encountered and how `exports` can fix it? [21:19:35] instead of me trying to reverse engineer the issue from the MR :) [21:20:28] I don't know how to create a phabricator task [21:21:31] the issue is that when I npm install m3api, and then I import it in a ts file, then it doesn't recognize the /browser.js import and typescript treats it as an error, because /browser.js has no attached type declaration [21:21:55] https://phabricator.wikimedia.org/maniphest/task/edit/form/1/?projects=m3api should work (you already have an account AFAICT) [21:22:46] I see, maybe it was too much to hope that typescript would pick up `types/broser.d.ts` [21:22:57] I’m also about to sign off for the day, but feel free to ask your m3api-oauth2 server-side question and I can get back to you tomorrow [21:23:08] (I’ll try to remember to check on the IRC side if you’re still online or not ^^) [21:23:35] my question is, the original tool makes a first "confirmation" request for oauth to meta.wikimedia.org/w/index.php, but the upload request is done to commons.wikimedia.org/w/api.php [21:23:36] Which of the two should I pass to the Session constructor ? [21:24:12] I would just use commons.wikimedia.org for everything [21:24:18] i.e. send the user there for authentication as well [21:25:13] alternatively, if you create a Meta session, init + complete OAuth there, then create a separate Commons session and “copy over” the OAuth state using serializeOAuthSession() + deserializeOAuthSession(), that should work as well [21:25:36] (you’ll probably have to serialize + deserialize the session anyway between requests, and store the result in some kind of session store, I expect) [21:27:32] yes, I'm copying your local-tool code [21:27:38] which serializes it [21:28:02] I opened the phabricator thing [21:30:20] !log codesearch - upgraded to Debian trixie [21:30:22] Logged the message at https://wikitech.wikimedia.org/wiki/Nova_Resource:Codesearch/SAL [21:37:34] thanks, I'll take a look tomorrow!