Skip to content

Conversation

@sampan-s-nayak
Copy link
Contributor

@sampan-s-nayak sampan-s-nayak commented Nov 7, 2025

fix a typo (missing semicolon) in authentication_token_loader_test and use cross env compatible ray::UnsetEnv() and ray::setEnv() in tests

Signed-off-by: sampan <sampan@anyscale.com>
@sampan-s-nayak sampan-s-nayak added the go add ONLY when ready to merge, run all tests label Nov 7, 2025
…auth tests

This commit modifies the handling of the `RAY_AUTH_TOKEN` and `RAY_AUTH_TOKEN_PATH` environment variables in the gRPC authentication token tests to ensure compatibility with Windows. It uses `_putenv_s` for setting environment variables on Windows and maintains the existing behavior for other platforms.

Signed-off-by: sampan <sampan@anyscale.com>
@sampan-s-nayak sampan-s-nayak changed the title [core] fix typo in token loader [core] fix authentication token loader tests in windows Nov 7, 2025
@sampan-s-nayak sampan-s-nayak changed the title [core] fix authentication token loader tests in windows [core] fix authentication token related tests in windows Nov 7, 2025
@sampan-s-nayak sampan-s-nayak marked this pull request as ready for review November 7, 2025 09:30
@sampan-s-nayak sampan-s-nayak requested a review from a team as a code owner November 7, 2025 09:30
@aslonnie aslonnie added go add ONLY when ready to merge, run all tests and removed go add ONLY when ready to merge, run all tests labels Nov 7, 2025
@aslonnie aslonnie merged commit 25a01ce into master Nov 7, 2025
5 of 6 checks passed
@aslonnie aslonnie deleted the auth-windows-fix branch November 7, 2025 11:18
@aslonnie
Copy link
Collaborator

aslonnie commented Nov 7, 2025

sorry, probably should have let core team reviewed and approved first. let me know if this needs more changes or even a revert.

Comment on lines +111 to +113
void set_env_var(const char *name, const char *value) { ray::SetEnv(name, value); }

void unset_env_var(const char *name) {
#ifdef _WIN32
_putenv_s(name, "")
#else
unsetenv(name);
#endif
}
void unset_env_var(const char *name) { ray::UnsetEnv(name); }
Copy link
Collaborator

Choose a reason for hiding this comment

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

should remove these util wrappers

@edoakes
Copy link
Collaborator

edoakes commented Nov 7, 2025

sorry, probably should have let core team reviewed and approved first. let me know if this needs more changes or even a revert.

np, lgtm

YoussefEssDS pushed a commit to YoussefEssDS/ray that referenced this pull request Nov 8, 2025
…#58444)

fix a typo (missing semicolon) in authentication_token_loader_test and
use cross env compatible `ray::UnsetEnv()` and `ray::setEnv()` in tests

---------

Signed-off-by: sampan <sampan@anyscale.com>
Co-authored-by: sampan <sampan@anyscale.com>
landscapepainter pushed a commit to landscapepainter/ray that referenced this pull request Nov 17, 2025
…#58444)

fix a typo (missing semicolon) in authentication_token_loader_test and
use cross env compatible `ray::UnsetEnv()` and `ray::setEnv()` in tests

---------

Signed-off-by: sampan <sampan@anyscale.com>
Co-authored-by: sampan <sampan@anyscale.com>
Aydin-ab pushed a commit to Aydin-ab/ray-aydin that referenced this pull request Nov 19, 2025
…#58444)

fix a typo (missing semicolon) in authentication_token_loader_test and
use cross env compatible `ray::UnsetEnv()` and `ray::setEnv()` in tests

---------

Signed-off-by: sampan <sampan@anyscale.com>
Co-authored-by: sampan <sampan@anyscale.com>
Signed-off-by: Aydin Abiar <aydin@anyscale.com>
ykdojo pushed a commit to ykdojo/ray that referenced this pull request Nov 27, 2025
…#58444)

fix a typo (missing semicolon) in authentication_token_loader_test and
use cross env compatible `ray::UnsetEnv()` and `ray::setEnv()` in tests

---------

Signed-off-by: sampan <sampan@anyscale.com>
Co-authored-by: sampan <sampan@anyscale.com>
Signed-off-by: YK <1811651+ykdojo@users.noreply.github.com>
SheldonTsen pushed a commit to SheldonTsen/ray that referenced this pull request Dec 1, 2025
…#58444)

fix a typo (missing semicolon) in authentication_token_loader_test and
use cross env compatible `ray::UnsetEnv()` and `ray::setEnv()` in tests

---------

Signed-off-by: sampan <sampan@anyscale.com>
Co-authored-by: sampan <sampan@anyscale.com>
Future-Outlier pushed a commit to Future-Outlier/ray that referenced this pull request Dec 7, 2025
…#58444)

fix a typo (missing semicolon) in authentication_token_loader_test and
use cross env compatible `ray::UnsetEnv()` and `ray::setEnv()` in tests

---------

Signed-off-by: sampan <sampan@anyscale.com>
Co-authored-by: sampan <sampan@anyscale.com>
Signed-off-by: Future-Outlier <eric901201@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

go add ONLY when ready to merge, run all tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants