Skip to content

Commit d2bdc52

Browse files
Fix trait overrides patching from backstage BE
1 parent 764ef28 commit d2bdc52

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

plugins/openchoreo-backend/src/router.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -627,6 +627,7 @@ export async function createRouter({
627627
orgName,
628628
environment,
629629
componentTypeEnvOverrides,
630+
traitOverrides,
630631
} = req.body;
631632

632633
if (!componentName || !projectName || !orgName || !environment) {
@@ -642,6 +643,7 @@ export async function createRouter({
642643
organizationName: orgName as string,
643644
environment: environment as string,
644645
componentTypeEnvOverrides: componentTypeEnvOverrides,
646+
traitOverrides: traitOverrides,
645647
}),
646648
);
647649
});

plugins/openchoreo-backend/src/services/EnvironmentService/EnvironmentInfoService.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1014,6 +1014,7 @@ export class EnvironmentInfoService implements EnvironmentService {
10141014
* @param {string} request.organizationName - Name of the organization
10151015
* @param {string} request.environment - Environment to patch binding for
10161016
* @param {any} request.componentTypeEnvOverrides - Component type environment overrides to apply
1017+
* @param {any} request.traitOverrides - Trait-specific overrides to apply
10171018
* @returns {Promise<any>} Updated binding response
10181019
*/
10191020
async patchReleaseBindingOverrides(request: {
@@ -1022,6 +1023,7 @@ export class EnvironmentInfoService implements EnvironmentService {
10221023
organizationName: string;
10231024
environment: string;
10241025
componentTypeEnvOverrides: any;
1026+
traitOverrides?: any;
10251027
}) {
10261028
const startTime = Date.now();
10271029
this.logger.debug(
@@ -1051,6 +1053,7 @@ export class EnvironmentInfoService implements EnvironmentService {
10511053
},
10521054
body: {
10531055
componentTypeEnvOverrides: request.componentTypeEnvOverrides,
1056+
traitOverrides: request.traitOverrides,
10541057
},
10551058
},
10561059
);

0 commit comments

Comments
 (0)