File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -214,6 +214,9 @@ const operationKeyPrefix = (integration: string): string =>
214214
215215const applyOrg = async ( sql : SqlClient , org : OrgPlan ) : Promise < void > => {
216216 if ( org . completed ) return ;
217+ if ( org . hardErrors . length > 0 ) {
218+ throw new Error ( `org ${ org . tenant } has unresolved policy hard errors; apply is blocked` ) ;
219+ }
217220 await sql . begin ( async ( tx ) => {
218221 const now = new Date ( ) ;
219222 for ( const row of org . integrations . filter ( ( item ) => item . action === "create" ) ) {
Original file line number Diff line number Diff line change @@ -1063,7 +1063,7 @@ export const planMigration = (input: MigrationInput): MigrationPlan => {
10631063 const activeOrgs = orgs . filter ( ( org ) => ! org . completed && org . hardErrors . length === 0 ) ;
10641064 const summary = {
10651065 orgs : orgs . length ,
1066- completedOrgs : orgs . length - activeOrgs . length ,
1066+ completedOrgs : orgs . filter ( ( org ) => org . completed ) . length ,
10671067 integrationsCreate : activeOrgs
10681068 . flatMap ( ( org ) => org . integrations )
10691069 . filter ( ( row ) => row . action === "create" ) . length ,
You can’t perform that action at this time.
0 commit comments