Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
B
Base Worker
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
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
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
Workers
Base Worker
Commits
a4c94580
Commit
a4c94580
authored
1 year ago
by
Manon Blanco
Browse files
Options
Downloads
Patches
Plain Diff
Display logs after the API call
parent
c3f2ceff
No related branches found
No related tags found
1 merge request
!490
Explicitely log a warning when the helper doesn't support cache
Pipeline
#156533
passed
1 year ago
Stage: test
Stage: build
Stage: release
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
arkindex_worker/cache.py
+3
-1
3 additions, 1 deletion
arkindex_worker/cache.py
tests/test_dataset_worker.py
+0
-8
0 additions, 8 deletions
tests/test_dataset_worker.py
with
3 additions
and
9 deletions
arkindex_worker/cache.py
+
3
−
1
View file @
a4c94580
...
...
@@ -378,11 +378,13 @@ def merge_parents_cache(paths: list, current_database: Path):
def
unsupported_cache
(
func
):
def
wrapper
(
self
,
*
args
,
**
kwargs
):
results
=
func
(
self
,
*
args
,
**
kwargs
)
if
not
self
.
is_read_only
and
not
self
.
use_cache
:
logger
.
warning
(
f
"
This API helper `
{
func
.
__name__
}
` did not update the cache database
"
)
return
func
(
self
,
*
args
,
**
kwargs
)
return
results
return
wrapper
This diff is collapsed.
Click to expand it.
tests/test_dataset_worker.py
+
0
−
8
View file @
a4c94580
...
...
@@ -525,10 +525,6 @@ def test_run_update_dataset_state_api_error(
(
logging
.
INFO
,
"
Loaded Worker Fake worker @ 123412 from API
"
),
(
logging
.
INFO
,
"
Processing Dataset (dataset_id) (1/1)
"
),
(
logging
.
INFO
,
"
Building Dataset (dataset_id) (1/1)
"
),
(
logging
.
WARNING
,
"
This API helper `update_dataset_state` did not update the cache database
"
,
),
*
[
(
logging
.
INFO
,
...
...
@@ -540,10 +536,6 @@ def test_run_update_dataset_state_api_error(
logging
.
WARNING
,
"
An API error occurred while processing dataset dataset_id: 500 Internal Server Error - None
"
,
),
(
logging
.
WARNING
,
"
This API helper `update_dataset_state` did not update the cache database
"
,
),
*
[
(
logging
.
INFO
,
...
...
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