Skip to content

Fix race conditions, memory leaks, Chrome crashes, and add GitHub Actions CI#104

Merged
so5 merged 104 commits into
RIKEN-RCCS:dev2025from
so5:feature/server-enhancements
Apr 25, 2026
Merged

Fix race conditions, memory leaks, Chrome crashes, and add GitHub Actions CI#104
so5 merged 104 commits into
RIKEN-RCCS:dev2025from
so5:feature/server-enhancements

Conversation

@so5
Copy link
Copy Markdown
Collaborator

@so5 so5 commented Apr 22, 2026

Summary

This PR contains a series of bug fixes and improvements developed and validated with a full E2E test suite (mock and real-app, local and CI).

All 681 E2E tests pass (660 passing, 20 pending) in:

  • ✅ Local mock E2E (npm run -w test test:e2e:mock)
  • ✅ Local real-app E2E (npm run -w test test:e2e)
  • ✅ GitHub Actions CI (mock E2E with Docker containers)

Key Changes

1. Chrome Renderer Crash Fix

  • Added :menu-props="{ transition: false }" to all v-combobox and v-select components in client/
  • Root cause: Vuetify's v-combobox dropdown and v-snackbar both use <Teleport> to render in .v-overlay-container. When they render simultaneously, Chrome's GPU rendering layers conflict and the renderer crashes.
  • Fix disables the dropdown transition animation, preventing the concurrent overlay conflict.

2. componentProperty Update Fix

  • Component properties are now only sent to the server when the componentProperty panel is closed (not on every keystroke), except for inputFiles and outputFiles which are managed by dedicated socket events.
  • Added a sentinel mechanism to ensure all pending edit operations complete before stopping/clearing the project queue.
  • Removed the updateComponent call from store/index.js (was causing double-sends and data corruption).

3. server: updateComponent — inputFiles/outputFiles Protection

  • server/app/core/updateComponent.js: patches for inputFiles and outputFiles are now ignored entirely.
  • These arrays are managed exclusively by dedicated socket events (addOutputFile, removeOutputFile, etc.). Allowing updateComponent to modify them caused data corruption (files deleted when panel opened with stale state).

4. Race Condition Fixes

  • Fixed race condition in fileBrowser (getFiles response ordering)
  • Fixed race condition in componentProperty (component state updates during editing)
  • Used live component state for context menu clean/delete decisions

5. Memory Leak Fixes

  • Introduced serialization queue dedicated per project (SBS — Serial Bounded Scheduler) to prevent queue bloat
  • Fixed resource leaks in project management code

6. E2E Test Improvements

  • Added resetMockProjectList task to reset mock server state between spec files (prevents pagination issues from accumulated projects)
  • Fixed remoteHost.cy.js timing: added timeout for buttons that disappear during socket-triggered re-renders
  • Fixed goHome command: handles cross-server navigation after auth.cy.js (which visits port 8090)
  • Fixed component tests: foreach/while/workflow state cleanup in beforeEach

7. GitHub Actions CI Workflow

  • Added .github/workflows/run_cypress.yml for automated E2E testing on every push
  • Runs full mock E2E suite with 4 Docker containers: wheel, wheel_auth, mock, gateway
  • Mounts 512MB tmpfs at /dev/shm to prevent Chrome renderer crash (GitHub Actions default is 64MB)
  • Uploads screenshots and videos on failure for debugging
  • Added test/wheel_config_auth/ config files for the anonymous-login WHEEL instance used by auth.cy.js

so5 and others added 30 commits March 13, 2026 00:48
…onent on remotehost even if cleanup Flag is true
so5 and others added 28 commits April 14, 2026 07:37
…onditions

 - componentGraph: check targetComponent.state instead of projectState
   to decide between "clean" and "delete" context menu items so the menu
   reflects each component's individual run state
 - fileBrowser: reset activeItem/selectedFile when switching to a
   different component to prevent stale selection glitches
 - fileBrowser: add fileListSeq counter to drop in-flight getFileList
   callbacks that arrive after a newer request was issued
 - remotehostManager: track isLoaded flag and show table loading indicator
   until both getJobSchedulerLabelList and getHostList responses arrive

 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
 componentContextMenuItems used targetComponent.state which could be
 stale after doClean replaced the component object in the store. Look up
 the current component by ID in currentComponent.descendants to get the
 live state, falling back to targetComponent.state when not found.

 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…visibility

- Use safer way to updateComponent
- except inputFiles and outputFiles when updating with data from server
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Add wheel_auth container to run_cypress.yml (port 8090) for auth.cy.js
- Add wait for port 8090 to be ready
- Add socket.io-client to test/package.json dependencies (required for resetMockProjectList task)
- Add wheel_auth to cleanup/log collection steps

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Remove test/wheel_config_auth/ from .gitignore (files contain only empty JSON, no sensitive data)
- Add negation rules for remotehost.json and projectList.json in wheel_config_auth/
- Required by run_cypress.yml to start wheel_auth container for auth.cy.js tests

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…navigation

- Add --disable-dev-shm-usage Chrome flag in CI only (GitHub Actions /dev/shm
  is 64MB, causing Chrome renderer crash during file upload in importProject)
- Fix goHome command to navigate to baseUrl when browser is left on a different
  server (e.g., after auth.cy.js which uses port 8090)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
GitHub Actions runners only have 64MB /dev/shm by default, which causes
Chrome to crash when processing file uploads in importProject.cy.js.
Mount a 512MB tmpfs at /dev/shm before running tests.
Remove --disable-dev-shm-usage flag (no longer needed with sufficient shm).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- storage.cy.js: add .should('not.be.disabled') before every
  file_browser-remove_file-btn click. The remove button's enabled
  state depends on Vue's reactive isFileSelected computed which
  updates asynchronously after a treeview click. Without the guard,
  Cypress can attempt the click before the DOM update propagates,
  resulting in a 'element is disabled' error in a warm browser.

- commands-workFlow.js (cleanFileBrowserItems): same guard added
  for consistency and to prevent silent cleanup failures.

- task.cy.js: correct the assertion for
  'シェルスクリプト選択セレクトボックス表示確認' from
  .should('be.not.visible') to .should('be.visible').
  The test opens the advanced panel and the test name explicitly
  says the combobox should be displayed. The previous assertion
  accidentally passed because Cypress caught the element during
  the Vuetify expansion-panel open animation (height 0,
  overflow hidden) before it became visible. In a warm browser
  the animation completes faster and the incorrect assertion fails.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@so5 so5 merged commit 7f44304 into RIKEN-RCCS:dev2025 Apr 25, 2026
@so5 so5 deleted the feature/server-enhancements branch April 25, 2026 14:20
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.

3 participants