Repository navigation
fix(server): harden security, fix review issues from PR #189 #190
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
Changes from 1 commit
23ffdcc
695cb92
7603ea6
853b6e3
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -897,40 +897,43 @@ def _on_stage_change(stage: str) -> None: | |
| except docker.errors.ContainerError as exc: | ||
| finish_time = time.time() | ||
| error_message = f"docker: {exc}" | ||
| _pack_failed_results_archive(task, error_message) | ||
| task_store.update_task( | ||
| md5sum, | ||
| status="failed", | ||
| finished_at=finish_time, | ||
| walltime=finish_time - start_time, | ||
| error=error_message, | ||
| run_stage=stage_state["current"], | ||
| ) | ||
| if not _task_is_deleted(md5sum): | ||
| _pack_failed_results_archive(task, error_message) | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
When a user cancels a running task, Useful? React with 👍 / 👎. |
||
| task_store.update_task( | ||
| md5sum, | ||
| status="failed", | ||
| finished_at=finish_time, | ||
| walltime=finish_time - start_time, | ||
| error=error_message, | ||
| run_stage=stage_state["current"], | ||
| ) | ||
| except docker.errors.DockerException as exc: | ||
| finish_time = time.time() | ||
| error_message = f"docker: {exc}" | ||
| _pack_failed_results_archive(task, error_message) | ||
| task_store.update_task( | ||
| md5sum, | ||
| status="failed", | ||
| finished_at=finish_time, | ||
| walltime=finish_time - start_time, | ||
| error=error_message, | ||
| run_stage=stage_state["current"], | ||
| ) | ||
| if not _task_is_deleted(md5sum): | ||
| _pack_failed_results_archive(task, error_message) | ||
| task_store.update_task( | ||
| md5sum, | ||
| status="failed", | ||
| finished_at=finish_time, | ||
| walltime=finish_time - start_time, | ||
| error=error_message, | ||
| run_stage=stage_state["current"], | ||
| ) | ||
| logging.error("Docker daemon unavailable for GREMLIN task %s: %s", md5sum, exc) | ||
| except Exception as exc: # pylint: disable=broad-except | ||
| finish_time = time.time() | ||
| error_message = str(exc) | ||
| _pack_failed_results_archive(task, error_message) | ||
| task_store.update_task( | ||
| md5sum, | ||
| status="failed", | ||
| finished_at=finish_time, | ||
| walltime=finish_time - start_time, | ||
| error=error_message, | ||
| run_stage=stage_state["current"], | ||
| ) | ||
| if not _task_is_deleted(md5sum): | ||
| _pack_failed_results_archive(task, error_message) | ||
| task_store.update_task( | ||
| md5sum, | ||
| status="failed", | ||
| finished_at=finish_time, | ||
| walltime=finish_time - start_time, | ||
| error=error_message, | ||
| run_stage=stage_state["current"], | ||
| ) | ||
|
coderabbitai[bot] marked this conversation as resolved.
Resolved
|
||
| logging.exception("Unexpected failure while running GREMLIN task %s", md5sum) | ||
|
|
||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On databases that already ran the previous migration, these columns are already present in
existingbut legacy rows can still containNULL, so this new backfill is skipped exactly where it is needed. Those rows remain broken after upgrade: for examplelist_users()filtersdeleted == False, excludingNULLrows, andUserResponseexpects non-nullregistration_status/user_status/role, so admin user listing can still hide users or fail validation.Useful? React with 👍 / 👎.