Skip to content

feat(gitlab): add builtin roles to GitLab#1910

Merged
shikanime merged 1 commit intomainfrom
pr1910
Mar 9, 2026
Merged

feat(gitlab): add builtin roles to GitLab#1910
shikanime merged 1 commit intomainfrom
pr1910

Conversation

@shikanime
Copy link
Contributor

@shikanime shikanime commented Feb 10, 2026

Co-authered-by: William Phetsinorath william.phetsinorath@shikanime.studio
Signed-off-by: William Phetsinorath william.phetsinorath-open@interieur.gouv.fr
Change-Id: Ide088123b0460ae559e3d124f76487dc6a6a6964

@github-actions
Copy link
Contributor

github-actions bot commented Feb 10, 2026

🤖 Hey !

A preview of the application is available at : https://console-pr-1910.dso.cpin-hp.numerique-interieur.fr

Please be patient, deployment may take a few minutes.

@shikanime shikanime marked this pull request as ready for review February 10, 2026 15:27
@github-actions
Copy link
Contributor

github-actions bot commented Feb 10, 2026

🤖 Hey !

The @cpn-console/gitlab-plugin (v3.3.1) package already exists on npm but the source code has changed, you should consider updating the package version.

The version update warning should be ignored in the case of modifications that do not affect the code once it has been built, such as code formatting, etc...

@github-actions
Copy link
Contributor

github-actions bot commented Feb 10, 2026

🤖 Hey !

The @cpn-console/shared (v1.3.0) package already exists on npm but the source code has changed, you should consider updating the package version.

The version update warning should be ignored in the case of modifications that do not affect the code once it has been built, such as code formatting, etc...

@github-actions
Copy link
Contributor

github-actions bot commented Feb 10, 2026

🤖 Hey !

The @cpn-console/keycloak-plugin (v2.1.0) package already exists on npm but the source code has changed, you should consider updating the package version.

The version update warning should be ignored in the case of modifications that do not affect the code once it has been built, such as code formatting, etc...

@github-actions
Copy link
Contributor

github-actions bot commented Feb 10, 2026

🤖 Hey !

The @cpn-console/hooks (v4.0.0) package already exists on npm but the source code has changed, you should consider updating the package version.

The version update warning should be ignored in the case of modifications that do not affect the code once it has been built, such as code formatting, etc...

@github-actions
Copy link
Contributor

github-actions bot commented Feb 10, 2026

🤖 Hey !

The @cpn-console/sonarqube-plugin (v2.0.5) package already exists on npm but the source code has changed, you should consider updating the package version.

The version update warning should be ignored in the case of modifications that do not affect the code once it has been built, such as code formatting, etc...

@github-actions github-actions bot added the built label Feb 10, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Feb 10, 2026

🤖 Hey !

The security scan report for the current pull request is available here.

@shikanime shikanime force-pushed the pr1910 branch 3 times, most recently from 9cdc8b1 to fc16bf6 Compare February 10, 2026 16:30
@shikanime
Copy link
Contributor Author

shikanime commented Feb 10, 2026

For unknown reason, config is always undefined:

{
  failed: false,
  args: {
    userId: "e9d2a79f-ac9c-4b2b-8236-61c493f4a997",
    roleIds: [
    ],
    firstName: "User",
    lastName: "Secondtest",
    email: "secondtestuser@example.com",
    type: "human",
    createdAt: "2026-02-10T16:58:49.174Z",
    updatedAt: "2026-02-10T16:58:49.178Z",
    lastLogin: "2026-02-10T16:58:49.177Z",
    projectId: "98ae9c0e-3610-4a04-8a2e-8226e9afebb8",
    roles: [
    ],
    project: {
      id: "98ae9c0e-3610-4a04-8a2e-8226e9afebb8",
      name: "yo",
      description: "",
      status: "failed",
      locked: false,
      createdAt: "2026-02-10T16:57:42.962Z",
      updatedAt: "2026-02-10T16:57:57.494Z",
      everyonePerms: 896n,
      ownerId: "cecd0d45-79d8-4864-a9fe-199477c29264",
      slug: "yo-1",
      limitless: true,
      hprodCpu: 0,
      hprodGpu: 0,
      hprodMemory: 0,
      prodCpu: 0,
      prodGpu: 0,
      prodMemory: 0,
      lastSuccessProvisionningVersion: null,
      members: [
        {
          projectId: "98ae9c0e-3610-4a04-8a2e-8226e9afebb8",
          userId: "e9d2a79f-ac9c-4b2b-8236-61c493f4a997",
          roleIds: [
          ],
          user: {
            id: "e9d2a79f-ac9c-4b2b-8236-61c493f4a997",
            firstName: "User",
            lastName: "Secondtest",
            email: "secondtestuser@example.com",
            createdAt: "2026-02-10T16:58:49.174Z",
            updatedAt: "2026-02-10T16:58:49.178Z",
            lastLogin: "2026-02-10T16:58:49.177Z",
            adminRoleIds: [
            ],
            type: "human",
          },
        },
      ],
      clusters: [
      ],
      environments: [
      ],
      repositories: [
      ],
      plugins: [
      ],
      owner: {
        id: "cecd0d45-79d8-4864-a9fe-199477c29264",
        firstName: "William",
        lastName: "Phetsinorath",
        email: "wphetsinorath@groupbees.fr",
        createdAt: "2026-02-10T16:56:40.716Z",
        updatedAt: "2026-02-10T16:58:37.930Z",
        lastLogin: "2026-02-10T16:58:37.929Z",
        adminRoleIds: [
        ],
        type: "human",
      },
      roles: [
        {
          userId: "cecd0d45-79d8-4864-a9fe-199477c29264",
          role: "owner",
        },
        {
          userId: "e9d2a79f-ac9c-4b2b-8236-61c493f4a997",
          role: "user",
        },
      ],
      store: {
      },
      users: [
        {
          id: "cecd0d45-79d8-4864-a9fe-199477c29264",
          firstName: "William",
          lastName: "Phetsinorath",
          email: "wphetsinorath@groupbees.fr",
          createdAt: "2026-02-10T16:56:40.716Z",
          updatedAt: "2026-02-10T16:58:37.930Z",
          lastLogin: "2026-02-10T16:58:37.929Z",
          adminRoleIds: [
          ],
          type: "human",
        },
        {
          id: "e9d2a79f-ac9c-4b2b-8236-61c493f4a997",
          firstName: "User",
          lastName: "Secondtest",
          email: "secondtestuser@example.com",
          createdAt: "2026-02-10T16:58:49.174Z",
          updatedAt: "2026-02-10T16:58:49.178Z",
          lastLogin: "2026-02-10T16:58:49.177Z",
          adminRoleIds: [
          ],
          type: "human",
        },
      ],
    },
  },
  results: {
    gitlab: {
      status: {
        result: "OK",
      },
      executionTime: {
        main: 1770742729198,
      },
    },
  },
  apis: {...},
  config: {
  },
  warning: [
  ],
}

StephaneTrebel
StephaneTrebel previously approved these changes Feb 23, 2026
@shikanime
Copy link
Contributor Author

Something is wrong either with my account or the token

/nix/store/bixq2sgnl5gmjyslfsmnaijl7bn08p9z-pnpm-10.26.1/bin/pnpm --filter @cpn-console/server run integ

> @cpn-console/server@9.13.2 integ /Users/shikanimedeva/Source/Repos/github.com/cloud-pi-native/console/apps/server
> export INTEGRATION=true; pnpm run db:migrate && nodemon --exec 'vite-node src/server.ts'

> @cpn-console/server@9.13.2 db:migrate /Users/shikanimedeva/Source/Repos/github.com/cloud-pi-native/console/apps/server
> prisma migrate dev --name dso


[nodemon] 3.1.10
[nodemon] to restart at any time, enter `rs`
[nodemon] watching path(s): server.ts src/**/*
[nodemon] watching extensions: js,ts
[nodemon] starting `vite-node src/server.ts`
Plugin argocd registered at upsertProject:main deleteProject:main upsertCluster:main deleteCluster:main upsertZone:main
Plugin gitlab registered at deleteProject:main deleteProject:post upsertProject:check upsertProject:main upsertProject:post getProjectSecrets:main syncRepository:main syncRepository:post upsertCluster:post deleteCluster:post upsertZone:pre upsertZone:post deleteZone:main upsertAdminRole:main upsertProjectMember:main deleteProjectMember:post
Plugin registry registered at upsertProject:post deleteProject:main getProjectSecrets:main
Plugin keycloak registered at deleteProject:post upsertProject:main upsertProjectRole:main upsertProjectMember:main deleteProjectMember:post upsertZone:main deleteZone:post deleteProjectRole:post retrieveUserByEmail:main upsertAdminRole:main deleteAdminRole:post
Plugin nexus registered at upsertProject:main deleteProject:main getProjectSecrets:main
Plugin sonarqube registered at upsertProject:main upsertProject:post deleteProject:main
Plugin vault registered at getProjectSecrets:main upsertProject:main deleteProject:post upsertZone:pre deleteZone:main
(node:26001) [FSTDEP016] DeprecationWarning: You are accessing the deprecated "request.routeConfig" property. Use "request.routeOptions.config" instead. Property "req.routeConfig" will be removed in `fastify@5`.
(Use `node --trace-deprecation ...` to show where the warning was created)
gitlabUserPromiseResults[0].reason
GitbeakerRequestError: Forbidden
    at throwFailedRequestError (file:///Users/shikanimedeva/Source/Repos/github.com/cloud-pi-native/console/node_modules/.pnpm/@gitbeaker+rest@40.6.0/node_modules/@gitbeaker/rest/dist/index.mjs:41:9)
    at processTicksAndRejections (node:internal/process/task_queues:103:5)
    at defaultRequestHandler (file:///Users/shikanimedeva/Source/Repos/github.com/cloud-pi-native/console/node_modules/.pnpm/@gitbeaker+rest@40.6.0/node_modules/@gitbeaker/rest/dist/index.mjs:74:48)
    at file:///Users/shikanimedeva/Source/Repos/github.com/cloud-pi-native/console/node_modules/.pnpm/@gitbeaker+core@40.6.0/node_modules/@gitbeaker/core/dist/index.mjs:144:22
    at Module.upsertUser (/Users/shikanimedeva/Source/Repos/github.com/cloud-pi-native/console/plugins/gitlab/src/user.ts:53:7)
    at async Promise.allSettled (index 0)
    at async Promise.all (index 0)
    at Module.ensureMembers (/Users/shikanimedeva/Source/Repos/github.com/cloud-pi-native/console/plugins/gitlab/src/members.ts:8:47)
    at Object.upsertDsoProject [as gitlab] (/Users/shikanimedeva/Source/Repos/github.com/cloud-pi-native/console/plugins/gitlab/src/functions.ts:112:37)
    at /Users/shikanimedeva/Source/Repos/github.com/cloud-pi-native/console/packages/hooks/src/hooks/hook.ts:76:22 {cause: {…}, name: 'GitbeakerRequestError', stack: 'GitbeakerRequestError: Forbidden
    at throw…onsole/packages/hooks/src/hooks/hook.ts:76:22', message: 'Forbidden'}
gitlabUserPromiseResults[0].reason
GitbeakerRequestError: Forbidden
    at throwFailedRequestError (file:///Users/shikanimedeva/Source/Repos/github.com/cloud-pi-native/console/node_modules/.pnpm/@gitbeaker+rest@40.6.0/node_modules/@gitbeaker/rest/dist/index.mjs:41:9)
    at processTicksAndRejections (node:internal/process/task_queues:103:5)
    at defaultRequestHandler (file:///Users/shikanimedeva/Source/Repos/github.com/cloud-pi-native/console/node_modules/.pnpm/@gitbeaker+rest@40.6.0/node_modules/@gitbeaker/rest/dist/index.mjs:74:48)
    at file:///Users/shikanimedeva/Source/Repos/github.com/cloud-pi-native/console/node_modules/.pnpm/@gitbeaker+core@40.6.0/node_modules/@gitbeaker/core/dist/index.mjs:144:22
    at Module.upsertUser (/Users/shikanimedeva/Source/Repos/github.com/cloud-pi-native/console/plugins/gitlab/src/user.ts:53:7)
    at async Promise.allSettled (index 0)
    at async Promise.all (index 0)
    at Module.ensureMembers (/Users/shikanimedeva/Source/Repos/github.com/cloud-pi-native/console/plugins/gitlab/src/members.ts:8:47)
    at Object.upsertDsoProject [as gitlab] (/Users/shikanimedeva/Source/Repos/github.com/cloud-pi-native/console/plugins/gitlab/src/functions.ts:112:37)
    at /Users/shikanimedeva/Source/Repos/github.com/cloud-pi-native/console/packages/hooks/src/hooks/hook.ts:76:22 {cause: {…}, name: 'GitbeakerRequestError', stack: 'GitbeakerRequestError: Forbidden
    at throw…onsole/packages/hooks/src/hooks/hook.ts:76:22', message: 'Forbidden'}

StephaneTrebel
StephaneTrebel previously approved these changes Mar 9, 2026
Co-authered-by: William Phetsinorath <william.phetsinorath@shikanime.studio>
Signed-off-by: William Phetsinorath <william.phetsinorath-open@interieur.gouv.fr>
Change-Id: Ide088123b0460ae559e3d124f76487dc6a6a6964
@cloud-pi-native-sonarqube
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

built enhancement New feature or request preview Deploy preview app with Argo-cd

Projects

None yet

Development

Successfully merging this pull request may close these issues.

💡 [REQUEST] - Intégration des RBAC dans les services du socle (validation ArgoCD + GitLab)

2 participants