@kumori/aurora-backend-handler 1.1.75 → 1.1.77
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -955,11 +955,16 @@ export async function generateServiceSpec(
|
|
|
955
955
|
memoryRequirements: withDefaultValue(form.memoryRequirements, 0) * 1000,
|
|
956
956
|
registryUrl: withDefaultValue(form.registryUrl, "docker.io").trim(),
|
|
957
957
|
imageTag: withDefaultValue(form.imageTag, "").trim(),
|
|
958
|
-
registryCredentialsSecret: form.config.resources
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
958
|
+
registryCredentialsSecret: form.config.resources
|
|
959
|
+
.map((r) => {
|
|
960
|
+
if (r.type === "secret" && r.key === "registryCredentials") {
|
|
961
|
+
return r.name;
|
|
962
|
+
}
|
|
963
|
+
if (r.type === "secret" && r.name === "registryCredentials") {
|
|
964
|
+
return r.value;
|
|
965
|
+
}
|
|
966
|
+
})
|
|
967
|
+
.find((name) => name !== undefined),
|
|
963
968
|
config: {
|
|
964
969
|
parameters,
|
|
965
970
|
resources: componentResources,
|
|
@@ -1656,13 +1661,16 @@ async function generateServiceSpecDSL(
|
|
|
1656
1661
|
memoryRequirements: withDefaultValue(form.memoryRequirements, 0) * 1000,
|
|
1657
1662
|
registryUrl: withDefaultValue(form.registryUrl, "docker.io").trim(),
|
|
1658
1663
|
imageTag: withDefaultValue(form.imageTag, "").trim(),
|
|
1659
|
-
registryCredentialsSecret: form.
|
|
1660
|
-
|
|
1661
|
-
|
|
1662
|
-
|
|
1663
|
-
|
|
1664
|
-
|
|
1665
|
-
|
|
1664
|
+
registryCredentialsSecret: form.config.resources
|
|
1665
|
+
.map((r) => {
|
|
1666
|
+
if (r.type === "secret" && r.key === "registryCredentials") {
|
|
1667
|
+
return r.name;
|
|
1668
|
+
}
|
|
1669
|
+
if (r.type === "secret" && r.name === "registryCredentials") {
|
|
1670
|
+
return r.value;
|
|
1671
|
+
}
|
|
1672
|
+
})
|
|
1673
|
+
.find((name) => name !== undefined),
|
|
1666
1674
|
config: {
|
|
1667
1675
|
parameters,
|
|
1668
1676
|
resources: componentResources,
|
package/backend-handler.ts
CHANGED
|
@@ -748,7 +748,6 @@ export class BackendHandler {
|
|
|
748
748
|
eventHelper.environment.unsubscribe.clean(cleanCb),
|
|
749
749
|
);
|
|
750
750
|
const scaleCb = (data: Environment) => {
|
|
751
|
-
console.log("Scale called", data);
|
|
752
751
|
scaleEnvironment(data, token);
|
|
753
752
|
};
|
|
754
753
|
eventHelper.environment.subscribe.scale(scaleCb);
|
|
@@ -686,10 +686,8 @@ export const processRevisionData = (
|
|
|
686
686
|
const schemaResult = revisionData.revision
|
|
687
687
|
? extractStructuredSchema(revisionData)
|
|
688
688
|
: {};
|
|
689
|
-
console.log("DEBUG schemaResult", schemaResult);
|
|
690
689
|
const schema =
|
|
691
690
|
schemaResult && "parameters" in schemaResult ? schemaResult : {};
|
|
692
|
-
console.log("DEBUG schema", schema);
|
|
693
691
|
if (
|
|
694
692
|
revisionsMap &&
|
|
695
693
|
serviceId &&
|
|
@@ -701,9 +699,7 @@ export const processRevisionData = (
|
|
|
701
699
|
const revisionKey = `/tenant/${tenantId}/service/${serviceName}/revision/${revisionId}`;
|
|
702
700
|
const existing = revisionsMap.get(revisionKey);
|
|
703
701
|
if (existing) {
|
|
704
|
-
console.log("DEBUG: Updating existing revision in revisionsMap", revisionKey, existing);
|
|
705
702
|
revisionsMap.set(revisionKey, { ...existing, schema });
|
|
706
|
-
console.log("DEBUG: Updated revision in revisionsMap", revisionKey, revisionsMap.get(revisionKey));
|
|
707
703
|
} else {
|
|
708
704
|
revisionsMap.set(revisionKey, {
|
|
709
705
|
id: revisionId,
|
|
@@ -744,7 +740,6 @@ export const processRevisionData = (
|
|
|
744
740
|
errorMsg: "",
|
|
745
741
|
createdAt: "",
|
|
746
742
|
});
|
|
747
|
-
console.log("DEBUG: Added new revision to revisionsMap", revisionKey, revisionsMap.get(revisionKey));
|
|
748
743
|
}
|
|
749
744
|
}
|
|
750
745
|
|
|
@@ -813,11 +808,6 @@ export const processRevisionData = (
|
|
|
813
808
|
),
|
|
814
809
|
);
|
|
815
810
|
}
|
|
816
|
-
console.log("DEBUG: No deployment found in revisionData, applying schema to service with top-level parameters and resources.", service, topLevelParameters, topLevelResources, applySchemaToService({
|
|
817
|
-
...service,
|
|
818
|
-
parameters: topLevelParameters,
|
|
819
|
-
resources: topLevelResources,
|
|
820
|
-
}));
|
|
821
811
|
return applySchemaToService({
|
|
822
812
|
...service,
|
|
823
813
|
parameters: topLevelParameters,
|
|
@@ -194,10 +194,6 @@ export const handleServiceEvent = ({
|
|
|
194
194
|
const projectLabel = eventData.meta?.labels?.project;
|
|
195
195
|
const serviceRoles = roleMap.get(serviceFullKey) || [];
|
|
196
196
|
const serviceUsage = currentRevision?.usage || getDefaultUsage(eventData);
|
|
197
|
-
console.log("DEBUG currentRevision", currentRevision);
|
|
198
|
-
console.log("DEBUG currentRevision.usage", currentRevision?.usage);
|
|
199
|
-
console.log("DEBUG defaultData", getDefaultUsage(eventData));
|
|
200
|
-
console.log("DEBUG: serviceUsage", serviceUsage);
|
|
201
197
|
|
|
202
198
|
|
|
203
199
|
const serviceRevisions: Revision[] = [];
|