Skip to content

[core] improve auth_mode=token UX#58737

Merged
edoakes merged 20 commits into
masterfrom
auth-paper-cuts
Nov 19, 2025
Merged

[core] improve auth_mode=token UX#58737
edoakes merged 20 commits into
masterfrom
auth-paper-cuts

Conversation

@sampan-s-nayak
Copy link
Copy Markdown
Contributor

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

Description

  • introduce new exception class for authentication related exceptions (ray.exceptions.AuthenticationError)
  • add docs link in auth exception
  • fix minor papercuts
  • use RAY_LOG(FATAL) instead of RAY_CHECK to avoid including An unexpected system state has occurred. You have likely discovered a bug in Ray ... in error message
  • update dashboard dialogue
  • update ray start error message

sampan added 2 commits November 18, 2025 09:21
Signed-off-by: sampan <sampan@anyscale.com>
Signed-off-by: sampan <sampan@anyscale.com>
@sampan-s-nayak sampan-s-nayak requested review from a team as code owners November 18, 2025 09:25
@sampan-s-nayak sampan-s-nayak added the go add ONLY when ready to merge, run all tests label Nov 18, 2025
@sampan-s-nayak sampan-s-nayak marked this pull request as draft November 18, 2025 09:25
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request improves the user experience for token-based authentication by introducing a new RayAuthenticationError exception, which provides clearer error messages and a link to the documentation. The changes are well-structured and improve code clarity. I've provided a few suggestions to further enhance maintainability by removing an unused parameter and improving a docstring.

Comment thread python/ray/_private/authentication/http_token_authentication.py Outdated
Comment thread python/ray/exceptions.py Outdated
Comment thread python/ray/tests/test_runtime_env_agent_auth.py
Comment thread python/ray/tests/test_runtime_env_agent_auth.py
Comment thread python/ray/util/client/server/proxier.py
sampan and others added 4 commits November 18, 2025 12:00
Signed-off-by: sampan <sampan@anyscale.com>
Signed-off-by: sampan <sampan@anyscale.com>
…er-cuts

Signed-off-by: sampan <sampan@anyscale.com>
Comment thread doc/source/ray-core/api/exceptions.rst Outdated
Signed-off-by: Edward Oakes <ed.nmi.oakes@gmail.com>
Signed-off-by: Edward Oakes <ed.nmi.oakes@gmail.com>
Signed-off-by: Edward Oakes <ed.nmi.oakes@gmail.com>
@edoakes edoakes marked this pull request as ready for review November 19, 2025 15:31
sampan and others added 3 commits November 19, 2025 15:41
Signed-off-by: sampan <sampan@anyscale.com>
Signed-off-by: Edward Oakes <ed.nmi.oakes@gmail.com>
@edoakes
Copy link
Copy Markdown
Collaborator

edoakes commented Nov 19, 2025

Updated dashboard dialogue:

Screenshot 2025-11-19 at 10 04 57 AM

Comment thread python/ray/scripts/scripts.py
Signed-off-by: Edward Oakes <ed.nmi.oakes@gmail.com>
Signed-off-by: Edward Oakes <ed.nmi.oakes@gmail.com>
@edoakes edoakes enabled auto-merge (squash) November 19, 2025 16:48
@github-actions github-actions Bot disabled auto-merge November 19, 2025 18:33
@ray-gardener ray-gardener Bot added docs An issue or change related to documentation core Issues that should be addressed in Ray Core labels Nov 19, 2025
Signed-off-by: Edward Oakes <ed.nmi.oakes@gmail.com>
Signed-off-by: Edward Oakes <ed.nmi.oakes@gmail.com>
@edoakes edoakes enabled auto-merge (squash) November 19, 2025 22:20
@edoakes edoakes merged commit 5afe5cb into master Nov 19, 2025
7 checks passed
@edoakes edoakes deleted the auth-paper-cuts branch November 19, 2025 22:29
edoakes added a commit to edoakes/ray that referenced this pull request Nov 19, 2025
- introduce new exception class for authentication related exceptions
(`ray.exceptions.AuthenticationError`)
- add docs link in auth exception
- fix minor papercuts
- use `RAY_LOG(FATAL)` instead of `RAY_CHECK` to avoid including `An
unexpected system state has occurred. You have likely discovered a bug
in Ray ...` in error message
- update dashboard dialogue
- update ray start error message

---------

Signed-off-by: sampan <sampan@anyscale.com>
Signed-off-by: Edward Oakes <ed.nmi.oakes@gmail.com>
Co-authored-by: sampan <sampan@anyscale.com>
Co-authored-by: Edward Oakes <ed.nmi.oakes@gmail.com>
aslonnie pushed a commit that referenced this pull request Nov 19, 2025
Cherry pick: #58737

Signed-off-by: sampan <sampan@anyscale.com>
Signed-off-by: Edward Oakes <ed.nmi.oakes@gmail.com>
Co-authored-by: Sampan S Nayak <sampansnayak2@gmail.com>
Co-authored-by: sampan <sampan@anyscale.com>
400Ping pushed a commit to 400Ping/ray that referenced this pull request Nov 21, 2025
- introduce new exception class for authentication related exceptions
(`ray.exceptions.AuthenticationError`)
- add docs link in auth exception
- fix minor papercuts
- use `RAY_LOG(FATAL)` instead of `RAY_CHECK` to avoid including `An
unexpected system state has occurred. You have likely discovered a bug
in Ray ...` in error message
- update dashboard dialogue
- update ray start error message

---------

Signed-off-by: sampan <sampan@anyscale.com>
Signed-off-by: Edward Oakes <ed.nmi.oakes@gmail.com>
Co-authored-by: sampan <sampan@anyscale.com>
Co-authored-by: Edward Oakes <ed.nmi.oakes@gmail.com>
ykdojo pushed a commit to ykdojo/ray that referenced this pull request Nov 27, 2025
- introduce new exception class for authentication related exceptions
(`ray.exceptions.AuthenticationError`)
- add docs link in auth exception
- fix minor papercuts
- use `RAY_LOG(FATAL)` instead of `RAY_CHECK` to avoid including `An
unexpected system state has occurred. You have likely discovered a bug
in Ray ...` in error message
- update dashboard dialogue
- update ray start error message

---------

Signed-off-by: sampan <sampan@anyscale.com>
Signed-off-by: Edward Oakes <ed.nmi.oakes@gmail.com>
Co-authored-by: sampan <sampan@anyscale.com>
Co-authored-by: Edward Oakes <ed.nmi.oakes@gmail.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
- introduce new exception class for authentication related exceptions
(`ray.exceptions.AuthenticationError`)
- add docs link in auth exception
- fix minor papercuts
- use `RAY_LOG(FATAL)` instead of `RAY_CHECK` to avoid including `An
unexpected system state has occurred. You have likely discovered a bug
in Ray ...` in error message
- update dashboard dialogue
- update ray start error message

---------

Signed-off-by: sampan <sampan@anyscale.com>
Signed-off-by: Edward Oakes <ed.nmi.oakes@gmail.com>
Co-authored-by: sampan <sampan@anyscale.com>
Co-authored-by: Edward Oakes <ed.nmi.oakes@gmail.com>
peterxcli pushed a commit to peterxcli/ray that referenced this pull request Feb 25, 2026
- introduce new exception class for authentication related exceptions
(`ray.exceptions.AuthenticationError`)
- add docs link in auth exception
- fix minor papercuts
- use `RAY_LOG(FATAL)` instead of `RAY_CHECK` to avoid including `An
unexpected system state has occurred. You have likely discovered a bug
in Ray ...` in error message
- update dashboard dialogue
- update ray start error message

---------

Signed-off-by: sampan <sampan@anyscale.com>
Signed-off-by: Edward Oakes <ed.nmi.oakes@gmail.com>
Co-authored-by: sampan <sampan@anyscale.com>
Co-authored-by: Edward Oakes <ed.nmi.oakes@gmail.com>
Signed-off-by: peterxcli <peterxcli@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core Issues that should be addressed in Ray Core docs An issue or change related to documentation go add ONLY when ready to merge, run all tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants