Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check Requirements #677

Merged
merged 2 commits into from
Dec 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 25 additions & 10 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 9 additions & 1 deletion packages/dbos-cloud/applications/deploy-app-code.ts
Original file line number Diff line number Diff line change
Expand Up @@ -135,13 +135,21 @@ export async function deployAppCode(
}
} else if (appLanguage === AppLanguages.Python as string) {
logger.debug("Checking for requirements.txt...");
const requirementsTxtExists = existsSync(path.join(process.cwd(), "requirements.txt"));
const requirementsPath = path.join(process.cwd(), "requirements.txt")
const requirementsTxtExists = existsSync(requirementsPath);
logger.debug(` ... requirements.txt found: ${requirementsTxtExists}`);

if (!requirementsTxtExists) {
logger.error("No requirements.txt found. Please create one before deploying.");
return 1;
}

const content = fs.readFileSync(requirementsPath, 'utf8');
if (!content.includes("dbos")) {
logger.error("Your requirements.txt does not include 'dbos'. Please make sure you include all your dependencies.");
return 1;
}

} else {
logger.error(`dbos-config.yaml contains invalid language ${appLanguage}`)
return 1;
Expand Down
Loading