Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
48dc15c9
Commit
48dc15c9
authored
Mar 19, 2019
by
Douglas Barbosa Alexandre
Committed by
Nick Thomas
Mar 19, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Geo - Reset the verification checksum after deployment refs are created
parent
b28d7174
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
57 additions
and
0 deletions
+57
-0
app/services/update_deployment_service.rb
app/services/update_deployment_service.rb
+2
-0
ee/app/services/ee/update_deployment_service.rb
ee/app/services/ee/update_deployment_service.rb
+14
-0
ee/changelogs/unreleased/9227-geo-primary-checksums-are-not-recalculated-after-deployment-refs-are-created.yml
...re-not-recalculated-after-deployment-refs-are-created.yml
+5
-0
ee/spec/services/ee/update_deployment_service_spec.rb
ee/spec/services/ee/update_deployment_service_spec.rb
+36
-0
No files found.
app/services/update_deployment_service.rb
View file @
48dc15c9
...
...
@@ -51,3 +51,5 @@ class UpdateDeploymentService
environment_options
[
:action
]
||
'start'
end
end
UpdateDeploymentService
.
prepend
(
EE
::
UpdateDeploymentService
)
ee/app/services/ee/update_deployment_service.rb
0 → 100644
View file @
48dc15c9
# frozen_string_literal: true
module
EE
module
UpdateDeploymentService
extend
::
Gitlab
::
Utils
::
Override
override
:execute
def
execute
super
.
tap
do
|
deployment
|
deployment
.
project
.
repository
.
log_geo_updated_event
end
end
end
end
ee/changelogs/unreleased/9227-geo-primary-checksums-are-not-recalculated-after-deployment-refs-are-created.yml
0 → 100644
View file @
48dc15c9
---
title
:
Geo - Reset the verification checksum after deployment refs are created
merge_request
:
10160
author
:
type
:
fixed
ee/spec/services/ee/update_deployment_service_spec.rb
0 → 100644
View file @
48dc15c9
# frozen_string_literal: true
require
'spec_helper'
describe
UpdateDeploymentService
do
include
::
EE
::
GeoHelpers
let
(
:primary
)
{
create
(
:geo_node
,
:primary
)
}
let
(
:project
)
{
create
(
:project
,
:repository
)
}
let
(
:repository_state
)
{
create
(
:repository_state
,
:repository_verified
,
project:
project
)
}
let!
(
:deployment
)
{
create
(
:deployment
,
:success
,
project:
project
)
}
before
do
stub_current_geo_node
(
primary
)
end
subject
{
described_class
.
new
(
deployment
)
}
describe
'#execute'
do
it
'triggers a Geo event about the new deployment ref'
do
expect_next_instance_of
(
Geo
::
RepositoryUpdatedService
)
do
|
service
|
expect
(
service
).
to
receive
(
:execute
)
end
subject
.
execute
end
it
'resets the repository verification checksum'
do
expect
{
subject
.
execute
}.
to
change
{
repository_state
.
reload
.
repository_verification_checksum
}.
to
(
nil
)
end
it
'returns the deployment'
do
expect
(
subject
.
execute
).
to
eq
(
deployment
)
end
end
end
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a 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