Skip to content

fix: apply configured limits in bulk mode - #181

Closed
pcbeingused333 wants to merge 1 commit into
Countly:masterfrom
pcbeingused333:fix/c3523-bulk-limits
Closed

pcbeingused333 wants to merge 1 commit into
Countly:masterfrom
pcbeingused333:fix/c3523-bulk-limits

Conversation

@pcbeingused333

Copy link
Copy Markdown

Bulk event and user configuration truncation reads limits from instance properties that are never initialized. The normalized limits are stored in conf, so both configured and default limits are silently ignored.

Use the normalized configuration in add_event and add_user, matching where the constructor stores these limits. Regression tests cover event names, segmentation keys, values and counts, default event limits, and bulk user configuration limits.

Testing

  • node_modules/.bin/mocha --timeout 10000 test/tests_bulk_limits.js --exit: three failures before the fix, three passes after it.
  • node_modules/.bin/mocha --timeout 180000 test/tests_bulk_limits.js test/tests_bulk_fixes.js --exit --allow-uncaught: 12 passing.
  • node_modules/.bin/eslint lib/countly-bulk.js test/tests_bulk_limits.js: passes.

This change was prepared with assistance from OpenAI Codex.

@turtledreams

Copy link
Copy Markdown
Contributor

Thank you for finding this and for the clear description, @pcbeingused333! We carried the change over to #182, which targets staging, our development branch, and adapts it to our own style and rules: a CHANGELOG entry, tests in our existing bulk test suite, and the settings passed to add_user kept as given. Closing this one in favour of #182.

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