Feat: Add YAML validation for compose content in deployment flows by austin047 · Pull Request #46 · flatrun/ui · GitHub
Skip to content

Feat: Add YAML validation for compose content in deployment flows#46

Open
austin047 wants to merge 2 commits into
flatrun:mainfrom
austin047:fix/yaml-validation
Open

Feat: Add YAML validation for compose content in deployment flows#46
austin047 wants to merge 2 commits into
flatrun:mainfrom
austin047:fix/yaml-validation

Conversation

@austin047

@austin047 austin047 commented Feb 19, 2026

Copy link
Copy Markdown
  • Add a method to validate compose YAML.
  • Use validation in NewDeploymentModal and DeploymentDetailView before submission.
image

@austin047 austin047 marked this pull request as ready for review February 19, 2026 00:43
@sourceant

sourceant Bot commented Feb 19, 2026

Copy link
Copy Markdown

@sourceant sourceant Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review complete. See the overview comment for a summary.

Comment thread src/utils/yaml.ts
return { valid: false, error: "Compose content is empty" };
}
try {
parse(trimmed);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

By default, the yaml package's parse function might only throw for critical syntax errors. For stricter validation (e.g., catching duplicate keys which are common in Compose files), it is better to check for warnings or use a stricter parsing configuration if available in the version installed.

Suggested change
parse(trimmed);
parse(trimmed, { uniqueKeys: true });

Comment thread .env.example
@@ -1 +1 @@
VITE_API_URL=http://localhost:8080

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The API URL has been changed from port 8080 to 8090 and appended with /api. Ensure this change is intentional for the example environment and matched in server-side configurations.

Suggested change
VITE_API_URL=http://localhost:8080
VITE_API_URL=http://localhost:8090/api

@nfebe

nfebe commented Feb 21, 2026

Copy link
Copy Markdown
Contributor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants