Skip to content

[core] fix test_placement_group_3_client_mode by changing url parser#61506

Draft
ZacAttack wants to merge 1 commit intoray-project:masterfrom
ZacAttack:fix-test_placement_group_3_client_mode
Draft

[core] fix test_placement_group_3_client_mode by changing url parser#61506
ZacAttack wants to merge 1 commit intoray-project:masterfrom
ZacAttack:fix-test_placement_group_3_client_mode

Conversation

@ZacAttack
Copy link
Contributor

Description

Problem:

test_placement_group_3_client_mode is failing because the dashboard keeps crashing.

Looking at it, it seems to be because if you use host:port when hitting the urlparse(url).scheme that will evaluate to true. Which means the proper http scheme won't get pre-appended to the address.

Solution:

Replace the url parser with string match 'startswith' and call it a day!

Related issues

Link related issues: "Fixes #1234", "Closes #1234", or "Related to #1234".

Additional information

Optional: Add implementation details, API changes, usage examples, screenshots, etc.

The test seems to fail because the dashboard agent keeps crashing.
Looking at it, it seems to be because if you use host:port when hitting
the urlparse(url).scheme that will evaluate to true.  Which means the
proper http scheme won't get pre-appended to the address.

Signed-off-by: zac <zac@anyscale.com>
Copy link
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

The pull request effectively addresses the reported issue by replacing the urlparse scheme check with a more direct startswith method for validating HTTP/HTTPS prefixes. This change is a clear and concise solution to prevent incorrect scheme detection and ensures that the dashboard HTTP address is always correctly prefixed. The removal of the unused urlparse import is also appropriate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Ray fails to serialize self-reference objects

1 participant