-
Notifications
You must be signed in to change notification settings - Fork 6
[NAE-2147] Merge 6.5.0 into 7.0.0 #334
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
Conversation
- Refactor `importProcess` to `importProcessOnce` for improved idempotency and streamline dashboard and filter runners by removing redundant method calls and unused imports.
Remove redundant `parentPath` call in `MenuItemService` during node path creation.
- Replace `FilterRunner` with `MenuProcessRunner` in `MenuItemApiTest` and inject `MenuProcessRunner` in `TestHelper`.
- Refactor `FilterImportExportTest` to use `PetriNetService` for net retrieval. - Update visibility of constants in `FilterRunner` from private to public for reuse. - Remove redundant constants in `FilterImportExportTest`.
- Add `DashboardItemBody` to `actions.imports` in `application.yaml`. - Refine `menu_items_list.value` checks in `dashboard_item.xml` to handle empty string cases.
WalkthroughThis change renames the Changes
Sequence Diagram(s)sequenceDiagram
participant Runner as StartupRunner
participant Helper as ImportHelper
participant PetriNetRepo as PetriNetRepository
Runner->>Helper: importProcessOnce(msg, netId, netFile)
Helper->>PetriNetRepo: findByIdentifier(netId)
alt PetriNet exists
Helper-->>Runner: Return existing PetriNet (Optional)
else PetriNet not found
Helper->>PetriNetRepo: createFromFile(netFile)
Helper-->>Runner: Return new PetriNet (Optional)
end
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~15 minutes Suggested labels
Note ⚡️ Unit Test Generation is now available in beta!Learn more here, or try it out under "Finishing Touches" below. 📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (6)
✨ Finishing Touches
🧪 Generate unit tests
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
The base branch was changed.
application-engine/src/main/resources/petriNets/engine-processes/dashboard_item.xml
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (7)
application-engine/src/main/java/com/netgrif/application/engine/importer/service/Importer.java(1 hunks)application-engine/src/main/java/com/netgrif/application/engine/petrinet/service/PetriNetService.java(2 hunks)application-engine/src/test/groovy/com/netgrif/application/engine/petrinet/domain/EventTest.groovy(1 hunks)application-engine/src/test/groovy/com/netgrif/application/engine/petrinet/domain/PetriNetTest.groovy(2 hunks)application-engine/src/test/resources/net_clone2.xml(1 hunks)application-engine/src/test/resources/net_clone3.xml(1 hunks)nae-object-library/src/main/java/com/netgrif/application/engine/objects/petrinet/domain/version/Version.java(1 hunks)
✅ Files skipped from review due to trivial changes (4)
- application-engine/src/test/groovy/com/netgrif/application/engine/petrinet/domain/EventTest.groovy
- application-engine/src/test/resources/net_clone2.xml
- application-engine/src/test/resources/net_clone3.xml
- application-engine/src/main/java/com/netgrif/application/engine/importer/service/Importer.java
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: in elasticpetrinetservice class, petrinetservice is properly initialized using @lazy setter injectio...
Learnt from: tuplle
PR: netgrif/application-engine#331
File: application-engine/src/main/java/com/netgrif/application/engine/elastic/service/ElasticPetriNetService.java:45-46
Timestamp: 2025-07-29T17:19:18.300Z
Learning: In ElasticPetriNetService class, petriNetService is properly initialized using @Lazy setter injection rather than constructor injection. This pattern with @Lazy @Autowired setter methods is commonly used in Spring to resolve circular dependencies and is a valid alternative to constructor injection.
Applied to files:
application-engine/src/main/java/com/netgrif/application/engine/petrinet/service/PetriNetService.java
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
- GitHub Check: task-list-completed
- GitHub Check: Build
- GitHub Check: task-list-completed
- GitHub Check: task-list-completed
🔇 Additional comments (4)
application-engine/src/main/java/com/netgrif/application/engine/petrinet/service/PetriNetService.java (1)
369-371: LGTM!The formatting improvement enhances code readability without affecting functionality.
application-engine/src/test/groovy/com/netgrif/application/engine/petrinet/domain/PetriNetTest.groovy (3)
55-59: LGTM!The addition of new test resources supports comprehensive version testing scenarios.
106-127: LGTM!The
testVersion()method provides comprehensive test coverage for version progression through different version types (PATCH, MAJOR, MINOR). The assertions verify correct version increments and the final count validation ensures all versions are properly stored.
130-141: LGTM!The
testVersioningConflicts()method effectively tests the version conflict detection feature by verifying that importing the same version twice throws the expectedIllegalArgumentExceptionwith the correct error message.
Description
Implements NAE-2147
Dependencies
Third party dependencies
No new dependencies were introduced
Blocking Pull requests
There are no dependencies on other PR
How Has Been This Tested?
Manually
Checklist:
Summary by CodeRabbit
Bug Fixes
New Features
Refactor
Chores
Documentation