feat(server-nestjs): align plugin services with autoSync and suspende…#2298
feat(server-nestjs): align plugin services with autoSync and suspende…#2298shikanime wants to merge 3 commits into
Conversation
|
🤖 Hey ! The security scan report for the current pull request is available here. |
28c085b to
e635708
Compare
|
🤖 Hey ! The security scan report for the current pull request is available here. |
1 similar comment
|
🤖 Hey ! The security scan report for the current pull request is available here. |
c862f6e to
560cac3
Compare
|
🤖 Hey ! The security scan report for the current pull request is available here. |
560cac3 to
1923518
Compare
|
🤖 Hey ! The security scan report for the current pull request is available here. |
1923518 to
f8e527d
Compare
|
🤖 Hey ! The security scan report for the current pull request is available here. |
f8e527d to
f18eb6a
Compare
|
🤖 Hey ! The security scan report for the current pull request is available here. |
6f5697d to
9583d0e
Compare
|
🤖 Hey ! The security scan report for the current pull request is available here. |
be6563a to
89f46f6
Compare
|
🤖 Hey ! The security scan report for the current pull request is available here. |
1 similar comment
|
🤖 Hey ! The security scan report for the current pull request is available here. |
89f46f6 to
3bfc5fb
Compare
251f943 to
14f577f
Compare
|
🤖 Hey ! The security scan report for the current pull request is available here. |
1 similar comment
|
🤖 Hey ! The security scan report for the current pull request is available here. |
14f577f to
ef54811
Compare
|
🤖 Hey ! The security scan report for the current pull request is available here. |
ef54811 to
64f35b1
Compare
|
🤖 Hey ! The security scan report for the current pull request is available here. |
64f35b1 to
43cee42
Compare
|
🤖 Hey ! The security scan report for the current pull request is available here. |
43cee42 to
7f1834a
Compare
|
🤖 Hey ! The security scan report for the current pull request is available here. |
4 similar comments
|
🤖 Hey ! The security scan report for the current pull request is available here. |
|
🤖 Hey ! The security scan report for the current pull request is available here. |
|
🤖 Hey ! The security scan report for the current pull request is available here. |
|
🤖 Hey ! The security scan report for the current pull request is available here. |
|
🤖 Hey ! The security scan report for the current pull request is available here. |
|
🤖 Hey ! The security scan report for the current pull request is available here. |
5 similar comments
|
🤖 Hey ! The security scan report for the current pull request is available here. |
|
🤖 Hey ! The security scan report for the current pull request is available here. |
|
🤖 Hey ! The security scan report for the current pull request is available here. |
|
🤖 Hey ! The security scan report for the current pull request is available here. |
|
🤖 Hey ! The security scan report for the current pull request is available here. |
|
…odule imports Signed-off-by: Shikanime Deva <william.phetsinorath@shikanime.studio> Change-Id: Ib0cb9dd4c83a5e8e2127eb7bd0f432926a6a6964
| expect(vault.read).toHaveBeenCalledWith(`forge/${project.slug}/REGISTRY/ro-robot`) | ||
| expect(vault.read).toHaveBeenCalledWith(`forge/${project.slug}/REGISTRY/rw-robot`) | ||
| expect(vault.read).toHaveBeenCalledWith(`forge/${project.slug}/REGISTRY/${projectRobotName}`) | ||
| expect(vault.read).toHaveBeenCalledWith(`forge/${project.slug}/REGISTRY/${ROBOT_NAME_PROJECT}`) |
| expect(robotNames).toContain(`robot$${projectSlug}+${roRobotName}`) | ||
| expect(robotNames).toContain(`robot$${projectSlug}+${rwRobotName}`) | ||
| expect(robotNames).toContain(`robot$${projectSlug}+${projectRobotName}`) | ||
| expect(robotNames).toContain(`robot$${projectSlug}+${ROBOT_NAME_RO}`) |
| expect(robotNames).toContain(`robot$${projectSlug}+${rwRobotName}`) | ||
| expect(robotNames).toContain(`robot$${projectSlug}+${projectRobotName}`) | ||
| expect(robotNames).toContain(`robot$${projectSlug}+${ROBOT_NAME_RO}`) | ||
| expect(robotNames).toContain(`robot$${projectSlug}+${ROBOT_NAME_RW}`) |
| expect(robotNames).toContain(`robot$${projectSlug}+${projectRobotName}`) | ||
| expect(robotNames).toContain(`robot$${projectSlug}+${ROBOT_NAME_RO}`) | ||
| expect(robotNames).toContain(`robot$${projectSlug}+${ROBOT_NAME_RW}`) | ||
| expect(robotNames).toContain(`robot$${projectSlug}+${ROBOT_NAME_PROJECT}`) |
| expect(roSecret.data?.USERNAME).toBe(`robot$${projectSlug}+${roRobotName}`) | ||
| expect(rwSecret.data?.USERNAME).toBe(`robot$${projectSlug}+${rwRobotName}`) | ||
| expect(projectSecret.data?.USERNAME).toBe(`robot$${projectSlug}+${projectRobotName}`) | ||
| expect(roSecret.data?.USERNAME).toBe(`robot$${projectSlug}+${ROBOT_NAME_RO}`) |
| expect(rwSecret.data?.USERNAME).toBe(`robot$${projectSlug}+${rwRobotName}`) | ||
| expect(projectSecret.data?.USERNAME).toBe(`robot$${projectSlug}+${projectRobotName}`) | ||
| expect(roSecret.data?.USERNAME).toBe(`robot$${projectSlug}+${ROBOT_NAME_RO}`) | ||
| expect(rwSecret.data?.USERNAME).toBe(`robot$${projectSlug}+${ROBOT_NAME_RW}`) |
| expect(projectSecret.data?.USERNAME).toBe(`robot$${projectSlug}+${projectRobotName}`) | ||
| expect(roSecret.data?.USERNAME).toBe(`robot$${projectSlug}+${ROBOT_NAME_RO}`) | ||
| expect(rwSecret.data?.USERNAME).toBe(`robot$${projectSlug}+${ROBOT_NAME_RW}`) | ||
| expect(projectSecret.data?.USERNAME).toBe(`robot$${projectSlug}+${ROBOT_NAME_PROJECT}`) |
… datastore tighter select Signed-off-by: Shikanime Deva <william.phetsinorath@shikanime.studio> Change-Id: Ie226a611990a4b13a64c5863c5cd90f66a6a6964
Signed-off-by: Shikanime Deva <william.phetsinorath@shikanime.studio> Change-Id: I603bc405c005d1eaa9da67de8a74356b6a6a6964

0 New Issues
1 Fixed Issue
0 Accepted Issues
Issues liées
#2315
#2314
Quel est le comportement actuel ?
Avant cette PR, la synchronisation des projets par les plugins (ArgoCD, GitLab, Vault, Keycloak, Nexus, SonarQube, Harbor) était soit globale, soit déclenchée uniquement par les modifications apportées dans la Console. Les projets ne disposaient d'aucune option permettant de contrôler finement la synchronisation projet par projet.
Quel est le nouveau comportement ?
Cette PR introduit les options
autoSync(désactivée par défaut) etsuspended(activée par défaut) au niveau projet pour l'ensemble des 7 plugins. Elle réactive les tâches planifiées horaires (@Cron(CronExpression.EVERY_HOUR)) qui ne ciblent désormais que les projetsautoSync=enabledETsuspended!=enabledvia la méthodegetAutoSyncProjects().Comportement de synchronisation :
syncProject()vérifie désormaisisSuspended()et ignore le projet si vrai (avec journalisation d'avertissement).getAutoSyncProjects()à la place degetAllProjects().Nouveaux utilitaires :
isSuspended(project)— indique si le projet a l'optionsuspendedactivée.isAutoSync(project)— indique si le projet a l'optionautoSyncactivée.Couche données :
getAutoSyncProjects()— filtre les projets avecautoSync=enabledETsuspended!=enabled.Configuration des plugins :
*_PLUGIN_KEY(PLUGIN_NAME,AUTO_SYNC_PLUGIN_KEY,SUSPENDED_PLUGIN_KEY) pour les 7 plugins.suspendedetautoSyncau niveau projet pour ArgoCD, GitLab, Vault, Keycloak, Nexus, SonarQube et Harbor.