Skip to content

Commit cd7d255

Browse files
authored
Executor: wipe lightbeam state at the start of each run (#35)
1 parent 53d35fa commit cd7d255

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

executor/executor/executor.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,9 @@ def __init__(self):
5656
self.local_mode = os.environ.get("DEPLOYMENT_MODE") == "LOCAL"
5757
self.conn = requests.Session()
5858

59+
# wipe lightbeam state so that local runs stay idempotent
60+
shutil.rmtree(".lightbeam", ignore_errors=True)
61+
5962
os.mkdir(os.path.abspath(config.OUTPUT_DIR))
6063
os.environ["DATA_DIR"] = os.path.abspath(config.OUTPUT_DIR)
6164
os.environ["OUTPUT_DIR"] = os.path.abspath(config.OUTPUT_DIR)
@@ -606,7 +609,7 @@ def lightbeam_send(self):
606609
self.set_action(action.LIGHTBEAM_SEND)
607610
try:
608611
subprocess.run(
609-
["lightbeam", "-c", self.assessment_lightbeam, "send", "--results-file", artifact.LB_SEND_RESULTS.path]
612+
["lightbeam", "-c", self.assessment_lightbeam, "send", "--set", "state_dir", ".lightbeam", "--results-file", artifact.LB_SEND_RESULTS.path]
610613
).check_returncode()
611614

612615
# TODO: ostensibly should check for Ed-Fi warnings here but failed uploads still make it back via the summary report

0 commit comments

Comments
 (0)