[11:56:34] hello, I'm back with another stupid toolforge question: Unless I am mistaken, it appears the platform is locked to an old version on npm and I am not permitted to update it? Is this the case? my app requires a newer version. [13:06:05] HouseOfM: are you referring to the version of npm you see over ssh on the bastion/login server, or in the "webservice shell" for the chosen nodejs version? [13:10:16] https://wikitech.wikimedia.org/wiki/Help:Toolforge/Kubernetes#Container_images [13:12:49] Latest is node 20 with npm 9 (Debian Trixie) [13:24:38] sorry, I got distracted by other things: I mean in "webservice shell" [13:26:10] The app demands 10.2 [17:07:48] Hello All. [17:07:48] I have a new toolforge.org tool, https://wikinaturalist.toolforge.org. [17:07:49] From it, I make an *api call to check if my user is logged in on (meta|commons).**wikimedia.org* and ideally return the username : [17:07:51] > https://meta.wikimedia.org/w/api.php?action=query&meta=userinfo&format=json&origin=https://wikinaturalist.toolforge.org [17:07:52] The whole code is this : [17:07:54] ``` [17:07:55] async function checkWikimediaUsernameConnected() { [17:07:57] try { [17:07:58] const apiUrl = [17:08:00] 'https://meta.wikimedia.org/w/api.php?action=query&meta=userinfo&format=json&origin=https://wikinaturalist.toolforge.org' [17:08:01] const response = await fetch(apiUrl, { credentials: 'include' }) [17:08:03] const data = await response.json() [17:08:04] const userInfo = data.query.userinfo [17:08:06] // Check if user is logged in [17:08:07] if (userInfo.hasOwnProperty('anon') && userInfo.anon === '') { [17:08:09] console.log('User is NOT logged in (Anonymous).') [17:08:10] } else if (!settings.wikimediaUsername && userInfo.name && userInfo.id) { [17:08:12] console.log(`User IS logged in as: ${userInfo.name} (ID: ${userInfo.id})`) [17:08:13] settings.setUsername(userInfo.name) [17:08:15] } [17:08:16] } catch (error) { [17:08:18] console.error('Error fetching user status:', error) [17:08:19] } [17:08:21] } [17:08:22] checkWikimediaUsernameConnected() ``` [17:08:24] But whatever I do, it returns an error 403 : [17:08:26] ``` [17:08:28] Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://meta.wikimedia.org/w/api.php?action=query&meta=userinfo&format=json&origin=https://wikinaturalist.toolforge.org. (Reason: CORS header ‘Access-Control-Allow-Origin’ missing). Status code: 200.``` [17:08:30] Gemini fall into an unhelpful loop 🫤. Maybe someone knows here ? [17:08:49] first of all, please use a pastebin instead of posting large chunks of text here [17:09:47] second of all, CORS is working exactly as expected there, you cannot access a logged-in account from a third-party site [17:10:48] Thank Taavi. (For info : Gemeni says it should work because toolforge is whitelisted.) [17:11:15] You are using OAuth, right? (re @Hugo_Lz: Hello All. [17:11:16] I have a new toolforge.org tool, https://wikinaturalist.toolforge.org. [17:11:18] From it, I make an api call to check if my us...) [17:11:40] Nope, I'm going brutal for now. It's still a poke demo. (re @albertoleoncio: You are using OAuth, right?) [17:13:11] I see... You need to set the OAuth if you want to identify the user and use the API in their behalf. (re @Hugo_Lz: Nope, I'm going brutal for now. It's still a poke demo.) [17:13:58] that arbitrary text generation tool cannot change the reality to match what it says [17:16:35] Statistic text generation. Most API queries do work, statistically, my API call therefore should work. 👀🤖 [17:17:32] taavi: Feels like this: https://www.reddit.com/r/ProgrammerHumor/comments/1dcwxbp/workingwithgenai/ [17:19:18] Pretty much my past 1hour and half yes (re @albertoleoncio: taavi: Feels like this: https://www.reddit.com/r/ProgrammerHumor/comments/1dcwxbp/workingwithgenai/) [17:24:22] @Taavi, @albertoleoncio , thanks for the quick human replies, I can escape the loop and move on to new features 👍 [19:55:51] can someone tell me what exactly does the alert [19:55:51] alertname=PuppetAgentNoResources [19:55:52] mean. [19:55:54] what do we mean by puppet resource (in context for instance/vm) [20:02:17] https://t.me/wmcloudirc/61300 (re @reputation22: can someone tell me what exactly does the alert [20:02:18] alertname=PuppetAgentNoResources [20:02:19] mean. [20:02:21] what do we mean by puppet resource (in ...) [21:06:58] Can someone check if this is filed with the right Phabricator project? If people are too busy to process the request that is fine but with no response at all I am not sure I am even in the right place. https://phabricator.wikimedia.org/T409006 [21:08:42] I don’t know if it’s the right project, but I would try uploading a Gerrit change against https://gerrit.wikimedia.org/g/operations/puppet/+/445ced3395/hieradata/common/profile/dumps/distribution.yaml#161 (found via codesearch) and submitting that to one of the Puppet request windows (https://wikitech.wikimedia.org/wiki/Puppet_request_window) [21:10:06] assuming you’re comfortable with gerrit, that is ^^ [21:23:28] and you could do it as 2 steps if you want a period when both work before getting rid of the current one or you could remove current one in the first step. [21:23:48] The first one is already dead [21:28:42] I understand it is a file in a git repository, so I cloned the repository, made a branch, and updated the file. How do I submit a patchset against the current repository? How do I then get it into a puppet window? (re @lucaswerkmeister: I don’t know if it’s the right project, but I would try uploading a Gerrit change against https://gerrit.wikimedia.org/g/operati...) [21:31:02] git review ;) [21:31:06] Or just do it via the gerrit UI [21:31:19] https://www.mediawiki.org/wiki/Gerrit/Tutorial is the longer version of Reedy’s message ;) [21:31:28] but yeah the gerrit UI might actually be easier for this change, since it should be small [21:31:49] the only weird thing about hte puppet repo is the default branch is production (rather than the usual main/master) [21:32:18] I mean, that's logical [21:32:30] and to add it to the puppet request window, you would find the next window on the deployments page (e.g. https://wikitech.wikimedia.org/wiki/Deployments#deploycal-item-20251209T1700) and add an entry for your change there, and then make sure to be online in #wikimedia-operations with the IRC nickname you entered there [21:34:35] This link: https://gerrit.wikimedia.org/r/plugins/gitiles/operations/puppet/+/445ced3395/hieradata/common/profile/dumps/distribution.yaml [21:34:36] Gives me no edit button, and going to the "code review" section takes me completely out of the context [21:35:19] https://gerrit.wikimedia.org/r/admin/repos/operations/puppet,commands [21:35:22] Create Change [21:35:59] Thank you [22:00:50] !log lucaswerkmeister@tools-bastion-15 tools.ranker deployed 93003c1a7d (l10n updates: he) [22:00:53] Logged the message at https://wikitech.wikimedia.org/wiki/Nova_Resource:Tools.ranker/SAL [22:02:20] !log lucaswerkmeister@tools-bastion-15 tools.wd-image-positions deployed 09b3779571 (l10n updates: tg-cyrl) [22:02:21] Logged the message at https://wikitech.wikimedia.org/wiki/Nova_Resource:Tools.wd-image-positions/SAL [22:05:49] https://gerrit.wikimedia.org/r/c/operations/puppet/+/1216652 [22:05:58] And jenkins-bot immediately gives it a -1. Alright [22:08:23] Trying that again... [22:09:00] Alright! Request submitted. Thank you for your help [22:09:34] you should also remove the “work in progress” status if the change is ready [22:09:49] there should be an entry for it in the “three dots” menu in the upper right corner, I think [22:10:21] or start a reply (with the button or by pressing `a`) and submit it (text can be empty) with the default button (I don’t remember what the label is but it should be something to the effect of “ready for review” IIRC) [22:11:02] and put in footer with the change-id on its own line [22:11:03] `Bug: T409006`