Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
atdb-ldv
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ASTRON SDC
atdb-ldv
Commits
1ae700c5
Commit
1ae700c5
authored
1 year ago
by
Nico Vermaas
Browse files
Options
Downloads
Patches
Plain Diff
use different token for moved plots
parent
56cd89fc
No related branches found
No related tags found
1 merge request
!296
SDC 971 handle moved inspectionplots
Pipeline
#49533
failed
1 year ago
Stage: build
Stage: deploy_to_test
Stage: deploy_to_production
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
atdb/logs/atdb.log
+0
-72
0 additions, 72 deletions
atdb/logs/atdb.log
atdb/taskdatabase/services/algorithms.py
+8
-6
8 additions, 6 deletions
atdb/taskdatabase/services/algorithms.py
with
8 additions
and
78 deletions
atdb/logs/atdb.log
deleted
100644 → 0
+
0
−
72
View file @
56cd89fc
logging[14/Apr/2023 14:17:24,827] unsupported operand type(s) for +=: 'NoneType' and 'str'
[14/Apr/2023 14:17:24,828] task 25485 - (regular) - 146233 has no plots, skipped.
[14/Apr/2023 14:17:26,041] unsupported operand type(s) for +=: 'NoneType' and 'str'
[14/Apr/2023 14:17:26,042] task 25485 - (regular) - 146233 has no plots, skipped.
[01/May/2023 17:07:12,510] unsupported operand type(s) for &: 'bool' and 'str'
[01/May/2023 17:07:12,512] task 25485 - (regular) - 146233 has no plots, skipped.
[01/May/2023 17:07:17,635] unsupported operand type(s) for &: 'bool' and 'str'
[01/May/2023 17:07:17,635] task 25485 - (regular) - 146233 has no plots, skipped.
[01/May/2023 17:07:28,708] unsupported operand type(s) for &: 'bool' and 'str'
[01/May/2023 17:07:28,709] unsupported operand type(s) for &: 'bool' and 'str'
[01/May/2023 17:07:28,709] unsupported operand type(s) for &: 'bool' and 'str'
[01/May/2023 17:07:28,718] task 25485 - (regular) - 146233 has no plots, skipped.
[01/May/2023 17:07:28,718] task 25485 - (regular) - 146233 has no plots, skipped.
[01/May/2023 17:07:28,718] task 25484 - (regular) - 146232 has no plots, skipped.
[01/May/2023 17:07:29,725] unsupported operand type(s) for &: 'bool' and 'str'
[01/May/2023 17:07:29,725] task 25484 - (regular) - 146232 has no plots, skipped.
[01/May/2023 17:07:30,279] unsupported operand type(s) for &: 'bool' and 'str'
[01/May/2023 17:07:30,279] task 25484 - (regular) - 146232 has no plots, skipped.
[01/May/2023 17:07:30,718] unsupported operand type(s) for &: 'bool' and 'str'
[01/May/2023 17:07:30,718] task 25484 - (regular) - 146232 has no plots, skipped.
[01/May/2023 17:07:47,382] unsupported operand type(s) for &: 'bool' and 'str'
[01/May/2023 17:07:47,382] task 25485 - (regular) - 146233 has no plots, skipped.
[01/May/2023 17:07:48,568] unsupported operand type(s) for &: 'bool' and 'str'
[01/May/2023 17:07:48,569] task 25485 - (regular) - 146233 has no plots, skipped.
[01/May/2023 17:07:12,510] unsupported operand type(s) for &: 'bool' and 'str'
[01/May/2023 17:07:12,512] task 25485 - (regular) - 146233 has no plots, skipped.
[01/May/2023 17:07:17,635] unsupported operand type(s) for &: 'bool' and 'str'
[01/May/2023 17:07:17,635] task 25485 - (regular) - 146233 has no plots, skipped.
[01/May/2023 17:07:28,708] unsupported operand type(s) for &: 'bool' and 'str'
[01/May/2023 17:07:28,709] unsupported operand type(s) for &: 'bool' and 'str'
[01/May/2023 17:07:28,709] unsupported operand type(s) for &: 'bool' and 'str'
[01/May/2023 17:07:28,718] task 25485 - (regular) - 146233 has no plots, skipped.
[01/May/2023 17:07:28,718] task 25485 - (regular) - 146233 has no plots, skipped.
[01/May/2023 17:07:28,718] task 25484 - (regular) - 146232 has no plots, skipped.
[01/May/2023 17:07:29,725] unsupported operand type(s) for &: 'bool' and 'str'
[01/May/2023 17:07:29,725] task 25484 - (regular) - 146232 has no plots, skipped.
[01/May/2023 17:07:30,279] unsupported operand type(s) for &: 'bool' and 'str'
[01/May/2023 17:07:30,279] task 25484 - (regular) - 146232 has no plots, skipped.
[01/May/2023 17:07:30,718] unsupported operand type(s) for &: 'bool' and 'str'
[01/May/2023 17:07:30,718] task 25484 - (regular) - 146232 has no plots, skipped.
[01/May/2023 17:07:47,382] unsupported operand type(s) for &: 'bool' and 'str'
[01/May/2023 17:07:47,382] task 25485 - (regular) - 146233 has no plots, skipped.
[01/May/2023 17:07:48,568] unsupported operand type(s) for &: 'bool' and 'str'
[01/May/2023 17:07:48,569] task 25485 - (regular) - 146233 has no plots, skipped.
[04/May/2023 14:35:18,946] 'NoneType' object is not subscriptable
[04/May/2023 14:35:18,946] task 25378 - (regular) - 116876 has no plots, skipped.
[04/May/2023 14:35:21,861] 'NoneType' object is not subscriptable
[04/May/2023 14:35:21,861] task 25378 - (regular) - 116876 has no plots, skipped.
[04/May/2023 14:35:52,010] 'NoneType' object is not subscriptable
[04/May/2023 14:35:52,010] task 25378 - (regular) - 116876 has no plots, skipped.
[04/May/2023 14:35:52,100] 'NoneType' object is not subscriptable
[04/May/2023 14:35:52,100] task 25378 - (regular) - 116876 has no plots, skipped.
[04/May/2023 14:35:52,193] 'NoneType' object is not subscriptable
[04/May/2023 14:35:52,193] task 25378 - (regular) - 116876 has no plots, skipped.
[04/May/2023 14:35:52,294] 'NoneType' object is not subscriptable
[04/May/2023 14:35:52,294] task 25378 - (regular) - 116876 has no plots, skipped.
[09/May/2023 08:47:20,610] 'NoneType' object is not subscriptable
[09/May/2023 08:47:20,610] task 25378 - (regular) - 116876 has no plots, skipped.
[09/May/2023 08:47:20,725] 'NoneType' object is not subscriptable
[09/May/2023 08:47:20,725] task 25378 - (regular) - 116876 has no plots, skipped.
[09/May/2023 08:47:20,822] 'NoneType' object is not subscriptable
[09/May/2023 08:47:20,823] task 25378 - (regular) - 116876 has no plots, skipped.
[09/May/2023 08:47:20,932] 'NoneType' object is not subscriptable
[09/May/2023 08:47:20,933] task 25378 - (regular) - 116876 has no plots, skipped.
[09/May/2023 08:47:32,444] 'NoneType' object is not subscriptable
[09/May/2023 08:47:32,445] task 25378 - (regular) - 116876 has no plots, skipped.
[09/May/2023 08:47:33,063] 'NoneType' object is not subscriptable
[09/May/2023 08:47:33,064] task 25378 - (regular) - 116876 has no plots, skipped.
[09/May/2023 08:47:33,649] 'NoneType' object is not subscriptable
[09/May/2023 08:47:33,650] task 25378 - (regular) - 116876 has no plots, skipped.
[09/May/2023 08:47:34,165] 'NoneType' object is not subscriptable
[09/May/2023 08:47:34,165] task 25378 - (regular) - 116876 has no plots, skipped.
This diff is collapsed.
Click to expand it.
atdb/taskdatabase/services/algorithms.py
+
8
−
6
View file @
1ae700c5
...
@@ -680,7 +680,7 @@ def unique_values_for_aggregation_key(queryset, aggregation_key):
...
@@ -680,7 +680,7 @@ def unique_values_for_aggregation_key(queryset, aggregation_key):
return
list
(
map
(
lambda
x
:
x
[
aggregation_key
],
queryset
.
values
(
aggregation_key
).
distinct
()))
return
list
(
map
(
lambda
x
:
x
[
aggregation_key
],
queryset
.
values
(
aggregation_key
).
distinct
()))
def
add_plots
(
task
,
token
,
translation
,
results
,
expand_image
=
"
False
"
):
def
add_plots
(
task
,
results
,
expand_image
=
"
False
"
):
# keep a temporary list of filenames to check uniqueness
# keep a temporary list of filenames to check uniqueness
plot_files
=
[]
plot_files
=
[]
...
@@ -696,6 +696,9 @@ def add_plots(task, token, translation, results, expand_image="False"):
...
@@ -696,6 +696,9 @@ def add_plots(task, token, translation, results, expand_image="False"):
except
:
except
:
srm_to_url_archive_disk
=
"
srm://srm.grid.sara.nl/pnfs/grid.sara.nl/data/lofar/ops/disk/projects/::https://webdav.grid.surfsara.nl/projects/
"
srm_to_url_archive_disk
=
"
srm://srm.grid.sara.nl/pnfs/grid.sara.nl/data/lofar/ops/disk/projects/::https://webdav.grid.surfsara.nl/projects/
"
# retrieve the current tokens for both the original and archived locations
token_original
=
str
(
Configuration
.
objects
.
get
(
key
=
'
dcache:token
'
).
value
)
token_archive_disk
=
str
(
Configuration
.
objects
.
get
(
key
=
'
dcache:token_archive_disk
'
).
value
)
plots
=
task
.
quality_json
[
"
plots
"
]
plots
=
task
.
quality_json
[
"
plots
"
]
count
=
0
count
=
0
...
@@ -706,10 +709,12 @@ def add_plots(task, token, translation, results, expand_image="False"):
...
@@ -706,10 +709,12 @@ def add_plots(task, token, translation, results, expand_image="False"):
# is the plot already moved to its final location on disk in the lta?
# is the plot already moved to its final location on disk in the lta?
base_surl
=
plot
[
'
surl_lta
'
]
base_surl
=
plot
[
'
surl_lta
'
]
translation
=
srm_to_url_archive_disk
.
split
(
"
::
"
)
translation
=
srm_to_url_archive_disk
.
split
(
"
::
"
)
token
=
token_archive_disk
except
:
except
:
# assume the orignal location.
# assume the orignal location.
base_surl
=
plot
[
'
surl
'
]
base_surl
=
plot
[
'
surl
'
]
translation
=
srm_to_url
.
split
(
"
::
"
)
translation
=
srm_to_url
.
split
(
"
::
"
)
token
=
token_original
basename
=
plot
[
'
basename
'
]
basename
=
plot
[
'
basename
'
]
checksum
=
plot
[
'
checksum
'
]
checksum
=
plot
[
'
checksum
'
]
...
@@ -760,14 +765,11 @@ def add_plots(task, token, translation, results, expand_image="False"):
...
@@ -760,14 +765,11 @@ def add_plots(task, token, translation, results, expand_image="False"):
def
construct_inspectionplots
(
task
,
expand_image
=
"
False
"
,
source
=
'
task_id
'
):
def
construct_inspectionplots
(
task
,
expand_image
=
"
False
"
,
source
=
'
task_id
'
):
token
=
str
(
Configuration
.
objects
.
get
(
key
=
'
dcache:token
'
).
value
)
# find the plots in the quality json structure
# find the plots in the quality json structure
if
source
==
'
task_id
'
:
if
source
==
'
task_id
'
:
results
=
"
<h4>Inspection Plots and Summary Logs</h4>
"
results
=
"
<h4>Inspection Plots and Summary Logs</h4>
"
results
+=
"
<p>Clicking a link will redirect to SURF SARA in a new browser window. </p>
"
results
+=
"
<p>Clicking a link will redirect to SURF SARA in a new browser window. </p>
"
results
=
add_plots
(
task
,
token
,
results
,
expand_image
)
results
=
add_plots
(
task
,
results
,
expand_image
)
elif
source
==
'
sas_id
'
:
elif
source
==
'
sas_id
'
:
sas_id
=
task
.
sas_id
sas_id
=
task
.
sas_id
...
@@ -784,7 +786,7 @@ def construct_inspectionplots(task, expand_image="False", source='task_id'):
...
@@ -784,7 +786,7 @@ def construct_inspectionplots(task, expand_image="False", source='task_id'):
try
:
try
:
results
+=
'
<tr style=
"
background-color:#7EB1C4
"
><td colspan=
"
3
"
><b>Task
'
+
str
(
task
.
id
)
+
'
</b></td></tr>
'
results
+=
'
<tr style=
"
background-color:#7EB1C4
"
><td colspan=
"
3
"
><b>Task
'
+
str
(
task
.
id
)
+
'
</b></td></tr>
'
results
=
add_plots
(
task
,
token
,
results
,
expand_image
)
results
=
add_plots
(
task
,
results
,
expand_image
)
except
Exception
as
error
:
except
Exception
as
error
:
logger
.
error
(
error
)
logger
.
error
(
error
)
...
...
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