[ARVADOS] updated: f502351f855098ecdc76819a0340e1ab06d2c2d8
Git user
git at public.curoverse.com
Thu Aug 25 15:18:14 EDT 2016
Summary of changes:
services/api/test/unit/log_test.rb | 15 ++++++++++-----
1 file changed, 10 insertions(+), 5 deletions(-)
discards aed4b4024a9180a6f7d600060bda2d9680444384 (commit)
discards 04526d421ac831056aca7d90b0a4a6966c6c660b (commit)
via f502351f855098ecdc76819a0340e1ab06d2c2d8 (commit)
via f2c6c618fba3b262d1b5e0f54a1421c9660df9bd (commit)
This update added new revisions after undoing existing revisions. That is
to say, the old revision is not a strict subset of the new revision. This
situation occurs when you --force push a change and generate a repository
containing something like this:
* -- * -- B -- O -- O -- O (aed4b4024a9180a6f7d600060bda2d9680444384)
\
N -- N -- N (f502351f855098ecdc76819a0340e1ab06d2c2d8)
When this happens we assume that you've already had alert emails for all
of the O revisions, and so we here report only the revisions in the N
branch from the common base, B.
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 f502351f855098ecdc76819a0340e1ab06d2c2d8
Author: Tom Clegg <tom at curoverse.com>
Date: Thu Aug 25 14:41:43 2016 -0400
9709: Tweak config comment.
diff --git a/services/api/config/application.default.yml b/services/api/config/application.default.yml
index e59f6e5..ed3b517 100644
--- a/services/api/config/application.default.yml
+++ b/services/api/config/application.default.yml
@@ -243,7 +243,7 @@ common:
# silenced by throttling are not counted against this total.
crunch_limit_log_bytes_per_job: 67108864
- # Attributes to avoid saving in events and audit logs. Notably,
+ # Attributes to suppress in events and audit logs. Notably,
# specifying ["manifest_text"] here typically makes the database
# smaller and faster.
#
commit f2c6c618fba3b262d1b5e0f54a1421c9660df9bd
Author: Tom Clegg <tom at curoverse.com>
Date: Thu Aug 25 14:41:01 2016 -0400
9709: Test empty unlogged_attributes config.
diff --git a/services/api/test/unit/log_test.rb b/services/api/test/unit/log_test.rb
index fcd2b80..fd71576 100644
--- a/services/api/test/unit/log_test.rb
+++ b/services/api/test/unit/log_test.rb
@@ -9,7 +9,7 @@ class LogTest < ActiveSupport::TestCase
:destroy => [nil, :assert_not_nil, :assert_nil],
}
- def setup
+ setup do
@start_time = Time.now
@log_count = 1
end
@@ -271,10 +271,12 @@ class LogTest < ActiveSupport::TestCase
end
end
- test "manifest_text not included in collection logs" do
+ test "non-empty configuration.unlogged_attributes" do
Rails.configuration.unlogged_attributes = ["manifest_text"]
+ txt = ". acbd18db4cc2f85cedef654fccc4a4d8+3 0:3:foo\n"
+
act_as_system_user do
- coll = Collection.create(manifest_text: ". acbd18db4cc2f85cedef654fccc4a4d8+3 0:3:foo\n")
+ coll = Collection.create(manifest_text: txt)
assert_logged_with_clean_properties(coll, :create, 'manifest_text')
coll.name = "testing"
coll.save!
@@ -283,4 +285,25 @@ class LogTest < ActiveSupport::TestCase
assert_logged_with_clean_properties(coll, :destroy, 'manifest_text')
end
end
+
+ test "empty configuration.unlogged_attributes" do
+ Rails.configuration.unlogged_attributes = []
+ txt = ". acbd18db4cc2f85cedef654fccc4a4d8+3 0:3:foo\n"
+
+ act_as_system_user do
+ coll = Collection.create(manifest_text: txt)
+ assert_logged(coll, :create) do |props|
+ assert_equal(txt, props['new_attributes']['manifest_text'])
+ end
+ coll.update_attributes!(name: "testing")
+ assert_logged(coll, :update) do |props|
+ assert_equal(txt, props['old_attributes']['manifest_text'])
+ assert_equal(txt, props['new_attributes']['manifest_text'])
+ end
+ coll.destroy
+ assert_logged(coll, :destroy) do |props|
+ assert_equal(txt, props['old_attributes']['manifest_text'])
+ end
+ end
+ end
end
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list