Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
edx-platform-release
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor 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
Hsin-Yu Chien
edx-platform-release
Commits
e05d4a9c
Unverified
Commit
e05d4a9c
authored
3 years ago
by
Awais Jibran
Committed by
GitHub
3 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Monitor error in NR when OLX validation fails. (#27381)
parent
2b55959a
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
cms/djangoapps/contentstore/tasks.py
+4
-2
4 additions, 2 deletions
cms/djangoapps/contentstore/tasks.py
with
4 additions
and
2 deletions
cms/djangoapps/contentstore/tasks.py
+
4
−
2
View file @
e05d4a9c
...
...
@@ -674,9 +674,10 @@ def validate_course_olx(courselike_key, course_dir, status):
course_dir: complete path to the course olx
status: UserTaskStatus object.
"""
is_library
=
isinstance
(
courselike_key
,
LibraryLocator
)
olx_is_valid
=
True
log_prefix
=
f
'
Course import
{
courselike_key
}
'
validation_failed_mesg
=
'
CourseOlx validation failed.
'
is_library
=
isinstance
(
courselike_key
,
LibraryLocator
)
if
is_library
:
return
olx_is_valid
...
...
@@ -698,13 +699,14 @@ def validate_course_olx(courselike_key, course_dir, status):
if
not
has_errors
:
return
olx_is_valid
LOGGER
.
error
(
f
'
{
log_prefix
}
:
CourseOlx
validation
failed
.
'
)
LOGGER
.
error
(
f
'
{
log_prefix
}
:
{
validation
_
failed
_mesg
}
'
)
log_errors_to_artifact
(
errorstore
,
status
)
if
bypass_olx_failure_enabled
():
return
olx_is_valid
status
.
fail
(
UserErrors
.
OLX_VALIDATION_FAILED
)
monitor_import_failure
(
courselike_key
,
status
.
state
,
message
=
validation_failed_mesg
)
return
False
...
...
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