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
Merge requests
!196
Avoid attribute error on user_config
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Avoid attribute error on user_config
fix-attribute-error-user-config
into
master
Overview
0
Commits
2
Pipelines
1
Changes
2
Merged
Yoann Schneider
requested to merge
fix-attribute-error-user-config
into
master
2 years ago
Overview
0
Commits
2
Pipelines
1
Changes
2
Expand
Closes
#129 (closed)
0
0
Merge request reports
Viewing commit
bf56045f
Prev
Next
Show latest version
2 files
+
52
−
3
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
2
Search (e.g. *.vue) (Ctrl+P)
Verified
bf56045f
fix and add tests
· bf56045f
Yoann Schneider
authored
2 years ago
arkindex_worker/worker/base.py
+
5
−
3
Options
@@ -196,7 +196,7 @@ class BaseWorker(object):
)
# Retrieve initial configuration from API
self
.
config
=
worker_version
[
"
configuration
"
]
[
"
configuration
"
]
self
.
config
=
worker_version
[
"
configuration
"
]
.
get
(
"
configuration
"
)
if
"
user_configuration
"
in
worker_version
[
"
configuration
"
]:
# Add default values (if set) to user_configuration
for
key
,
value
in
worker_version
[
"
configuration
"
][
@@ -210,8 +210,10 @@ class BaseWorker(object):
self
.
secrets
=
{
name
:
self
.
load_secret
(
name
)
for
name
in
required_secrets
}
# Load worker run configuration when available
worker_configuration
=
worker_run
.
get
(
"
configuration
"
,
{})
self
.
user_configuration
=
worker_configuration
.
get
(
"
configuration
"
)
worker_configuration
=
worker_run
.
get
(
"
configuration
"
)
self
.
user_configuration
=
(
worker_configuration
.
get
(
"
configuration
"
)
if
worker_configuration
else
None
)
if
self
.
user_configuration
:
logger
.
info
(
"
Loaded user configuration from WorkerRun
"
)
# if debug mode is set to true activate debug mode in logger
Loading