Skip to content

Commit

Permalink
[ci][core] Fix state api large scale test log prefix mismath (ray-pro…
Browse files Browse the repository at this point in the history
…ject#31865)

Signed-off-by: rickyyx <[email protected]>

we added job id in the log prefix in ray-project#31772, breaking the test.

This fixes the test to reflect the change.
  • Loading branch information
rickyyx committed Jan 23, 2023
1 parent 46b3bef commit 3b09a54
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions release/nightly_tests/stress_tests/test_state_api_scale.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import click
import json
import ray
from ray._private.ray_constants import LOG_PREFIX_ACTOR_NAME
from ray._private.ray_constants import LOG_PREFIX_ACTOR_NAME, LOG_PREFIX_JOB_ID
from ray._private.state_api_test_utils import (
STATE_LIST_LIMIT,
StateAPIMetric,
Expand Down Expand Up @@ -251,7 +251,8 @@ def test_large_log_file(log_file_size_byte: int):
class LogActor:
def write_log(self, log_file_size_byte: int):
ctx = hashlib.md5()
prefix = f"{LOG_PREFIX_ACTOR_NAME}LogActor\n"
job_id = ray.get_runtime_context().get_job_id()
prefix = f"{LOG_PREFIX_JOB_ID}{job_id}\n{LOG_PREFIX_ACTOR_NAME}LogActor\n"
ctx.update(prefix.encode())
while log_file_size_byte > 0:
n = min(log_file_size_byte, 4 * MiB)
Expand Down

0 comments on commit 3b09a54

Please sign in to comment.