Skip to content

Conversation

@aponcedeleonch
Copy link
Member

The script is failing currently. I will invesitgate by runnin in this branch/PR

@claude
Copy link

claude bot commented Oct 23, 2025

Review Feedback

✅ Positive Changes

  • Better error handling: Process exit detection (L38-43) prevents silent failures
  • Improved logging: More granular feedback during health check attempts
  • Correct Python usage: Using uv run python instead of python3 (L50) aligns with project standards

🐛 Issues

1. Workflow dependency removal breaks functionality (.github/workflows/update-thv-models.yml:40-42)

  • Removed task install step, but the script depends on Python packages (datamodel-codegen at L90)
  • The generate-thv-models task has deps: [install] in Taskfile.yml, which won't execute in CI without explicit step
  • Fix: Restore the install step or add explicit uv sync before running the task

2. Conditional logic flaw (L65-69)

  • The if [ $i -eq $MAX_ATTEMPTS ] check occurs inside the loop, making it unreachable after successful connection
  • Should be placed after the loop completes
  • Current flow: Works but unnecessarily checks condition on every iteration

🔧 Suggested Improvements

scripts/generate_toolhive_models.sh:65-70 - Move max attempts check outside loop:

    done
    
    # Check moved after loop
    if [ $i -gt $MAX_ATTEMPTS ]; then
        echo "ERROR: thv serve did not become ready after $MAX_ATTEMPTS attempts"
        echo "Last response: $response"
        exit 1
    fi
fi

Remove temporary debugging trigger (L8-10) - Remember to remove the push trigger on fix-gha-generate-thv-models branch before merging

📊 Summary

  • Critical: Restore dependency installation in workflow
  • Minor: Refactor max attempts logic (works but suboptimal)
  • Cleanup: Remove debug trigger before merge

Review completed in ~90 seconds

@aponcedeleonch aponcedeleonch marked this pull request as draft October 23, 2025 14:25
@aponcedeleonch aponcedeleonch force-pushed the fix-gha-generate-thv-models branch 2 times, most recently from 2878659 to f15abf7 Compare October 24, 2025 12:35
@aponcedeleonch aponcedeleonch marked this pull request as ready for review October 24, 2025 12:36
@aponcedeleonch
Copy link
Member Author

Correctly works. PR generated: #23

@aponcedeleonch aponcedeleonch force-pushed the fix-gha-generate-thv-models branch from 239245c to 5936fd8 Compare October 24, 2025 12:43
The script is failing currently. I will invesitgate by runnin in this
branch/PR
@aponcedeleonch aponcedeleonch force-pushed the fix-gha-generate-thv-models branch from 5936fd8 to a6aaffe Compare October 29, 2025 08:17
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