Skip to content

Commit

Permalink
intentionally fail test to verify
Browse files Browse the repository at this point in the history
  • Loading branch information
Siddharth Manoj committed Nov 30, 2023
1 parent 624d359 commit 046df38
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions baseplate/sidecars/live_data_watcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,12 +127,12 @@ def _load_from_s3(data: bytes) -> bytes:
# We can't assume that every caller of this method will be using prefix sharding on
# their S3 objects.
num_file_shards = loader_config.get("num_file_shards", 1)

logger.error(num_file_shards)
# If the num_file_shards key is present, we may have multiple copies of the same manifest
# uploaded so fetch one randomly using a randomly generated prefix.
# Generate a random number from 0 to num_file_shards exclusive to use as prefix.
file_key_prefix = random.randrange(num_file_shards)

logger.error(file_key_prefix)
# If 0 is generated, don’t append a prefix, fetch the file with no prefix
# since we always upload one file without a prefix.
if file_key_prefix == 0:
Expand Down

0 comments on commit 046df38

Please sign in to comment.