-
Notifications
You must be signed in to change notification settings - Fork 54
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
pi-migration-use-correct-git-rev #1911
Conversation
…reverting a process instance migration
WalkthroughWalkthroughThe recent changes across the Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant Frontend as ProcessInstanceMigratePage
participant Backend as ProcessInstanceService
participant Git as GitRepository
User->>Frontend: Initiate migration
Frontend->>Backend: Call migrate_process_instance()
Backend->>Backend: Invoke get_appropriate_git_revision()
Backend->>Git: Fetch appropriate git revision
Git-->>Backend: Return git revision
Backend-->>Frontend: Migration result
Frontend-->>User: Display migration result
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
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 as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
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: 0
Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Files selected for processing (3)
- spiffworkflow-backend/src/spiffworkflow_backend/services/process_instance_service.py (3 hunks)
- spiffworkflow-backend/tests/spiffworkflow_backend/unit/test_process_instance_service.py (4 hunks)
- spiffworkflow-frontend/src/routes/ProcessInstanceMigratePage.tsx (1 hunks)
Files skipped from review due to trivial changes (1)
- spiffworkflow-frontend/src/routes/ProcessInstanceMigratePage.tsx
Additional context used
Learnings (1)
spiffworkflow-backend/tests/spiffworkflow_backend/unit/test_process_instance_service.py (1)
Learnt from: jasquat PR: sartography/spiff-arena#1902 File: spiffworkflow-backend/tests/spiffworkflow_backend/integration/test_process_instances_controller.py:164-167 Timestamp: 2024-07-11T14:28:31.783Z Learning: When reviewing test cases, ensure not to add redundant assertions if the condition is already verified elsewhere in the code.
Additional comments not posted (6)
spiffworkflow-backend/tests/spiffworkflow_backend/unit/test_process_instance_service.py (4)
179-179
: Assertion Approved: Verifybpmn_version_control_identifier
.The assertion ensures that the
bpmn_version_control_identifier
is correctly set to "rev1" after creating the process instance.
246-246
: Assertion Approved: Verifybpmn_version_control_identifier
.The assertion ensures that the
bpmn_version_control_identifier
is correctly updated to "rev2" after migrating the process instance.
297-297
: Assertion Approved: Verifybpmn_version_control_identifier
.The assertion ensures that the
bpmn_version_control_identifier
is correctly updated to "rev2" after migrating the process instance.
320-335
: Assertions Approved: Verify migration details.The assertions ensure that the migration details are correctly logged and consistent with the expected values during the migration and reversion processes.
spiffworkflow-backend/src/spiffworkflow_backend/services/process_instance_service.py (2)
261-264
: Refactoring Approved: Useget_appropriate_git_revision
.The refactoring correctly uses the new method
get_appropriate_git_revision
to determine the appropriate git revision during the migration process.
282-310
: New Method Approved:get_appropriate_git_revision
.The new method correctly determines the appropriate git revision during the migration process, handling both normal migrations and reversions.
Fixes #1908
This updates the process instance migration process to use the old git revision on revert for both the process instance and the migration event.
Summary by CodeRabbit
New Features
Bug Fixes
Refactor
console.log
statements from the Process Instance Migration page.