-
Notifications
You must be signed in to change notification settings - Fork 4
Resource type partial sync #600
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
base: main
Are you sure you want to change the base?
Conversation
- Implemented resource-typed sync task handler in `resource_typed_sync.go`. - Added support for `SyncResourceTypedType` in task type checks. - Introduced `localResourceTypedSyncer` for managing resource-typed sync tasks. - Updated existing task processing logic to accommodate new task type.
- Introduced `WithResourceTypedSync` option for configuring resource-typed sync in the connector runner. - Added `SyncResourceTypedTask` message to the protocol buffer definition for handling resource-typed sync tasks. - Implemented validation for `SyncResourceTypedTask` and integrated it into the task processing logic. - Updated syncer to handle resource-typed sync operations, including syncing entitlements and grants for specific resource types. - Enhanced CLI commands to accept `sync-resource-type` parameter for initiating resource-typed syncs.
- Updated comments in `state.go` to clarify the purpose of `SyncResourceTypedOp` and `SetupResourceTypedSyncOp`. - Improved documentation for `resourceTypedSyncID` in `syncer.go` to explain its role in resource-typed incremental sync. - Added clarification in the `resourceTypeHasChildType` function regarding the retrieval of sample resources and their annotations.
- Renamed `resourceTypedSyncID` to `partialSyncResourceTypeID` across multiple files to reflect the new functionality. - Updated related functions and CLI commands to use `WithPartialSyncResourceType` for configuring partial syncs. - Introduced `localPartialSyncResourceType` to handle partial sync tasks, ensuring only resources are synced without entitlements and grants. - Removed the deprecated `resourceTypedSyncer` implementation to streamline the codebase.
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the ✨ Finishing touches🧪 Generate unit tests (beta)
Comment |
- Added `PartialSyncResourceTypeId` field to `Task_SyncFullTask` for triggering partial syncs of specific resource types. - Updated getter and setter methods for `PartialSyncResourceTypeId`. - Modified `fullSyncTaskHandler` to handle partial sync resource type from task or CLI. - Removed deprecated `resourceTypedSync` implementation to streamline the codebase. - Updated protocol buffer definitions and validation logic accordingly.
- Replaced `SyncResourceTypedType` with `PartialSyncType` in task type checks to align with new partial sync implementation. - Removed `partialSyncResourceTypeID` from `fullSyncTaskHandler` and `c1ApiTaskManager` to streamline the codebase. - Added `partialSyncTaskHandler` to manage partial sync tasks, supporting both targeted resources and resource type modes. - Introduced `localPartialSync` to handle partial sync operations, ensuring only resources are synced without entitlements and grants. - Deleted deprecated `partial_sync_resource_type.go` and added new `partial_sync.go` for local partial sync management.
- Removed `partialSyncResourceTypeID` from various components, including the connector runner and CLI commands, to streamline the codebase. - Replaced `SyncResourceTypedTask` with `SyncPartialTask` in protocol buffers and task processing logic, supporting both targeted resources and resource type modes. - Updated validation logic and methods to accommodate the new `SyncPartialTask`, ensuring proper handling of partial sync operations. - Enhanced documentation and comments to clarify the purpose and functionality of the new partial sync implementation.
| ActionStatusTask action_status = 118; | ||
| CreateSyncDiffTask create_sync_diff = 119; | ||
| CompactSyncs compact_syncs = 120; | ||
| SyncPartialTask sync_partial = 121; |
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.
We should just add attributes to the SyncFullTask so that we don't have to choose a different sync type based on what we want to sync. eg: Right now if you want to sync resources only (not grants or entitlements) that's a SyncFullTask.
This adds support for a new sync task that only fetches the resources of a given resource type, as well as discovering any required parent resource types. It explicitly does not sync entitlements or grants.
The sync should be created as a partial/incremental sync.
The primary use case is to quickly fetch an updated resource list when we are waiting for some resource to appear so we can continue on provisioning it access.
I've tested this on the cli with a few connectors, but need to do some rounds of API testing before this is ready to be merged.