Merge pull request #1177 from Molecule-AI/main

chore: fast-forward staging to main after PR #1171 merge
This commit is contained in:
molecule-ai[bot] 2026-04-21 00:21:26 +00:00 committed by GitHub
commit 99acfd9592
4 changed files with 12 additions and 7 deletions

View File

@ -18,7 +18,6 @@ interface MenuItem {
export function ContextMenu() {
const contextMenu = useCanvasStore((s) => s.contextMenu);
const closeContextMenu = useCanvasStore((s) => s.closeContextMenu);
const removeNode = useCanvasStore((s) => s.removeNode);
const updateNodeData = useCanvasStore((s) => s.updateNodeData);
const selectNode = useCanvasStore((s) => s.selectNode);
const setPanelTab = useCanvasStore((s) => s.setPanelTab);

View File

@ -40,7 +40,6 @@ const mockStore = {
nodeData: Record<string, unknown>;
} | null,
closeContextMenu,
removeNode: vi.fn(),
updateNodeData: vi.fn(),
selectNode: vi.fn(),
setPanelTab: vi.fn(),

View File

@ -2,6 +2,8 @@ package handlers
import (
"fmt"
"log"
"strings"
"gopkg.in/yaml.v3"
)
@ -39,6 +41,11 @@ func missingRequiredEnv(configFiles map[string][]byte, envVars map[string]string
}
var schema requiredEnvSchema
if err := yaml.Unmarshal(raw, &schema); err != nil {
// Safe default: the in-container preflight is the source of truth
// for config.yaml shape, so we don't block the provision here. But
// log at WARN so operators can notice a template with malformed
// YAML — otherwise a silently-skipped preflight is invisible.
log.Printf("Preflight: WARN — config.yaml unparseable, skipping required_env check: %v", err)
return nil
}
if len(schema.RuntimeConfig.RequiredEnv) == 0 {
@ -64,7 +71,7 @@ func formatMissingEnvError(missing []string) string {
)
}
return fmt.Sprintf(
"missing required env vars %q — add them under Config → Env Vars (or as Global secrets) and retry",
missing,
"missing required env vars %s — add them under Config → Env Vars (or as Global secrets) and retry",
strings.Join(missing, ", "),
)
}

View File

@ -117,8 +117,8 @@ func TestFormatMissingEnvError_Single(t *testing.T) {
}
func TestFormatMissingEnvError_Multiple(t *testing.T) {
msg := formatMissingEnvError([]string{"A", "B"})
if !strings.Contains(msg, "A") || !strings.Contains(msg, "B") {
t.Errorf("message should name both vars: %q", msg)
msg := formatMissingEnvError([]string{"FOO", "BAR"})
if !strings.Contains(msg, "FOO, BAR") {
t.Errorf("multi-var message should join with ', ' — got %q", msg)
}
}