Skip to content
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

Generic shares_base module and specific s3_datasets_shares module - part 5 (move exceptions and notifications to shares_base) #1312

Merged
merged 3 commits into from
Jun 6, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
ShareObjectSM,
ShareItemSM,
)
from dataall.modules.s3_datasets_shares.services.share_exceptions import ShareItemsFound
from dataall.modules.s3_datasets_shares.services.share_notification_service import ShareNotificationService
from dataall.modules.shares_base.services.share_exceptions import ShareItemsFound
from dataall.modules.shares_base.services.share_notification_service import ShareNotificationService
from dataall.modules.shares_base.services.share_permissions import (
GET_SHARE_OBJECT,
ADD_ITEM,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
from dataall.base.aws.iam import IAM
from dataall.modules.s3_datasets_shares.services.dataset_sharing_alarm_service import DatasetSharingAlarmService
from dataall.modules.s3_datasets_shares.db.share_object_repositories import ShareObjectRepository
from dataall.modules.s3_datasets_shares.services.share_exceptions import PrincipalRoleNotFound
from dataall.modules.shares_base.services.share_exceptions import PrincipalRoleNotFound
from dataall.modules.s3_datasets_shares.services.share_managers.share_manager_utils import ShareErrorFormatter
from dataall.modules.s3_datasets_shares.services.managed_share_policy_service import (
SharePolicyService,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
)
from dataall.modules.s3_datasets_shares.aws.s3_client import S3ControlClient, S3Client, DATAALL_READ_ONLY_SID
from dataall.modules.shares_base.db.share_object_models import ShareObject
from dataall.modules.s3_datasets_shares.services.share_exceptions import PrincipalRoleNotFound
from dataall.modules.shares_base.services.share_exceptions import PrincipalRoleNotFound
from dataall.modules.s3_datasets_shares.services.share_managers.share_manager_utils import ShareErrorFormatter
from dataall.modules.s3_datasets_shares.services.dataset_sharing_alarm_service import DatasetSharingAlarmService
from dataall.modules.s3_datasets_shares.services.managed_share_policy_service import (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@
ShareObjectSM,
ShareItemSM,
)
from dataall.modules.s3_datasets_shares.services.share_exceptions import ShareItemsFound, PrincipalRoleNotFound
from dataall.modules.shares_base.services.share_exceptions import ShareItemsFound, PrincipalRoleNotFound
from dataall.modules.s3_datasets_shares.services.share_item_service import ShareItemService
from dataall.modules.s3_datasets_shares.services.share_notification_service import ShareNotificationService
from dataall.modules.shares_base.services.share_notification_service import ShareNotificationService
from dataall.modules.s3_datasets_shares.services.managed_share_policy_service import SharePolicyService
from dataall.modules.shares_base.services.share_permissions import (
REJECT_SHARE_OBJECT,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
ShareableType,
)
from dataall.modules.s3_datasets.db.dataset_models import DatasetTable
from dataall.modules.s3_datasets_shares.services.share_exceptions import PrincipalRoleNotFound
from dataall.modules.shares_base.services.share_exceptions import PrincipalRoleNotFound
from dataall.modules.s3_datasets_shares.services.share_managers import LFShareManager
from dataall.modules.s3_datasets_shares.aws.ram_client import RamClient
from dataall.modules.s3_datasets_shares.services.share_object_service import ShareObjectService
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from datetime import datetime
from typing import List

from dataall.modules.s3_datasets_shares.services.share_exceptions import PrincipalRoleNotFound
from dataall.modules.shares_base.services.share_exceptions import PrincipalRoleNotFound
from dataall.modules.s3_datasets_shares.services.share_managers import S3AccessPointShareManager
from dataall.modules.s3_datasets_shares.services.share_object_service import ShareObjectService
from dataall.modules.s3_datasets_shares.services.share_item_service import ShareItemService
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from datetime import datetime
from typing import List

from dataall.modules.s3_datasets_shares.services.share_exceptions import PrincipalRoleNotFound
from dataall.modules.shares_base.services.share_exceptions import PrincipalRoleNotFound
from dataall.modules.s3_datasets_shares.services.share_managers import S3BucketShareManager
from dataall.modules.s3_datasets_shares.services.share_object_service import ShareObjectService
from dataall.modules.shares_base.services.shares_enums import (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
from dataall.base.db import get_engine
from dataall.modules.shares_base.db.share_object_models import ShareObjectItem
from dataall.modules.s3_datasets_shares.db.share_object_repositories import ShareObjectRepository
from dataall.modules.s3_datasets_shares.services.share_notification_service import ShareNotificationService
from dataall.modules.shares_base.services.share_notification_service import ShareNotificationService
from dataall.modules.s3_datasets.aws.sns_dataset_client import SnsDatasetClient
from dataall.modules.s3_datasets.db.dataset_location_repositories import DatasetLocationRepository
from dataall.modules.s3_datasets.db.dataset_table_repositories import DatasetTableRepository
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
from dataall.core.tasks.db.task_models import Task
from dataall.core.tasks.service_handlers import Worker
from dataall.modules.shares_base.db.share_object_models import ShareObject
from dataall.modules.s3_datasets.db.dataset_models import S3Dataset
from dataall.base.context import get_context
from dataall.modules.shares_base.services.shares_enums import ShareObjectStatus
from dataall.modules.notifications.db.notification_repositories import NotificationRepository
Expand Down Expand Up @@ -35,7 +34,7 @@ class ShareNotificationService:
- share.owner (person that opened the request) OR share.groupUri (if group_notifications=true)
"""

def __init__(self, session, dataset: S3Dataset, share: ShareObject):
def __init__(self, session, dataset, share: ShareObject):
petrkalos marked this conversation as resolved.
Show resolved Hide resolved
self.dataset = dataset
self.share = share
self.session = session
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@
from dataall.modules.s3_datasets_shares.services.share_object_service import (
ShareObjectService,
) # TODO move to shares_base in following PR
from dataall.modules.s3_datasets_shares.services.share_exceptions import (
from dataall.modules.shares_base.services.share_exceptions import (
PrincipalRoleNotFound,
DatasetLockTimeout,
) # TODO move to shares_base in following PR
)
from dataall.modules.datasets_base.db.dataset_models import DatasetLock

log = logging.getLogger(__name__)
Expand Down
Loading