Skip to content

Commit

Permalink
fix(job_attachment)!: remove os_group field from Windows filesystem…
Browse files Browse the repository at this point in the history
… permission settings (#215)

Signed-off-by: Gahyun Suh <132245153+gahyusuh@users.noreply.github.com>
  • Loading branch information
gahyusuh authored Mar 15, 2024
1 parent 4f270ba commit 739cb20
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 26 deletions.
21 changes: 0 additions & 21 deletions src/deadline/job_attachments/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -317,24 +317,3 @@ class FileConflictResolution(Enum):
SKIP = 1
OVERWRITE = 2
CREATE_COPY = 3


# TODO: remove once we fixed worker agent to import PosixFileSystemPermissionSettings from os_file_permission
@dataclass
class PosixFileSystemPermissionSettings:
"""
A dataclass representing file system permission-related information
for Posix. The specified permission modes will be bitwise-OR'ed with
the directory or file's existing permissions.
Attributes:
os_user (str): The target operating system user for ownership.
os_group (str): The target operating system group for ownership.
dir_mode (int): The permission mode to be added to directories.
file_mode (int): The permission mode to be added to files.
"""

os_user: str
os_group: str
dir_mode: int
file_mode: int
7 changes: 2 additions & 5 deletions src/deadline/job_attachments/os_file_permission.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
from pathlib import Path
import shutil
import sys
from dataclasses import dataclass, field
from dataclasses import dataclass
from enum import Enum
from typing import List, Optional, Set, Union
from typing import List, Set, Union

from .exceptions import AssetSyncError, PathOutsideDirectoryError
from ._utils import _is_relative_to
Expand Down Expand Up @@ -58,12 +58,9 @@ class WindowsFileSystemPermissionSettings:
file_mode (WindowsPermissionEnum): The permission mode to be added to files.
"""

# TODO: Remove the optional `os_group` once the jobRunAsUser - windows - group field
# is removed from our APIs
os_user: str
dir_mode: WindowsPermissionEnum
file_mode: WindowsPermissionEnum
os_group: Optional[str] = field(default=None)


# A union of different file system permission settings that are based on the underlying OS.
Expand Down

0 comments on commit 739cb20

Please sign in to comment.