Skip to content
Merged
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
7 changes: 7 additions & 0 deletions esrally/track/loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -1120,6 +1120,11 @@ def read(self, track_name, track_spec_file, mapping_dir):
f.write(rendered)
self.logger.info("Final rendered track for '%s' has been written to '%s'.", track_spec_file, tmp.name)
track_spec = json.loads(rendered)
except jinja2.exceptions.TemplateSyntaxError as te:
self.logger.exception("Could not load [%s] due to Jinja Syntax Exception.", track_spec_file)
msg = f"Could not load '{track_spec_file}' due to Jinja Syntax Exception. "
msg += f"The track file ({tmp.name}) likely hasn't been written."
raise TrackSyntaxError(msg, te)
except jinja2.exceptions.TemplateNotFound:
self.logger.exception("Could not load [%s]", track_spec_file)
raise exceptions.SystemSetupError(f"Track {track_name} does not exist")
Expand Down Expand Up @@ -1697,6 +1702,8 @@ def parse_task(
default_ramp_up_time_period=None,
completed_by_name=None,
):
if "operation" not in task_spec:
raise TrackSyntaxError("Operation missing from task spec %s in challenge '%s'." % (task_spec, challenge_name))
op_spec = task_spec["operation"]
if isinstance(op_spec, str) and op_spec in ops:
op = ops[op_spec]
Expand Down