add workflow_run_id column to artifacts + ObserverCruise and ObserverThought (#1298)

This commit is contained in:
Shuchang Zheng
2024-12-05 23:16:41 -08:00
committed by GitHub
parent e1d5393083
commit f1733a5054
3 changed files with 133 additions and 1 deletions

View File

@@ -44,6 +44,8 @@ BITWARDEN_LOGIN_CREDENTIAL_PARAMETER_PREFIX = "blc"
BITWARDEN_SENSITIVE_INFORMATION_PARAMETER_PREFIX = "bsi"
BITWARDEN_CREDIT_CARD_DATA_PARAMETER_PREFIX = "bccd"
TASK_GENERATION_PREFIX = "tg"
OBSERVER_CRUISE_ID = "oc"
OBSERVER_THOUGHT_ID = "ot"
def generate_workflow_id() -> str:
@@ -141,6 +143,16 @@ def generate_action_id() -> str:
return f"a_{int_id}"
def generate_observer_cruise_id() -> str:
int_id = generate_id()
return f"{OBSERVER_CRUISE_ID}_{int_id}"
def generate_observer_thought_id() -> str:
int_id = generate_id()
return f"{OBSERVER_THOUGHT_ID}_{int_id}"
def generate_id() -> int:
"""
generate a 64-bit int ID