Skip to content

Conversation

@eiresendez
Copy link
Contributor

@eiresendez eiresendez commented Dec 3, 2025

Issue & Reproduction Steps

Exporting a project that references users in massive groups (e.g., banner_active with ~64k members) caused the export to expand group memberships, pulling tens of thousands of users. The export exceeded memory/time limits and returned 500.

Example payload: project with 6 assets (Project, Process, Script, DataSource, 3 Screens) where the Script has run_as_user_id = 1 and the Process/Launchpad/SavedSearches reference many groups (tele_, glda_, banner_active, etc.). Reproducing on such an instance triggered fatal timeouts.

Solution

  • Stopped exporting group members: GroupExporter no longer expands users; UserExporter still exports group entities but without members.
  • Aligned import: GroupExporter import now skips syncing users (logs the skip) and only syncs permissions.
  • Tests: marked GroupExporterTest::testGroupWithUsers as skipped since member export/import is no longer supported.

How to Test

Preferably test locally, use the DB generated in the SCO ticket and exported project json in the FOUR ticket..

  1. Export a project similar to the “Test ER” example (6 assets: Project, Process, Script, DataSource, 3 Screens) with users assigned to large groups (64k members). Confirm the export completes in <30s.
  2. Inspect the generated JSON (test_er.json): expect Group: 27, User: 3 with no users arrays or member data; groups include banner_active, tele_* and glda_* referenced by saved searches/launchpad/process assignments.
  3. Re-import the export: permissions on groups/users should restore; no group memberships should be created.

Related Tickets & Packages

ci:deploy

Code Review Checklist

  • I have pulled this code locally and tested it on my instance, along with any associated packages.
  • This code adheres to ProcessMaker Coding Guidelines.
  • This code includes a unit test or an E2E test that tests its functionality, or is covered by an existing test.
  • This solution fixes the bug reported in the original ticket.
  • This solution does not alter the expected output of a component in a way that would break existing Processes.
  • This solution does not implement any breaking changes that would invalidate documentation or cause existing Processes to fail.
  • This solution has been tested with enterprise packages that rely on its functionality and does not introduce bugs in those packages.
  • This code does not duplicate functionality that already exists in the framework or in ProcessMaker.
  • This ticket conforms to the PRD associated with this part of ProcessMaker.

Note

Avoid exporting/importing group memberships; only group permissions are referenced/synced, with tests adjusted to reflect no membership copying.

  • Import/Export:
    • GroupExporter no longer expands or imports users; logs skips and only handles permissions reference on export and syncs permissions on import.
  • Tests:
    • GroupExporterTest::testGroupWithUsers marked skipped due to removed member export/import.
    • UserExporterTest updated to assert group memberships are not copied during import (original memberships remain).

Written by Cursor Bugbot for commit 2d0da95. This will update automatically on new commits. Configure here.

Copy link
Contributor

@CarliPinell CarliPinell left a comment

Choose a reason for hiding this comment

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

Tested and approved

Screen.Recording.2025-12-05.at.10.12.33.AM.mov

@vladyrichter
Copy link

QA server K8S was successfully deployed https://ci-976d7ef8b4.engk8s.processmaker.net

@processmaker-sonarqube
Copy link

Quality Gate passed Quality Gate passed

Issues
0 New issues
0 Fixed issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarQube

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.

4 participants