Skip to content

Commit

Permalink
pass invalid json for envvar args to force failure
Browse files Browse the repository at this point in the history
Signed-off-by: Paul S. Schweigert <[email protected]>
  • Loading branch information
psschwei committed Sep 26, 2024
1 parent e005cf7 commit 0661e7a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions gateway/api/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,14 +126,14 @@ def build_env_variables(token, job: Job, args: str = None) -> Dict[str, str]:
extra = {}
# only set arguments envvar if not too big
# remove this after sufficient time for users to upgrade client
arguments = "{}"
arguments = "ERROR: arguments are too big. upgrade your client"
if args:
if objsize.get_deep_size(args) < 100000:
logger.debug("passing arguments as envvar for job [%s]", job.id)
logger.debug("passing arguments as envvar for job %s", job.id)
arguments = args
else:
logger.warning(
"arguments for job [%s] are too large and will not be written to env var",
"arguments for job %s are too large and will not be written to env var",
job.id,
)

Expand Down

0 comments on commit 0661e7a

Please sign in to comment.