[ARVADOS] updated: 1.3.0-2866-g4c417c02b
Git user
git at public.arvados.org
Fri Aug 7 22:12:59 UTC 2020
Summary of changes:
services/api/app/models/collection.rb | 5 +++--
services/api/config/secrets.yml | 6 +++---
2 files changed, 6 insertions(+), 5 deletions(-)
via 4c417c02b975f20938fc40ab007e351ea80d4666 (commit)
from 601249b0bfa07fd4fe5f9fb2d8496c732bfba409 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
commit 4c417c02b975f20938fc40ab007e351ea80d4666
Author: Lucas Di Pentima <lucas at di-pentima.com.ar>
Date: Fri Aug 7 19:11:27 2020 -0300
16470: Discards changes before locking instead of reloading the record.
There's no need to make a database roundtrip, because all the old attribute
values are available.
Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima <lucas at di-pentima.com.ar>
diff --git a/services/api/app/models/collection.rb b/services/api/app/models/collection.rb
index c7d5a93b5..8b549a71a 100644
--- a/services/api/app/models/collection.rb
+++ b/services/api/app/models/collection.rb
@@ -259,10 +259,11 @@ class Collection < ArvadosModel
should_preserve_version = should_preserve_version? # Time sensitive, cache value
return(yield) unless (should_preserve_version || syncable_updates.any?)
- # Put aside the changes because with_lock requires an explicit record reload
+ # Put aside the changes because with_lock does a record reload
changes = self.changes
snapshot = nil
- reload.with_lock do
+ restore_attributes
+ with_lock do
# Copy the original state to save it as old version
if should_preserve_version
snapshot = self.dup
diff --git a/services/api/config/secrets.yml b/services/api/config/secrets.yml
index 374d52969..293b93bcd 100644
--- a/services/api/config/secrets.yml
+++ b/services/api/config/secrets.yml
@@ -19,13 +19,13 @@
# Environmental secrets are only available for that specific environment.
# development:
-# secret_key_base: rand(1<<255).to_s(36)
+# secret_key_base: <%= rand(1<<255).to_s(36) %>
# test:
-# secret_key_base: rand(1<<255).to_s(36)
+# secret_key_base: <%= rand(1<<255).to_s(36) %>
# In case this doesn't get overriden for some reason, assign a random key
# to gracefully degrade by rejecting cookies instead of by opening a
# vulnerability.
production:
- secret_key_base: rand(1<<255).to_s(36)
+ secret_key_base: <%= rand(1<<255).to_s(36) %>
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list