fix: ExpiryReaper orphan race + nodejs ESM entrypoint (v1.3.93)
This commit is contained in:
@@ -58,7 +58,7 @@ spec:
|
||||
serviceAccountName: fission-console
|
||||
containers:
|
||||
- name: console
|
||||
image: naeel/fission-console:v1.3.92
|
||||
image: naeel/fission-console:v1.3.93
|
||||
imagePullPolicy: Always
|
||||
ports:
|
||||
- containerPort: 8090
|
||||
|
||||
@@ -393,7 +393,17 @@ func (m *NSManager) reapExpiredFunctionsInNS(ctx context.Context, ns string, now
|
||||
}
|
||||
}
|
||||
|
||||
// Orphan packages — пакеты без соответствующей функции
|
||||
// Orphan packages — пакеты без соответствующей функции.
|
||||
// Перечитываем Functions заново (fresh LIST) чтобы избежать race condition:
|
||||
// новая функция может быть создана между снятием activeFunctions и этой проверкой.
|
||||
freshFunctions, freshErr := m.dyn.Resource(fission.FunctionGVR).Namespace(ns).List(ctx, metav1.ListOptions{})
|
||||
if freshErr != nil {
|
||||
return
|
||||
}
|
||||
freshFunctionSet := make(map[string]struct{}, len(freshFunctions.Items))
|
||||
for _, fn := range freshFunctions.Items {
|
||||
freshFunctionSet[fn.GetName()] = struct{}{}
|
||||
}
|
||||
packages, pkgListErr := m.dyn.Resource(fission.PackageGVR).Namespace(ns).List(ctx, metav1.ListOptions{})
|
||||
if pkgListErr == nil {
|
||||
for _, pkg := range packages.Items {
|
||||
@@ -402,7 +412,7 @@ func (m *NSManager) reapExpiredFunctionsInNS(ctx context.Context, ns string, now
|
||||
continue
|
||||
}
|
||||
fnName := strings.TrimSuffix(pkgName, "-pkg")
|
||||
if _, exists := activeFunctions[fnName]; !exists {
|
||||
if _, exists := freshFunctionSet[fnName]; !exists {
|
||||
log.Printf("cloud.ExpiryReaper: deleting orphan package %s/%s", ns, pkgName)
|
||||
_ = m.dyn.Resource(fission.PackageGVR).Namespace(ns).Delete(ctx, pkgName, metav1.DeleteOptions{})
|
||||
}
|
||||
|
||||
@@ -11,7 +11,8 @@ package runtime
|
||||
func DefaultEntrypoint(lang string) string {
|
||||
switch lang {
|
||||
case "nodejs":
|
||||
return "main"
|
||||
// main.js — явное расширение нужно для ESM-loader в node-env
|
||||
return "main.js"
|
||||
case "php":
|
||||
// Fission php-env: filename::functionName
|
||||
return "main.php::handler"
|
||||
|
||||
@@ -103,7 +103,7 @@
|
||||
<div class="nubes">NUBES</div>
|
||||
<div class="product">FISSION CONSOLE</div>
|
||||
</div>
|
||||
<div style="font-size:0.65rem; color:var(--text-secondary); margin-left:10px; align-self:center; opacity:0.7;">v1.3.92</div>
|
||||
<div style="font-size:0.65rem; color:var(--text-secondary); margin-left:10px; align-self:center; opacity:0.7;">v1.3.93</div>
|
||||
</div>
|
||||
<div class="row" style="margin:0;">
|
||||
<button class="btn ghost" onclick="reloadAll()">Refresh</button>
|
||||
@@ -626,7 +626,7 @@ psycopg2-binary" style="width:100%; box-sizing:border-box; font-family:monospace
|
||||
</div>
|
||||
|
||||
<div class="actions" style="justify-content:space-between; align-items:center;">
|
||||
<span style="font-size:0.75rem; color:var(--text-secondary);">v1.3.92</span>
|
||||
<span style="font-size:0.75rem; color:var(--text-secondary);">v1.3.93</span>
|
||||
<button class="btn ghost" onclick="closeHelp()">Закрыть</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user