-
Notifications
You must be signed in to change notification settings - Fork 4.2k
feat(api-service): api for env level change fixes NV-6155 #8608
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
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
✅ Deploy Preview for dashboard-v2-novu-staging canceled.
|
Updated imports and usage of WorkflowOriginEnum to ResourceOriginEnum in environment and workflow sync logic to align with changes in the shared module. This ensures consistency and compatibility with the updated enum naming.
Enhanced the environment diff logic to include step-level changes (added, modified, deleted, moved) in workflows. Updated DTOs, types, and sync strategies to support detailed step diffs and extended summary statistics. This provides more granular insight into workflow differences between environments.
The diff logic now returns an array of results, each representing a single entity (workflow) with its own entityId, entityName, diffs, and summary. DTOs, types, and tests were updated to reflect this structure, improving clarity and granularity of environment diff results.
Removed separate step-level change counters from diff summary DTOs, types, and aggregation logic. Now, added, modified, deleted, and unchanged counts include both workflows and steps, streamlining the summary structure and reducing redundancy.
Changed diff and publish API endpoints to use '/v2/environments/:targetEnvironmentId/diff' and '/v2/environments/:targetEnvironmentId/publish' instead of passing targetEnvironmentId in the request body. Updated DTOs, commands, use cases, controller, validation service, and tests to support this change. Also, sourceEnvironmentId is now optional and defaults to the development environment if not provided.
Improves e2e tests for environment diff and publish flows by clarifying workflow creation, adding skipped tests for known issues, and ensuring default source environment logic is tested. Refactors SDK class to use consistent import formatting and improves method argument formatting for readability.
Updated environment diff and publish e2e tests to create workflows using the novuClient SDK instead of the previous createWorkflow function. Also added a short delay after workflow creation to ensure workflows are fully created before proceeding with tests. Removed skipped tests related to workflow creation issues.
Introduces optional ClientSession parameters to workflow and notification template commands, usecases, and repository methods. This enables transactional operations for workflow creation, patching, upserting, and preference management, improving consistency and reliability in multi-step database operations.
Removed unnecessary comments and adjusted assertions in the environment publish E2E test. The test now expects the workflow to be skipped (successful: 0, skipped: 1) when publishing without a sourceEnvironmentId, reflecting updated behavior.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What changed? Why was the change needed?
Screenshots
Expand for optional sections
Related enterprise PR
Special notes for your reviewer
Summary by CodeRabbit
New Features
Bug Fixes
Tests