Revert to use Mounter method to check existence

See: 6280fd3777 (note_14766241)

We wanted to avoid accesses to the file system, because it seems reasonable that if the mounter column has some content it’s because there are an associate file. This is an speed boost when you access to a bunch of build instances to show their information.

The problem is that solution doesn’t work if you uses that method to detect the thing and you’re changing the uploaded file on instances that had that column empty. Until you don’t persist the instance the database column will be empty so we can have false negatives
This commit is contained in:
Paco Guzman 2016-09-29 12:59:31 +02:00
parent 80fef70bb7
commit 32e32fa0fd
2 changed files with 2 additions and 1 deletions

View File

@ -14,6 +14,7 @@ v 8.13.0 (unreleased)
- Only update issuable labels if they have been changed
- Revoke button in Applications Settings underlines on hover.
- Fix Long commit messages overflow viewport in file tree
- Revert avoid touching file system on Build#artifacts?
- Update ruby-prof to 0.16.2. !6026 (Elan Ruusamäe)
- Add organization field to user profile
- Fix resolved discussion display in side-by-side diff view !6575

View File

@ -373,7 +373,7 @@ module Ci
end
def artifacts?
!artifacts_expired? && self[:artifacts_file].present?
!artifacts_expired? && artifacts_file.exists?
end
def artifacts_metadata?