Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
workspaces
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ssa
workspaces
Commits
60600f78
Commit
60600f78
authored
1 year ago
by
Charlotte Hausman
Browse files
Options
Downloads
Patches
Plain Diff
fix htcondor job id setting
parent
b0822517
No related branches found
Branches containing commit
No related tags found
Tags containing commit
3 merge requests
!1605
Merge 2.8.2.3 work to main
,
!1581
catch up with 2.8.2.3
,
!1578
Try fixing condor id issues
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
apps/cli/utilities/wf_monitor/wf_monitor/monitor.py
+4
-4
4 additions, 4 deletions
apps/cli/utilities/wf_monitor/wf_monitor/monitor.py
shared/workspaces/alembic/versions/f49af22c5c0e_fix_null_dag_logs.py
+41
-0
41 additions, 0 deletions
...spaces/alembic/versions/f49af22c5c0e_fix_null_dag_logs.py
with
45 additions
and
4 deletions
apps/cli/utilities/wf_monitor/wf_monitor/monitor.py
+
4
−
4
View file @
60600f78
...
...
@@ -157,7 +157,7 @@ def is_final_stage(body: str) -> bool:
:return: boolean for final stage
"""
dag_node
=
r
"
DAG Node: (?P<dagnode>[A-Z]{
4
,})
"
dag_node
=
r
"
DAG Node: (?P<dagnode>[A-Z]{
1
,})
"
dagnode
=
re
.
search
(
dag_node
,
body
)
logger
.
info
(
f
"
current DAG stage:
{
dagnode
.
group
(
'
dagnode
'
)
}
"
)
...
...
@@ -321,10 +321,10 @@ class WorkflowMonitor:
# determine current DAG stage from event, if final, set exit condition for DAG
if
self
.
is_dag
and
event
[
"
type
"
]
==
WorkflowStatusMessages
.
EXECUTING
.
value
:
job_count
+=
1
is_final_node
=
is_final_stage
(
event
[
"
condor_metadata
"
][
"
log
"
])
# DAG is still running, change message to 'continue'
if
not
is_final_node
:
event
[
"
type
"
]
=
WorkflowStatusMessages
.
CONTINUE
.
value
event
[
"
type
"
]
=
WorkflowStatusMessages
.
CONTINUE
.
value
# set is final node flag if necessary
is_final_node
=
is_final_stage
(
event
[
"
condor_metadata
"
][
"
log
"
])
send_message
(
event
,
self
.
message_router
)
# Empty contents to prepare for next event
...
...
This diff is collapsed.
Click to expand it.
shared/workspaces/alembic/versions/f49af22c5c0e_fix_null_dag_logs.py
0 → 100644
+
41
−
0
View file @
60600f78
"""
fix null dag logs
Revision ID: f49af22c5c0e
Revises: 008590dd66fd
Create Date: 2024-02-20 14:32:15.149922
"""
from
alembic
import
op
import
sqlalchemy
as
sa
# revision identifiers, used by Alembic.
revision
=
"
f49af22c5c0e
"
down_revision
=
"
008590dd66fd
"
branch_labels
=
None
depends_on
=
None
old_log
=
"""
log = null_dag.$(jobname).log
"""
new_log
=
"""
log = condor.log
"""
def
upgrade
():
op
.
execute
(
f
"""
UPDATE workflow_templates
SET content = replace(convert_from(content,
'
utf8
'
),E
'
{
old_log
}
'
, E
'
{
new_log
}
'
)::bytea
WHERE filename like
'
null_dag_%.condor
'
;
"""
)
def
downgrade
():
op
.
execute
(
f
"""
UPDATE workflow_templates
SET content = replace(convert_from(content,
'
utf8
'
),E
'
{
new_log
}
'
, E
'
{
old_log
}
'
)::bytea
WHERE filename like
'
null_dag_%.condor
'
;
"""
)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment