Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Issue forks
automatic_updates-3242724
Commits
b001cf3b
Commit
b001cf3b
authored
Dec 09, 2019
by
Lucas Hedding
Committed by
Lucas Hedding
Dec 09, 2019
Browse files
Issue
#3094513
by heddn: Try/catch /Exception to rollback entire update if anything happens
parent
45cfddf8
Changes
2
Hide whitespace changes
Inline
Side-by-side
drupalci.yml
View file @
b001cf3b
...
...
@@ -9,11 +9,6 @@ build:
sniff-all-files
:
true
halt-on-fail
:
true
testing
:
container_command
:
commands
:
-
cd ${SOURCE_DIR} && sudo -u www-data curl https://www.drupal.org/files/issues/2019-10-07/3085728.patch | git apply -
-
cd ${SOURCE_DIR} && sudo -u www-data curl https://www.drupal.org/files/issues/2019-10-16/3088400-8_0.patch | git apply -
-
cd ${SOURCE_DIR} && sudo -u www-data curl https://www.drupal.org/files/issues/2019-10-16/3088447.patch | git apply -
# run_tests task is executed several times in order of performance speeds.
# halt-on-fail can be set on the run_tests tasks in order to fail fast.
# suppress-deprecations is false in order to be alerted to usages of
...
...
src/Services/InPlaceUpdate.php
View file @
b001cf3b
...
...
@@ -149,8 +149,18 @@ class InPlaceUpdate implements UpdateInterface {
$modified
=
$this
->
checkModifiedFiles
(
$metadata
,
$archive
);
if
(
!
$modified
&&
$this
->
backup
(
$archive
,
$project_root
))
{
$this
->
logger
->
info
(
'In place update has started.'
);
$success
=
$this
->
processUpdate
(
$archive
,
$project_root
);
$this
->
logger
->
info
(
'In place update has finished.'
);
try
{
$success
=
$this
->
processUpdate
(
$archive
,
$project_root
);
$this
->
logger
->
info
(
'In place update has finished.'
);
}
catch
(
\
Throwable
$throwable
)
{
$this
->
logger
->
info
(
'In place update failed.'
);
watchdog_exception
(
$throwable
);
}
catch
(
\
Exception
$exception
)
{
$this
->
logger
->
info
(
'In place update failed.'
);
watchdog_exception
(
$exception
);
}
if
(
$success
)
{
$process
=
automatic_updates_console_command
(
'updatedb:status'
);
if
(
$success
&&
$process
->
getOutput
())
{
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment