fix: exclude database components from app releases and deployments

This commit is contained in:
2026-07-15 16:10:36 +09:00
parent 3945e42c53
commit 63e85d5306
+8 -2
View File
@@ -1008,9 +1008,14 @@ export class AppsService {
}
const app = release?.app ?? quickBuild!.component.app;
const images = release
const releaseImages = release
? parseReleaseImageTags(release.imageTags).images
: { [quickBuild!.component.name]: quickBuild!.image! };
const images = Object.fromEntries(
Object.entries(releaseImages).filter(([componentName]) => (
app.components.find((component) => component.name === componentName)?.type !== 'DATABASE'
)),
);
const deploymentLabel = release
? `${app.name} ${release.version}`
: `${app.name} ${quickBuild!.component.name} ${quickBuild!.commitSha?.slice(0, 7) ?? 'quick'}`;
@@ -3498,7 +3503,8 @@ function createReleaseImageTags(
const imageSource = normalizeImageSource(component.imageSource, component.type);
if (
!images[component.name]
&& (imageSource === 'EXTERNAL' || imageSource === 'DATABASE')
&& imageSource === 'EXTERNAL'
&& component.type !== 'DATABASE'
&& component.externalImage?.trim()
) {
images[component.name] = component.externalImage.trim();