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

fix: Update frontend workflows to catch TypeScript errors #5347

Merged
merged 3 commits into from
Dec 1, 2024

Conversation

neubig
Copy link
Contributor

@neubig neubig commented Dec 1, 2024

This PR fixes issue #5343 where frontend TypeScript errors cause Python unit tests to fail but not frontend workflows.

Changes:

  1. First commit: Introduced a TypeScript error to reproduce the issue

    • Removed null check from textareaRef.current to trigger TypeScript error
    • Verified that Python tests fail but frontend tests pass
  2. Second commit: Added TypeScript compilation to frontend workflows

    • Added npm run make-i18n && tsc to frontend unit tests workflow
    • Added TypeScript compilation to lint workflow
    • This ensures TypeScript errors are caught by frontend-specific workflows
  3. Third commit: Fixed the TypeScript error

    • Added proper null check for textareaRef.current
    • Verified all workflows pass

These changes ensure that:

  1. TypeScript errors are caught by frontend-specific workflows
  2. Frontend issues do not cause Python tests to fail while frontend tests pass
  3. All workflows properly validate their respective areas of code

Fixes #5343


To run this PR locally, use the following command:

docker run -it --rm   -p 3000:3000   -v /var/run/docker.sock:/var/run/docker.sock   --add-host host.docker.internal:host-gateway   -e SANDBOX_RUNTIME_CONTAINER_IMAGE=docker.all-hands.dev/all-hands-ai/runtime:f985eb4-nikolaik   --name openhands-app-f985eb4   docker.all-hands.dev/all-hands-ai/openhands:f985eb4

@neubig neubig requested a review from mamoodi December 1, 2024 17:19
Copy link
Collaborator

@enyst enyst left a comment

Choose a reason for hiding this comment

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

Thank you so much for working on this, these workflows can be very annoying 😅

@neubig neubig enabled auto-merge (squash) December 1, 2024 17:37
@neubig neubig removed the request for review from mamoodi December 1, 2024 17:37
@neubig neubig merged commit 5672a31 into main Dec 1, 2024
14 checks passed
@neubig neubig deleted the fix-frontend-workflow branch December 1, 2024 17:45
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.

[Bug]: Frontend changes cause Python unit tests workflow to fail but not frontend workflow
3 participants