diff --git a/controlplane/src/core/bufservices/check/getCheckSummary.ts b/controlplane/src/core/bufservices/check/getCheckSummary.ts index 4692554616..1998f4a695 100644 --- a/controlplane/src/core/bufservices/check/getCheckSummary.ts +++ b/controlplane/src/core/bufservices/check/getCheckSummary.ts @@ -195,6 +195,8 @@ export function getCheckSummary( hasProposalMatchError: check.proposalMatch === 'error', isLinkedTrafficCheckFailed, isLinkedPruningCheckFailed, + checkExtensionDeliveryId: check.checkExtensionDeliveryId, + checkExtensionErrorMessage: check.checkExtensionErrorMessage, }), isComposable: checkDetails.compositionErrors.length === 0, isBreaking, @@ -249,6 +251,8 @@ export function getCheckSummary( hasProposalMatchError: check.proposalMatch === 'error', isLinkedTrafficCheckFailed, isLinkedPruningCheckFailed, + checkExtensionDeliveryId: check.checkExtensionDeliveryId, + checkExtensionErrorMessage: check.checkExtensionErrorMessage, }), isComposable: checkDetails.compositionErrors.length === 0, isBreaking, diff --git a/controlplane/src/core/repositories/ProposalRepository.ts b/controlplane/src/core/repositories/ProposalRepository.ts index 7b207db5f9..6363f7beb0 100644 --- a/controlplane/src/core/repositories/ProposalRepository.ts +++ b/controlplane/src/core/repositories/ProposalRepository.ts @@ -586,6 +586,8 @@ export class ProposalRepository { hasLintErrors: schema.schemaChecks.hasLintErrors, hasGraphPruningErrors: schema.schemaChecks.hasGraphPruningErrors, clientTrafficCheckSkipped: schema.schemaChecks.clientTrafficCheckSkipped, + checkExtensionDeliveryId: schema.schemaChecks.checkExtensionDeliveryId, + checkExtensionErrorMessage: schema.schemaChecks.checkExtensionErrorMessage, }) .from(schema.schemaChecks) .where(eq(schema.schemaChecks.id, latestCheck[0].schemaCheckId)) @@ -602,6 +604,8 @@ export class ProposalRepository { const hasLintErrors = Boolean(check[0].hasLintErrors); const hasGraphPruningErrors = Boolean(check[0].hasGraphPruningErrors); const clientTrafficCheckSkipped = Boolean(check[0].clientTrafficCheckSkipped); + const checkExtensionDeliveryId = check[0].checkExtensionDeliveryId || undefined; + const checkExtensionErrorMessage = check[0].checkExtensionErrorMessage || undefined; const schemaCheckRepo = new SchemaCheckRepository(this.db); const linkedChecks = await schemaCheckRepo.getLinkedSchemaChecks({ @@ -625,6 +629,8 @@ export class ProposalRepository { hasProposalMatchError: false, isLinkedTrafficCheckFailed, isLinkedPruningCheckFailed, + checkExtensionDeliveryId, + checkExtensionErrorMessage, }); return { diff --git a/controlplane/src/core/repositories/SchemaCheckRepository.ts b/controlplane/src/core/repositories/SchemaCheckRepository.ts index e78e134573..c5b1270079 100644 --- a/controlplane/src/core/repositories/SchemaCheckRepository.ts +++ b/controlplane/src/core/repositories/SchemaCheckRepository.ts @@ -1584,6 +1584,8 @@ export class SchemaCheckRepository { hasGraphPruningErrors: !!check.hasGraphPruningErrors, clientTrafficCheckSkipped: !!check.clientTrafficCheckSkipped, hasProposalMatchError: check.proposalMatch === 'error', + checkExtensionDeliveryId: check.checkExtensionDeliveryId || undefined, + checkExtensionErrorMessage: check.checkExtensionErrorMessage || undefined, }), clientTrafficCheckSkipped: !!check.clientTrafficCheckSkipped, graphPruningCheckSkipped: !!check.graphPruningSkipped, diff --git a/controlplane/src/core/util.ts b/controlplane/src/core/util.ts index 12d8ea2010..7cf06bd101 100644 --- a/controlplane/src/core/util.ts +++ b/controlplane/src/core/util.ts @@ -555,6 +555,8 @@ export const isCheckSuccessful = ({ hasProposalMatchError, isLinkedTrafficCheckFailed, isLinkedPruningCheckFailed, + checkExtensionDeliveryId, + checkExtensionErrorMessage, }: { isComposable: boolean; isBreaking: boolean; @@ -565,12 +567,18 @@ export const isCheckSuccessful = ({ hasProposalMatchError: boolean; isLinkedTrafficCheckFailed?: boolean; isLinkedPruningCheckFailed?: boolean; + checkExtensionDeliveryId?: string; + checkExtensionErrorMessage?: string; }) => { // if a subgraph is linked to another subgraph, then the status of the check depends on the traffic and pruning check of the linked subgraph if (isLinkedTrafficCheckFailed || isLinkedPruningCheckFailed) { return false; } + if (checkExtensionDeliveryId && checkExtensionErrorMessage) { + return false; + } + return ( isComposable && // If no breaking changes found diff --git a/studio/src/components/check-badge-icon.tsx b/studio/src/components/check-badge-icon.tsx index c5a61ae204..a70703cb51 100644 --- a/studio/src/components/check-badge-icon.tsx +++ b/studio/src/components/check-badge-icon.tsx @@ -26,7 +26,7 @@ const isCheckSuccessful = ( !hasLintErrors && !hasGraphPruningErrors && !hasProposalMatchError && - !checkExtensionError + !Boolean(checkExtensionError) ); }; diff --git a/studio/src/pages/[organizationSlug]/[namespace]/graph/[slug]/proposals/[proposalId]/index.tsx b/studio/src/pages/[organizationSlug]/[namespace]/graph/[slug]/proposals/[proposalId]/index.tsx index 98d29a002a..12ac813051 100644 --- a/studio/src/pages/[organizationSlug]/[namespace]/graph/[slug]/proposals/[proposalId]/index.tsx +++ b/studio/src/pages/[organizationSlug]/[namespace]/graph/[slug]/proposals/[proposalId]/index.tsx @@ -477,6 +477,8 @@ export const ProposalDetails = ({ checkedSubgraphs, proposalMatch, linkedChecks, + checkExtensionDeliveryId, + checkExtensionErrorMessage, }) => { const isSuccessful = isCheckSuccessful( isComposable, @@ -492,6 +494,7 @@ export const ProposalDetails = ({ linkedChecks.some( (linkedCheck) => linkedCheck.hasGraphPruningErrors && !linkedCheck.isForcedSuccess, ), + checkExtensionErrorMessage, ); const path = `/${user?.currentOrganization.slug}/${graphData?.graph?.namespace}/graph/${graphData?.graph?.name}/checks/${id}`; @@ -581,6 +584,20 @@ export const ProposalDetails = ({ )} Pruning Errors + + {!checkExtensionDeliveryId ? ( + + ) : ( + getCheckIcon(!checkExtensionErrorMessage) + )} + Extension +