Compare commits

..

4 Commits

Author SHA1 Message Date
wendrul
ba775edef2 Merge remote-tracking branch 'origin/main' into folder-deploy
# Conflicts:
#	frontend/src/lib/utils_workspace_deploy.ts
2026-04-02 15:39:36 +02:00
wendrul
91f0a564b9 fix: deployment UIs for folders 2026-04-02 15:33:12 +02:00
Diego Imbert
c3a1c26be1 nit: revert ee.rs in substitute_ee_code.sh (#8672) 2026-04-02 10:16:28 +00:00
Ruben Fiszel
c87a6a0f2c fix: support branch-specific folder.meta.yaml in missing-meta check (#8661)
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-04-02 10:05:02 +00:00
4 changed files with 70 additions and 8 deletions

View File

@@ -84,7 +84,7 @@ fi
if [ "$REVERT" == "YES" ]; then
backend_dirpath="${root_dirpath}/backend/"
for ce_file in $(find "${root_dirpath}/backend" -name "*_ee.rs"); do
for ce_file in $(find "${root_dirpath}/backend" \( -name "*_ee.rs" -o -name "ee.rs" \)); do
if [ -L "${ce_file}" ]; then
rm "${ce_file}"
echo "Deleted symlink '${ce_file}'"

View File

@@ -2801,9 +2801,32 @@ export async function push(
}
}
for (const folderName of folderNames) {
try {
await stat(path.join("f", folderName, "folder.meta.yaml"));
} catch {
const basePath = path.join("f", folderName, "folder.meta.yaml");
const branchPath = getBranchSpecificPath(
`f/${folderName}/folder.meta.yaml`,
specificItems,
opts.branch,
);
let found = false;
// Check branch-specific variant first (e.g. folder.dev.meta.yaml)
if (branchPath) {
try {
await stat(branchPath);
found = true;
} catch {
// fall through to base path check
}
}
// Then check base path
if (!found) {
try {
await stat(basePath);
found = true;
} catch {
// not found
}
}
if (!found) {
missingFolders.push(folderName);
}
}

View File

@@ -397,4 +397,39 @@ describe("sync push missing folder detection", () => {
expect(output).not.toContain("Missing folder.meta.yaml");
});
});
test("no warning when branch-specific folder.meta.yaml exists", async () => {
await withIsolatedWorkspace(async ({ tempDir, runCLICommand }) => {
const uniqueId = Date.now();
const folderName = `branchmeta${uniqueId}`;
// wmill.yaml with branch-specific folders configured
await writeFile(
join(tempDir, "wmill.yaml"),
`defaultTs: bun\nincludes:\n - "**"\nexcludes: []\ngitBranches:\n dev:\n specificItems:\n folders:\n - "f/${folderName}"\n`,
"utf-8"
);
// Create folder with branch-specific meta only (no base folder.meta.yaml)
await mkdir(join(tempDir, "f", folderName), { recursive: true });
await writeFile(
join(tempDir, "f", folderName, "folder.dev.meta.yaml"),
`summary: ""\ndisplay_name: "${folderName}"\nowners: []\nextra_perms: {}\n`,
"utf-8"
);
await writeFile(
join(tempDir, "f", folderName, "test_script.ts"),
'export async function main() { return "hello"; }',
"utf-8"
);
const result = await runCLICommand(
["sync", "push", "--yes", "--branch", "dev", "--includes", `f/${folderName}/**`],
);
expect(result.code).toEqual(0);
const output = result.stdout + result.stderr;
expect(output).not.toContain("Missing folder.meta.yaml");
});
});
});

View File

@@ -132,10 +132,14 @@
}
})
for (const dep of sortedSet) {
allAlreadyExists[computeStatusPath(dep.kind, dep.path)] = await checkAlreadyExists(
dep.kind,
dep.path
)
try {
allAlreadyExists[computeStatusPath(dep.kind, dep.path)] = await checkAlreadyExists(
dep.kind,
dep.path
)
} catch {
allAlreadyExists[computeStatusPath(dep.kind, dep.path)] = false
}
}
dependencies = sortedSet.map((x) => ({
...x,