Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Soften log message on expected non-validation of old run object. #2111

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 13 additions & 2 deletions server/fishtest/rundb.py
Original file line number Diff line number Diff line change
Expand Up @@ -238,12 +238,17 @@ def validate_random_run(self):
)
except ValidationError as e:
message = f"The run object {run_id} does not validate: {str(e)}"
print(message, flush=True)
if "version" in run and run["version"] >= RUN_VERSION:
print(message, flush=True)
self.actiondb.log_message(
username="fishtest.system",
message=message,
)
else:
print(
f"{message} (this is likely not an error as the run object has an older version)",
flush=True,
)

def set_inactive_run(self, run):
run_id = str(run["_id"])
Expand Down Expand Up @@ -1543,12 +1548,18 @@ def stop_run(self, run_id):
validate(runs_schema, run, "run")
except ValidationError as e:
message = f"The run object {run_id} does not validate: {str(e)}"
print(message, flush=True)
if "version" in run and run["version"] >= RUN_VERSION:
print(message, flush=True)
self.actiondb.log_message(
username="fishtest.system",
message=message,
)
else:
print(
f"{message} (this is likely not an error as the run object has an older version)",
flush=True,
)

self.buffer(run, True)

# Auto-purge runs here. This may revive the run.
Expand Down
Loading