[NAE-2464] Post release fixes - #464
Conversation
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
WalkthroughThe PR adds executor-backed asynchronous action execution, updates Elastic full-text queries and Groovy action imports, revises composite identifier queries, qualifies migration dependencies, narrows management access, expands script imports, and updates release references to 7.0.2. ChangesAsynchronous action execution
Elastic full-text search
Groovy action import discovery
Composite identifier migration
Migration and management configuration
Release version updates
Estimated code review effort: 4 (Complex) | ~60 minutes Possibly related PRs
Suggested labels: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
…elpers to use a dedicated MongoTemplate bean (`migrationMongoTemplate`) with fallback logic in multi-database setups.
…Id` and deprecate `findByNetworkIdAndObjectId`.
…te management and enhanced executor configuration. - Added methods to `ActionDelegate` to manage asynchronous execution lifecycle (`retainForAsyncExecution`, `releaseAfterAsyncExecution`, `clearAfterExecution`). - Enhanced `AsyncRunner` with delegate state tracking and custom `actionsExecutor`. - Added `async_run.xml` test Petri net and corresponding test cases to validate asynchronous action handling.
…te management and enhanced executor configuration. - Added methods to `ActionDelegate` to manage asynchronous execution lifecycle (`retainForAsyncExecution`, `releaseAfterAsyncExecution`, `clearAfterExecution`). - Enhanced `AsyncRunner` with delegate state tracking and custom `actionsExecutor`. - Added `async_run.xml` test Petri net and corresponding test cases to validate asynchronous action handling.
- Update `server-patterns` to replace `/manage/**` with `/manage/health` - Configure `management.endpoint.shutdown.enabled` as `false` across properties - Expand `management.endpoints.web.exposure.include` for additional actuator endpoints
…logic; consolidate MongoTemplate usage to default bean.
# Conflicts: # application-engine/src/test/groovy/com/netgrif/application/engine/TestHelper.groovy # application-engine/src/test/groovy/com/netgrif/application/engine/action/ActionDelegateTest.groovy
… and `TestHelper` for consistency and clarity.
…d` and deprecate `findByNetworkIdAndObjectId`; update tests and enums accordingly.
…ariable naming consistency.
…tringQuery` with `BoolQuery`, introduce `FullTextField` model, and enhance wildcard handling.
…ce static imports with dynamic discovery, introduce `ACTION_IMPORT_PACKAGES`, and optimize class loading.
[NAE-2464] Release 1.0.1 Bugfixes
There was a problem hiding this comment.
Actionable comments posted: 6
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In
`@application-engine/src/main/java/com/netgrif/application/engine/configuration/properties/MigrationProperties.java`:
- Around line 24-33: Use MigrationProperties.mongoTemplateBeanName when wiring
the migration helpers instead of hard-coded `@Qualifier`("mongoTemplate")
injection. Update CaseMigrationHelper, PetriNetMigrationHelper, and
TaskMigrationHelper to resolve the configured bean, falling back to the default
mongoTemplate bean when unavailable; update MigrationProperties only as needed
to support this wiring.
In
`@application-engine/src/main/java/com/netgrif/application/engine/configuration/TaskExecutionConfiguration.java`:
- Around line 20-26: Update the actionsExecutor() ThreadPoolTaskExecutor
configuration to set a finite queue capacity, define a maxPoolSize, and
explicitly configure a RejectedExecutionHandler for submissions beyond available
capacity. Preserve the existing core pool size and thread name prefix while
ensuring overload behavior is intentional.
In
`@application-engine/src/main/java/com/netgrif/application/engine/elastic/service/ElasticCaseService.java`:
- Around line 579-585: Update boost parsing in the fulltext field definition
handling to accept the parsed value only when Float.isFinite(boost) and boost >
0. Treat NaN, infinities, zero, and negative values like NumberFormatException,
log the invalid input, and preserve the default 1.0f fallback.
- Around line 559-566: Update the full-text term normalization stream to
preserve backslashes through splitting and trimming, removing the pre-escaping
backslash deletion and the removeDanglingEscapeCharacters mapping. Ensure terms
flow unchanged into escapeWildcardValue so literal backslashes in paths such as
C:\temp are retained.
In
`@application-engine/src/main/java/com/netgrif/application/engine/event/GroovyShellFactory.java`:
- Around line 57-91: Update selectActionImport to emit a warning when multiple
most-specific candidates remain tied, including the conflicting class names in
the diagnostic, before returning Optional.empty(). Preserve the existing
behavior for unique winners and unresolved conflicts, and add focused tests
covering both tie and non-tie specificity resolution.
In `@application-engine/src/test/resources/petriNets/async_run.xml`:
- Around line 16-19: Make the async fixture in
application-engine/src/test/resources/petriNets/async_run.xml lines 16-19
persist a test-observable side effect instead of only printing useCase.stringId.
Update the test in
application-engine/src/test/groovy/com/netgrif/application/engine/action/ActionDelegateTest.groovy
lines 183-197 to await that persisted side effect with a bounded timeout and
assert it occurred, covering submission, execution, and delegate release.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: e64b8de1-0138-4bec-ae5b-11a5a2934a26
📒 Files selected for processing (23)
application-engine/src/main/groovy/com/netgrif/application/engine/AsyncRunner.groovyapplication-engine/src/main/groovy/com/netgrif/application/engine/migration/helpers/CaseMigrationHelper.groovyapplication-engine/src/main/groovy/com/netgrif/application/engine/migration/helpers/PetriNetMigrationHelper.groovyapplication-engine/src/main/groovy/com/netgrif/application/engine/migration/helpers/TaskMigrationHelper.groovyapplication-engine/src/main/groovy/com/netgrif/application/engine/petrinet/domain/dataset/logic/action/ActionDelegate.groovyapplication-engine/src/main/java/com/netgrif/application/engine/configuration/MongoClientConfiguration.javaapplication-engine/src/main/java/com/netgrif/application/engine/configuration/TaskExecutionConfiguration.javaapplication-engine/src/main/java/com/netgrif/application/engine/configuration/properties/MigrationProperties.javaapplication-engine/src/main/java/com/netgrif/application/engine/elastic/service/ElasticCaseService.javaapplication-engine/src/main/java/com/netgrif/application/engine/elastic/service/model/FullTextField.javaapplication-engine/src/main/java/com/netgrif/application/engine/event/GroovyShellFactory.javaapplication-engine/src/main/java/com/netgrif/application/engine/petrinet/domain/roles/ProcessRoleRepository.javaapplication-engine/src/main/java/com/netgrif/application/engine/workflow/domain/repositories/CaseRepository.javaapplication-engine/src/main/java/com/netgrif/application/engine/workflow/service/CaseEventHandler.javaapplication-engine/src/main/resources/application-old-dev.propertiesapplication-engine/src/main/resources/application-old.propertiesapplication-engine/src/main/resources/application.yamlapplication-engine/src/test/groovy/com/netgrif/application/engine/TestHelper.groovyapplication-engine/src/test/groovy/com/netgrif/application/engine/action/ActionDelegateTest.groovyapplication-engine/src/test/groovy/com/netgrif/application/engine/action/AssignRemoveTest.groovyapplication-engine/src/test/resources/application-test.yamlapplication-engine/src/test/resources/petriNets/async_run.xmldocker-compose.yml
…ce static imports with dynamic discovery, introduce `ACTION_IMPORT_PACKAGES`, and optimize class loading.
- Update version to 7.0.2 in all affected `pom.xml` files - Modify `Dockerfile` and `Dockerfile.multi-stage` to use version 7.0.2 - Adjust `docker-compose.yml` to reflect the new image version
Remove the dedicated actions executor bean Log ambiguous automatic Groovy action imports instead of silently skipping them Prevent dev profile from dropping MongoDB and Elasticsearch data by default Update deprecated case repository methods to version 7.0.2 Remove obsolete migration MongoTemplate bean configuration Validate Elasticsearch full-text field boost values before applying them
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
application-engine/src/main/java/com/netgrif/application/engine/elastic/service/ElasticCaseService.java (1)
432-441: 🚀 Performance & Scalability | 🔵 TrivialReview the cost of leading wildcard queries.
The code wraps every term in
*...*and sends it to every configured field. This can multiply wildcard-query cost by the number of terms and fields. Measure this path on representative indexes and use an indexed n-gram or contains strategy if latency is not bounded.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@application-engine/src/main/java/com/netgrif/application/engine/elastic/service/ElasticCaseService.java` around lines 432 - 441, Review the full-text query construction around the fullTextTerms and fullTextFields loops, where wildcardValue currently adds leading and trailing wildcards for every term-field combination. Measure representative-index latency and replace the leading-wildcard approach with an indexed n-gram or equivalent contains strategy when needed, while preserving term matching across the configured fields and existing boosts.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Outside diff comments:
In
`@application-engine/src/main/java/com/netgrif/application/engine/elastic/service/ElasticCaseService.java`:
- Around line 432-441: Review the full-text query construction around the
fullTextTerms and fullTextFields loops, where wildcardValue currently adds
leading and trailing wildcards for every term-field combination. Measure
representative-index latency and replace the leading-wildcard approach with an
indexed n-gram or equivalent contains strategy when needed, while preserving
term matching across the configured fields and existing boosts.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: 94f4db83-f583-4be5-98fc-e48aecb45af6
📒 Files selected for processing (5)
application-engine/src/main/groovy/com/netgrif/application/engine/AsyncRunner.groovyapplication-engine/src/main/java/com/netgrif/application/engine/configuration/properties/MigrationProperties.javaapplication-engine/src/main/java/com/netgrif/application/engine/elastic/service/ElasticCaseService.javaapplication-engine/src/main/java/com/netgrif/application/engine/event/GroovyShellFactory.javaapplication-engine/src/main/java/com/netgrif/application/engine/workflow/domain/repositories/CaseRepository.java
💤 Files with no reviewable changes (1)
- application-engine/src/main/java/com/netgrif/application/engine/configuration/properties/MigrationProperties.java
…r regex handling consistency in full-text search normalization methods.
503ab24
…ull-text search behavior and edge cases.
…r string normalization in full-text search
…ion for method usage
…e string replacement in full-text search normalization
|



Description
Post release fixes after 7.0.1
Implements NAE-2464
Dependencies
No new dependencies were introduced
Third party dependencies
No new dependencies were introduced
Blocking Pull requests
There are no dependencies on other PR
How Has Been This Tested?
This was tested manually and with unit tests.
Test Configuration
Checklist:
Summary by CodeRabbit