fix: 일반 리셋이 서버 지정 브랜치를 추적
상위 배포 권한자가 선택한 branch 또는 commit 정책을 profile metadata에 보존하고 일반 시나리오 초기화가 이를 따르도록 변경한다. 같은 active commit의 설치 완료 workspace는 빌드를 생략하고 기존 migration, seed, readiness 흐름을 유지한다.
This commit is contained in:
@@ -613,7 +613,7 @@ describe('admin operation API', () => {
|
||||
).rejects.toMatchObject({ code: 'CONFLICT' });
|
||||
});
|
||||
|
||||
it('queues a DB-preserving profile deployment without reset payload', async () => {
|
||||
it('queues a DB-preserving profile deployment with a durable release policy and no reset payload', async () => {
|
||||
const harness = await buildCaller(
|
||||
async (input) => ({
|
||||
id: '33333333-3333-4333-8333-333333333333',
|
||||
@@ -642,11 +642,17 @@ describe('admin operation API', () => {
|
||||
type: 'DEPLOY',
|
||||
sourceMode: 'COMMIT',
|
||||
reason: 'preserve live season',
|
||||
payload: {
|
||||
releaseSource: {
|
||||
mode: 'COMMIT',
|
||||
ref: expect.stringMatching(/^[0-9a-f]{40}$/u),
|
||||
},
|
||||
},
|
||||
});
|
||||
expect(harness.createdInputs[0]).not.toHaveProperty('payload');
|
||||
expect(harness.createdInputs[0]?.payload).not.toHaveProperty('install');
|
||||
});
|
||||
|
||||
it('lets a scenario-only operator reset from the active commit without selecting Git', async () => {
|
||||
it('lets a scenario-only operator reset from the configured branch latest without selecting Git', async () => {
|
||||
const harness = await buildCaller(
|
||||
async (input) => ({
|
||||
id: '55555555-5555-4555-8555-555555555555',
|
||||
@@ -664,6 +670,7 @@ describe('admin operation API', () => {
|
||||
adminRoles: ['admin.scenarios.reset:che:2'],
|
||||
firstUserIsAdmin: false,
|
||||
profileScenario: '1010',
|
||||
profileMeta: { releaseSource: { mode: 'BRANCH', ref: 'main' } },
|
||||
}
|
||||
);
|
||||
|
||||
@@ -687,8 +694,8 @@ describe('admin operation API', () => {
|
||||
|
||||
expect(harness.createdInputs[0]).toMatchObject({
|
||||
type: 'RESET',
|
||||
sourceMode: 'COMMIT',
|
||||
sourceRef: expect.stringMatching(/^[0-9a-f]{40}$/u),
|
||||
sourceMode: 'BRANCH',
|
||||
sourceRef: 'main',
|
||||
reason: 'new season only',
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user