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

[Bug]: lint-fix workflow is failing on frontend even when frontend linting passes #5816

Open
1 task done
neubig opened this issue Dec 26, 2024 · 2 comments
Open
1 task done
Labels
bug Something isn't working fix-me Attempt to fix this issue with OpenHands

Comments

@neubig
Copy link
Contributor

neubig commented Dec 26, 2024

Is there an existing issue for the same bug?

  • I have checked the existing issues.

Describe the bug and reproduction steps

The lint-fix workflow is aimed to fix linting errors in both the TypeScript frontend and Python backend.

I applied this workflow to fix a Python backend error in this PR: #5783

However, the lint-fix workflow itself failed on TypeScript-related errors not related to Python: https://github.com/All-Hands-AI/OpenHands/actions/runs/12504900165/job/34887422935?pr=5783
(full log of errors below)

I suspect that this is due to some difference in the way linting commands are called in the lint and lint-fix workflows. We should investigate and fix this discrepancy.

OpenHands Installation

Docker command in README

OpenHands Version

No response

Operating System

None

Logs, Errors, Screenshots, and Additional Context

⎯⎯⎯⎯⎯⎯ Failed Suites 5 ⎯⎯⎯⎯⎯⎯⎯

 FAIL  __tests__/components/browser.test.tsx [ __tests__/components/browser.test.tsx ]
Error: Failed to resolve import "#/i18n/declaration" from "src/components/features/browser/empty-browser-message.tsx". Does the file exist?
 ❯ TransformPluginContext._formatError node_modules/vite/dist/node/chunks/dep-CB_7IfJ-.js:49255:41
 ❯ TransformPluginContext.error node_modules/vite/dist/node/chunks/dep-CB_7IfJ-.js:49250:16
 ❯ normalizeUrl node_modules/vite/dist/node/chunks/dep-CB_7IfJ-.js:64041:23
 ❯ async file:/home/runner/work/OpenHands/OpenHands/frontend/node_modules/vite/dist/node/chunks/dep-CB_7IfJ-.js:641[73](https://github.com/All-Hands-AI/OpenHands/actions/runs/12504900165/job/34887422935?pr=5783#step:7:74):39
 ❯ TransformPluginContext.transform node_modules/vite/dist/node/chunks/dep-CB_7IfJ-.js:64100:7
 ❯ PluginContainer.transform node_modules/vite/dist/node/chunks/dep-CB_7IfJ-.js:49096:18
 ❯ loadAndTransform node_modules/vite/dist/node/chunks/dep-CB_7IfJ-.js:51929:27

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[1/5]⎯

 FAIL  __tests__/routes/_oh.test.tsx [ __tests__/routes/_oh.test.tsx ]
Error: Failed to resolve import "#/i18n/declaration" from "src/components/shared/modals/account-settings/account-settings-form.tsx". Does the file exist?
 ❯ TransformPluginContext._formatError node_modules/vite/dist/node/chunks/dep-CB_7IfJ-.js:49255:41
 ❯ TransformPluginContext.error node_modules/vite/dist/node/chunks/dep-CB_7IfJ-.js:49250:16
 ❯ normalizeUrl node_modules/vite/dist/node/chunks/dep-CB_7IfJ-.js:64041:23
 ❯ async file:/home/runner/work/OpenHands/OpenHands/frontend/node_modules/vite/dist/node/chunks/dep-CB_7IfJ-.js:64173:39
 ❯ TransformPluginContext.transform node_modules/vite/dist/node/chunks/dep-CB_7IfJ-.js:64100:7
 ❯ PluginContainer.transform node_modules/vite/dist/node/chunks/dep-CB_7IfJ-.js:49096:18
 ❯ loadAndTransform node_modules/vite/dist/node/chunks/dep-CB_7IfJ-.js:51929:27

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[2/5]⎯

 FAIL  __tests__/components/chat/chat-interface.test.tsx [ __tests__/components/chat/chat-interface.test.tsx ]
Error: Failed to resolve import "#/i18n/declaration" from "src/components/shared/buttons/confirmation-buttons.tsx". Does the file exist?
 ❯ TransformPluginContext._formatError node_modules/vite/dist/node/chunks/dep-CB_7IfJ-.js:49255:41
 ❯ TransformPluginContext.error node_modules/vite/dist/node/chunks/dep-CB_7IfJ-.js:49250:16
 ❯ normalizeUrl node_modules/vite/dist/node/chunks/dep-CB_7IfJ-.js:64041:23
 ❯ async file:/home/runner/work/OpenHands/OpenHands/frontend/node_modules/vite/dist/node/chunks/dep-CB_7IfJ-.js:64173:39
 ❯ TransformPluginContext.transform node_modules/vite/dist/node/chunks/dep-CB_7IfJ-.js:64100:7
 ❯ PluginContainer.transform node_modules/vite/dist/node/chunks/dep-CB_7IfJ-.js:49096:18
 ❯ loadAndTransform node_modules/vite/dist/node/chunks/dep-CB_7IfJ-.js:51929:27

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[3/5]⎯

 FAIL  __tests__/components/file-explorer/explorer-tree.test.tsx [ __tests__/components/file-explorer/explorer-tree.test.tsx ]
Error: Failed to resolve import "#/i18n/declaration" from "src/components/features/file-explorer/explorer-tree.tsx". Does the file exist?
 ❯ TransformPluginContext._formatError node_modules/vite/dist/node/chunks/dep-CB_7IfJ-.js:49255:41
 ❯ TransformPluginContext.error node_modules/vite/dist/node/chunks/dep-CB_7IfJ-.js:49250:16
 ❯ normalizeUrl node_modules/vite/dist/node/chunks/dep-CB_7IfJ-.js:64041:23
 ❯ async file:/home/runner/work/OpenHands/OpenHands/frontend/node_modules/vite/dist/node/chunks/dep-CB_7IfJ-.js:64173:39
 ❯ TransformPluginContext.transform node_modules/vite/dist/node/chunks/dep-CB_7IfJ-.js:64100:7
 ❯ PluginContainer.transform node_modules/vite/dist/node/chunks/dep-CB_7IfJ-.js:49096:18
 ❯ loadAndTransform node_modules/vite/dist/node/chunks/dep-CB_7IfJ-.js:51929:27

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[4/5]⎯

 FAIL  __tests__/components/file-explorer/file-explorer.test.tsx [ __tests__/components/file-explorer/file-explorer.test.tsx ]
Error: Failed to resolve import "#/i18n/declaration" from "src/components/features/file-explorer/file-explorer.tsx". Does the file exist?
 ❯ TransformPluginContext._formatError node_modules/vite/dist/node/chunks/dep-CB_7IfJ-.js:49255:41
 ❯ TransformPluginContext.error node_modules/vite/dist/node/chunks/dep-CB_7IfJ-.js:49250:16
 ❯ normalizeUrl node_modules/vite/dist/node/chunks/dep-CB_7IfJ-.js:64041:23
 ❯ async file:/home/runner/work/OpenHands/OpenHands/frontend/node_modules/vite/dist/node/chunks/dep-CB_7IfJ-.js:64173:39
 ❯ TransformPluginContext.transform node_modules/vite/dist/node/chunks/dep-CB_7IfJ-.js:64100:7
 ❯ PluginContainer.transform node_modules/vite/dist/node/chunks/dep-CB_7IfJ-.js:49096:18
 ❯ loadAndTransform node_modules/vite/dist/node/chunks/dep-CB_7IfJ-.js:51929:27

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[5/5]⎯

 Test Files  5 failed | 35 passed | 2 skipped (42)
      Tests  127 passed | 18 skipped (145)
   Start at  14:20:26
   Duration  20.35s (transform 2.53s, setup 10.[85](https://github.com/All-Hands-AI/OpenHands/actions/runs/12504900165/job/34887422935?pr=5783#step:7:86)s, collect 9.10s, tests 6.15s, environment 19.43s, prepare 4.22s)

husky - pre-commit script failed (code 1)
Error: Process completed with exit code 1.
@neubig neubig added bug Something isn't working fix-me Attempt to fix this issue with OpenHands labels Dec 26, 2024
@openhands-agent
Copy link
Contributor

OpenHands started fixing the issue! You can monitor the progress here.

@openhands-agent
Copy link
Contributor

An attempt was made to automatically fix this issue, but it was unsuccessful. A branch named 'openhands-fix-issue-5816' has been created with the attempted changes. You can view the branch here. Manual intervention may be required.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working fix-me Attempt to fix this issue with OpenHands
Projects
None yet
Development

No branches or pull requests

2 participants