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
52bfca35
Commit
52bfca35
authored
Jan 18, 2018
by
Micaël Bergeron
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix specs added upstream
parent
42abf0f8
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
8 additions
and
8 deletions
+8
-8
ee/app/models/ee/ci/job_artifact.rb
ee/app/models/ee/ci/job_artifact.rb
+2
-2
ee/app/models/geo/fdw/ci/job_artifact.rb
ee/app/models/geo/fdw/ci/job_artifact.rb
+1
-1
ee/app/models/geo/fdw/lfs_object.rb
ee/app/models/geo/fdw/lfs_object.rb
+1
-1
ee/app/services/geo/job_artifact_deleted_event_store.rb
ee/app/services/geo/job_artifact_deleted_event_store.rb
+1
-1
ee/lib/gitlab/geo/log_cursor/daemon.rb
ee/lib/gitlab/geo/log_cursor/daemon.rb
+1
-1
spec/factories/geo/event_log.rb
spec/factories/geo/event_log.rb
+2
-2
No files found.
ee/app/models/ee/ci/job_artifact.rb
View file @
52bfca35
...
...
@@ -9,11 +9,11 @@ module EE
prepended
do
after_destroy
:log_geo_event
scope
:with_files_stored_locally
,
->
{
where
(
file_store:
[
nil
,
JobArtifactUploader
::
LOCAL_STORE
])
}
scope
:with_files_stored_locally
,
->
{
where
(
file_store:
[
nil
,
JobArtifactUploader
::
Store
::
LOCAL
])
}
end
def
local_store?
[
nil
,
JobArtifactUploader
::
LOCAL_STORE
].
include?
(
self
.
file_store
)
[
nil
,
JobArtifactUploader
::
Store
::
LOCAL
].
include?
(
self
.
file_store
)
end
private
...
...
ee/app/models/geo/fdw/ci/job_artifact.rb
View file @
52bfca35
...
...
@@ -4,7 +4,7 @@ module Geo
class
JobArtifact
<
::
Geo
::
BaseFdw
self
.
table_name
=
Gitlab
::
Geo
.
fdw_table
(
'ci_job_artifacts'
)
scope
:with_files_stored_locally
,
->
{
where
(
file_store:
[
nil
,
JobArtifactUploader
::
LOCAL_STORE
])
}
scope
:with_files_stored_locally
,
->
{
where
(
file_store:
[
nil
,
JobArtifactUploader
::
Store
::
LOCAL
])
}
end
end
end
...
...
ee/app/models/geo/fdw/lfs_object.rb
View file @
52bfca35
...
...
@@ -3,7 +3,7 @@ module Geo
class
LfsObject
<
::
Geo
::
BaseFdw
self
.
table_name
=
Gitlab
::
Geo
.
fdw_table
(
'lfs_objects'
)
scope
:with_files_stored_locally
,
->
{
where
(
file_store:
[
nil
,
LfsObjectUploader
::
LOCAL_STORE
])
}
scope
:with_files_stored_locally
,
->
{
where
(
file_store:
[
nil
,
LfsObjectUploader
::
Store
::
LOCAL
])
}
end
end
end
ee/app/services/geo/job_artifact_deleted_event_store.rb
View file @
52bfca35
...
...
@@ -24,7 +24,7 @@ module Geo
end
def
local_store_path
Pathname
.
new
(
JobArtifactUploader
.
local_store_path
)
Pathname
.
new
(
JobArtifactUploader
.
root
)
end
def
relative_file_path
...
...
ee/lib/gitlab/geo/log_cursor/daemon.rb
View file @
52bfca35
...
...
@@ -220,7 +220,7 @@ module Gitlab
file_registry_job_artifacts
=
::
Geo
::
FileRegistry
.
job_artifacts
.
where
(
file_id:
event
.
job_artifact_id
)
return
unless
file_registry_job_artifacts
.
any?
# avoid race condition
file_path
=
File
.
join
(
JobArtifactUploader
.
local_store_path
,
event
.
file_path
)
file_path
=
File
.
join
(
JobArtifactUploader
.
root
,
event
.
file_path
)
if
File
.
file?
(
file_path
)
deleted
=
delete_file
(
file_path
)
# delete synchronously to ensure consistency
...
...
spec/factories/geo/event_log.rb
View file @
52bfca35
...
...
@@ -100,7 +100,7 @@ FactoryBot.define do
lfs_object
{
create
(
:lfs_object
,
:with_file
)
}
after
(
:build
,
:stub
)
do
|
event
,
_
|
local_store_path
=
Pathname
.
new
(
LfsObjectUploader
.
local_store_path
)
local_store_path
=
Pathname
.
new
(
LfsObjectUploader
.
root
)
relative_path
=
Pathname
.
new
(
event
.
lfs_object
.
file
.
path
).
relative_path_from
(
local_store_path
)
event
.
oid
=
event
.
lfs_object
.
oid
...
...
@@ -112,7 +112,7 @@ FactoryBot.define do
job_artifact
{
create
(
:ci_job_artifact
,
:archive
)
}
after
(
:build
,
:stub
)
do
|
event
,
_
|
local_store_path
=
Pathname
.
new
(
JobArtifactUploader
.
local_store_path
)
local_store_path
=
Pathname
.
new
(
JobArtifactUploader
.
root
)
relative_path
=
Pathname
.
new
(
event
.
job_artifact
.
file
.
path
).
relative_path_from
(
local_store_path
)
event
.
file_path
=
relative_path
...
...
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