-
Notifications
You must be signed in to change notification settings - Fork 0
ignore diagramfiles validation #2
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -93,12 +93,57 @@ jobs: | |
| run: | | ||
| echo "🔍 Validating vNext components with reference resolution..." | ||
|
|
||
| # Temporarily rename diagram files to exclude them from validation | ||
| echo "📋 Excluding diagram files from validation..." | ||
| DIAGRAM_FILES=$(find core -name "*.diagram.json" -type f 2>/dev/null || true) | ||
| if [ -n "$DIAGRAM_FILES" ]; then | ||
| echo "$DIAGRAM_FILES" | while read file; do | ||
| if [ -f "$file" ]; then | ||
| mv "$file" "${file}.skip" | ||
| echo " Excluded: $file" | ||
| fi | ||
| done | ||
| else | ||
| echo " No diagram files found to exclude" | ||
| fi | ||
|
|
||
| # Run validation with reference resolution | ||
| VALIDATION_EXIT_CODE=0 | ||
| if vnext validate --resolve-refs; then | ||
| echo "✅ vNext validation completed successfully" | ||
| else | ||
| VALIDATION_EXIT_CODE=$? | ||
| echo "⚠️ vNext validation found issues" | ||
| fi | ||
|
|
||
| # Restore diagram files | ||
| echo "📋 Restoring diagram files..." | ||
| SKIP_FILES=$(find core -name "*.diagram.json.skip" -type f 2>/dev/null || true) | ||
| if [ -n "$SKIP_FILES" ]; then | ||
| echo "$SKIP_FILES" | while read file; do | ||
| if [ -f "$file" ]; then | ||
| mv "$file" "${file%.skip}" | ||
| echo " Restored: ${file%.skip}" | ||
| fi | ||
| done | ||
| fi | ||
|
|
||
| # Exit with validation error code if validation failed | ||
| if [ $VALIDATION_EXIT_CODE -ne 0 ]; then | ||
| echo "" | ||
| echo "❌ vNext validation failed" | ||
| echo "Please check the validation errors above and fix them before proceeding" | ||
| echo "==========================================" | ||
| echo "Validation errors found in the following areas:" | ||
| echo "1. Schema files - Check if schema files are properly formatted" | ||
| echo "2. Task files - Check for missing required properties (tags, valid type values)" | ||
| echo "" | ||
| echo "Common issues to check:" | ||
|
Comment on lines
+131
to
+140
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. issue (bug_risk): The comment claims to propagate the original validation exit code, but the script always exits with status 1. The code always does if [ "$VALIDATION_EXIT_CODE" -ne 0 ]; then
# ... messages ...
exit "$VALIDATION_EXIT_CODE"
fiIf you instead want to normalize all failures to |
||
| echo "- Schema files should not be validated as component instances" | ||
| echo "- Task files must have 'tags' property" | ||
| echo "- Task 'type' values must be valid (not '13' or '14')" | ||
| echo "" | ||
| echo "Note: Diagram files (.diagram.json) are excluded from validation" | ||
| echo "Please fix the validation errors above before proceeding" | ||
| exit 1 | ||
| fi | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
suggestion (bug_risk): The
echo ... | while readpattern is brittle for filenames with spaces and can be simplified.echo "$DIAGRAM_FILES" | while read filewill split on spaces and special characters, so any diagram path containing them may be processed incorrectly. You can avoid this by iterating directly overfind’s output and preserving paths: