Skip to content

Conversation

@etiennearnal
Copy link
Member

Goal is to let caller to be able to customize the fullpath of the UDS socket file.
Previous version was limited to the use of this predefined convention:

socket_filename = f"{uds_service}-{uds_id}.sock" if uds_id else f"{uds_service}.sock"
target = f"unix:{uds_folder / socket_filename}"

Now the caller can send the fullpath of the socket file with parameter uds_fullpath:

create_uds_channel(uds_fullpath = "/tmp/mysocket.sock")

@etiennearnal etiennearnal requested a review from a team as a code owner November 25, 2025 13:45
@etiennearnal
Copy link
Member Author

@jomadec @echambla FYI

@github-actions github-actions bot added the documentation Improvements or additions to documentation label Nov 25, 2025
@etiennearnal etiennearnal requested a review from Copilot November 25, 2025 14:23
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds the ability to specify a custom full path for Unix Domain Socket (UDS) files via a new uds_fullpath parameter, allowing callers to bypass the predefined naming convention ({uds_service}-{uds_id}.sock).

Key changes:

  • Added uds_fullpath parameter to create_channel, create_uds_channel, and verify_uds_socket functions
  • Modified logic to prioritize uds_fullpath when provided, falling back to the existing uds_service/uds_dir/uds_id pattern
  • Updated documentation to describe the new parameter

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
src/ansys/tools/common/cyberchannel.py Added uds_fullpath parameter to channel creation functions and socket verification, with conditional logic to use custom path or fall back to existing convention
doc/source/changelog/114.miscellaneous.md Added changelog entry for the new feature

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Member

@RobPasMue RobPasMue left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To avoid breaking changes - please move the location of the uds_fullpath to the last entry of the uds_* related variables, not the first one

@github-actions github-actions bot added the testing Anything related to testing label Nov 26, 2025
@etiennearnal etiennearnal changed the title feat: Add fullpath to set UDS sock filename feat: add fullpath to set UDS sock filename Nov 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation testing Anything related to testing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants