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

fix(session): fix instantiation of of WindowsFileSystemPermissionSettings to not use os_group #209

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all 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
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ dynamic = ["version"]
dependencies = [
"requests ~= 2.31",
"boto3 >= 1.28.80",
"deadline == 0.39.*",
"deadline == 0.40.*",
"openjd-sessions == 0.6.*",
# tomli became tomllib in standard library in Python 3.11
"tomli == 2.0.* ; python_version<'3.11'",
Expand Down
3 changes: 1 addition & 2 deletions src/deadline_worker_agent/sessions/session.py
Original file line number Diff line number Diff line change
Expand Up @@ -901,10 +901,9 @@ def progress_handler(job_attachments_download_status: ProgressReportMetadata) ->
else:
if not isinstance(self._os_user, WindowsSessionUser):
raise ValueError(f"The user must be a windows-user. Got {type(self._os_user)}")
if self._os_user.group is not None:
if self._os_user.user is not None:
fs_permission_settings = WindowsFileSystemPermissionSettings(
os_user=self._os_user.user,
os_group=self._os_user.group,
dir_mode=WindowsPermissionEnum.WRITE,
file_mode=WindowsPermissionEnum.WRITE,
)
Expand Down
1 change: 0 additions & 1 deletion test/unit/sessions/test_session.py
Original file line number Diff line number Diff line change
Expand Up @@ -702,7 +702,6 @@ def test_sync_asset_inputs_with_fs_permission_settings(
elif os.name == "nt":
expected_fs_permission_settings = WindowsFileSystemPermissionSettings(
os_user="SomeUser",
os_group="SomeGroup",
dir_mode=WindowsPermissionEnum.WRITE,
file_mode=WindowsPermissionEnum.WRITE,
)
Expand Down