{"action":"created","comment":{"url":"https://api.github.com/repos/rails/rails/pulls/comments/226729508","pull_request_review_id":166629162,"id":226729508,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIyNjcyOTUwOA==","diff_hunk":"@@ -498,7 +498,41 @@ def test_cache_miss_instrumentation\n     ActiveSupport::Notifications.unsubscribe \"cache_read.active_support\"\n   end\n \n+  def test_nil_is_significant\n+    skip \"does not support blank key\" if does_not_support_blank_keys?\n+\n+    @cache.write(nil, \"baz\")\n+    assert_equal \"baz\", @cache.read(nil)\n+\n+    @cache.write([nil], \"bizz\")\n+    assert_equal \"bizz\", @cache.read(nil)\n+  end","path":"activesupport/test/cache/behaviors/cache_store_behavior.rb","position":12,"original_position":12,"commit_id":"a5989e180cf8763366c46c0263baf687b85b7224","original_commit_id":"a5989e180cf8763366c46c0263baf687b85b7224","user":{"login":"jeremy","id":199,"node_id":"MDQ6VXNlcjE5OQ==","avatar_url":"https://avatars1.githubusercontent.com/u/199?v=4","gravatar_id":"","url":"https://api.github.com/users/jeremy","html_url":"https://github.com/jeremy","followers_url":"https://api.github.com/users/jeremy/followers","following_url":"https://api.github.com/users/jeremy/following{/other_user}","gists_url":"https://api.github.com/users/jeremy/gists{/gist_id}","starred_url":"https://api.github.com/users/jeremy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jeremy/subscriptions","organizations_url":"https://api.github.com/users/jeremy/orgs","repos_url":"https://api.github.com/users/jeremy/repos","events_url":"https://api.github.com/users/jeremy/events{/privacy}","received_events_url":"https://api.github.com/users/jeremy/received_events","type":"User","site_admin":false},"body":"I don't think we actually want to support singular blank keys. It's nearly always a mistake/error, unless it's a single-purpose cache that's namespaced—quite uncommon.\r\n\r\nSo, this is the current behavior, but it's an unaddressed edge case that we probably don't want to lock in with test coverage. We'd be better off raising an exception (with migration path) or documenting it as explicitly undefined.","created_at":"2018-10-19T17:46:58Z","updated_at":"2018-10-19T17:51:50Z","html_url":"https://github.com/rails/rails/pull/34128#discussion_r226729508","pull_request_url":"https://api.github.com/repos/rails/rails/pulls/34128","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/rails/rails/pulls/comments/226729508"},"html":{"href":"https://github.com/rails/rails/pull/34128#discussion_r226729508"},"pull_request":{"href":"https://api.github.com/repos/rails/rails/pulls/34128"}}},"pull_request":{"url":"https://api.github.com/repos/rails/rails/pulls/34128","id":221256803,"node_id":"MDExOlB1bGxSZXF1ZXN0MjIxMjU2ODAz","html_url":"https://github.com/rails/rails/pull/34128","diff_url":"https://github.com/rails/rails/pull/34128.diff","patch_url":"https://github.com/rails/rails/pull/34128.patch","issue_url":"https://api.github.com/repos/rails/rails/issues/34128","number":34128,"state":"open","locked":false,"title":"Test that nil values in the cache are significant","user":{"login":"schneems","id":59744,"node_id":"MDQ6VXNlcjU5NzQ0","avatar_url":"https://avatars2.githubusercontent.com/u/59744?v=4","gravatar_id":"","url":"https://api.github.com/users/schneems","html_url":"https://github.com/schneems","followers_url":"https://api.github.com/users/schneems/followers","following_url":"https://api.github.com/users/schneems/following{/other_user}","gists_url":"https://api.github.com/users/schneems/gists{/gist_id}","starred_url":"https://api.github.com/users/schneems/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/schneems/subscriptions","organizations_url":"https://api.github.com/users/schneems/orgs","repos_url":"https://api.github.com/users/schneems/repos","events_url":"https://api.github.com/users/schneems/events{/privacy}","received_events_url":"https://api.github.com/users/schneems/received_events","type":"User","site_admin":false},"body":"As discussed in #33944 nil values are significant in cache keys, however, their formatting is currently untested. This PR adds tests for nil cache keys.\r\n\r\nIt's worth noting that two of the cache backends do not support a few calls with nil. I skipped those cases.\r\n","created_at":"2018-10-08T22:11:45Z","updated_at":"2018-10-19T17:51:50Z","closed_at":null,"merged_at":null,"merge_commit_sha":"97bf352fa5f01a1788002a1355675f3c53d20baf","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":107194,"node_id":"MDU6TGFiZWwxMDcxOTQ=","url":"https://api.github.com/repos/rails/rails/labels/activesupport","name":"activesupport","color":"FC9300","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/rails/rails/pulls/34128/commits","review_comments_url":"https://api.github.com/repos/rails/rails/pulls/34128/comments","review_comment_url":"https://api.github.com/repos/rails/rails/pulls/comments{/number}","comments_url":"https://api.github.com/repos/rails/rails/issues/34128/comments","statuses_url":"https://api.github.com/repos/rails/rails/statuses/a5989e180cf8763366c46c0263baf687b85b7224","head":{"label":"schneems:schneems/test-nil-is-signifigant","ref":"schneems/test-nil-is-signifigant","sha":"a5989e180cf8763366c46c0263baf687b85b7224","user":{"login":"schneems","id":59744,"node_id":"MDQ6VXNlcjU5NzQ0","avatar_url":"https://avatars2.githubusercontent.com/u/59744?v=4","gravatar_id":"","url":"https://api.github.com/users/schneems","html_url":"https://github.com/schneems","followers_url":"https://api.github.com/users/schneems/followers","following_url":"https://api.github.com/users/schneems/following{/other_user}","gists_url":"https://api.github.com/users/schneems/gists{/gist_id}","starred_url":"https://api.github.com/users/schneems/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/schneems/subscriptions","organizations_url":"https://api.github.com/users/schneems/orgs","repos_url":"https://api.github.com/users/schneems/repos","events_url":"https://api.github.com/users/schneems/events{/privacy}","received_events_url":"https://api.github.com/users/schneems/received_events","type":"User","site_admin":false},"repo":{"id":2873136,"node_id":"MDEwOlJlcG9zaXRvcnkyODczMTM2","name":"rails","full_name":"schneems/rails","private":false,"owner":{"login":"schneems","id":59744,"node_id":"MDQ6VXNlcjU5NzQ0","avatar_url":"https://avatars2.githubusercontent.com/u/59744?v=4","gravatar_id":"","url":"https://api.github.com/users/schneems","html_url":"https://github.com/schneems","followers_url":"https://api.github.com/users/schneems/followers","following_url":"https://api.github.com/users/schneems/following{/other_user}","gists_url":"https://api.github.com/users/schneems/gists{/gist_id}","starred_url":"https://api.github.com/users/schneems/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/schneems/subscriptions","organizations_url":"https://api.github.com/users/schneems/orgs","repos_url":"https://api.github.com/users/schneems/repos","events_url":"https://api.github.com/users/schneems/events{/privacy}","received_events_url":"https://api.github.com/users/schneems/received_events","type":"User","site_admin":false},"html_url":"https://github.com/schneems/rails","description":"Ruby on Rails","fork":true,"url":"https://api.github.com/repos/schneems/rails","forks_url":"https://api.github.com/repos/schneems/rails/forks","keys_url":"https://api.github.com/repos/schneems/rails/keys{/key_id}","collaborators_url":"https://api.github.com/repos/schneems/rails/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/schneems/rails/teams","hooks_url":"https://api.github.com/repos/schneems/rails/hooks","issue_events_url":"https://api.github.com/repos/schneems/rails/issues/events{/number}","events_url":"https://api.github.com/repos/schneems/rails/events","assignees_url":"https://api.github.com/repos/schneems/rails/assignees{/user}","branches_url":"https://api.github.com/repos/schneems/rails/branches{/branch}","tags_url":"https://api.github.com/repos/schneems/rails/tags","blobs_url":"https://api.github.com/repos/schneems/rails/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/schneems/rails/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/schneems/rails/git/refs{/sha}","trees_url":"https://api.github.com/repos/schneems/rails/git/trees{/sha}","statuses_url":"https://api.github.com/repos/schneems/rails/statuses/{sha}","languages_url":"https://api.github.com/repos/schneems/rails/languages","stargazers_url":"https://api.github.com/repos/schneems/rails/stargazers","contributors_url":"https://api.github.com/repos/schneems/rails/contributors","subscribers_url":"https://api.github.com/repos/schneems/rails/subscribers","subscription_url":"https://api.github.com/repos/schneems/rails/subscription","commits_url":"https://api.github.com/repos/schneems/rails/commits{/sha}","git_commits_url":"https://api.github.com/repos/schneems/rails/git/commits{/sha}","comments_url":"https://api.github.com/repos/schneems/rails/comments{/number}","issue_comment_url":"https://api.github.com/repos/schneems/rails/issues/comments{/number}","contents_url":"https://api.github.com/repos/schneems/rails/contents/{+path}","compare_url":"https://api.github.com/repos/schneems/rails/compare/{base}...{head}","merges_url":"https://api.github.com/repos/schneems/rails/merges","archive_url":"https://api.github.com/repos/schneems/rails/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/schneems/rails/downloads","issues_url":"https://api.github.com/repos/schneems/rails/issues{/number}","pulls_url":"https://api.github.com/repos/schneems/rails/pulls{/number}","milestones_url":"https://api.github.com/repos/schneems/rails/milestones{/number}","notifications_url":"https://api.github.com/repos/schneems/rails/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/schneems/rails/labels{/name}","releases_url":"https://api.github.com/repos/schneems/rails/releases{/id}","deployments_url":"https://api.github.com/repos/schneems/rails/deployments","created_at":"2011-11-29T06:48:49Z","updated_at":"2018-09-21T14:33:56Z","pushed_at":"2018-10-17T16:06:43Z","git_url":"git://github.com/schneems/rails.git","ssh_url":"git@github.com:schneems/rails.git","clone_url":"https://github.com/schneems/rails.git","svn_url":"https://github.com/schneems/rails","homepage":"http://rubyonrails.org","size":158374,"stargazers_count":2,"watchers_count":2,"language":"Ruby","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":0,"watchers":2,"default_branch":"master"}},"base":{"label":"rails:master","ref":"master","sha":"a1ee4a9ff9d4a3cb255365310ead0dc7b739c6be","user":{"login":"rails","id":4223,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQyMjM=","avatar_url":"https://avatars1.githubusercontent.com/u/4223?v=4","gravatar_id":"","url":"https://api.github.com/users/rails","html_url":"https://github.com/rails","followers_url":"https://api.github.com/users/rails/followers","following_url":"https://api.github.com/users/rails/following{/other_user}","gists_url":"https://api.github.com/users/rails/gists{/gist_id}","starred_url":"https://api.github.com/users/rails/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rails/subscriptions","organizations_url":"https://api.github.com/users/rails/orgs","repos_url":"https://api.github.com/users/rails/repos","events_url":"https://api.github.com/users/rails/events{/privacy}","received_events_url":"https://api.github.com/users/rails/received_events","type":"Organization","site_admin":false},"repo":{"id":8514,"node_id":"MDEwOlJlcG9zaXRvcnk4NTE0","name":"rails","full_name":"rails/rails","private":false,"owner":{"login":"rails","id":4223,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQyMjM=","avatar_url":"https://avatars1.githubusercontent.com/u/4223?v=4","gravatar_id":"","url":"https://api.github.com/users/rails","html_url":"https://github.com/rails","followers_url":"https://api.github.com/users/rails/followers","following_url":"https://api.github.com/users/rails/following{/other_user}","gists_url":"https://api.github.com/users/rails/gists{/gist_id}","starred_url":"https://api.github.com/users/rails/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rails/subscriptions","organizations_url":"https://api.github.com/users/rails/orgs","repos_url":"https://api.github.com/users/rails/repos","events_url":"https://api.github.com/users/rails/events{/privacy}","received_events_url":"https://api.github.com/users/rails/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/rails/rails","description":"Ruby on Rails","fork":false,"url":"https://api.github.com/repos/rails/rails","forks_url":"https://api.github.com/repos/rails/rails/forks","keys_url":"https://api.github.com/repos/rails/rails/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rails/rails/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rails/rails/teams","hooks_url":"https://api.github.com/repos/rails/rails/hooks","issue_events_url":"https://api.github.com/repos/rails/rails/issues/events{/number}","events_url":"https://api.github.com/repos/rails/rails/events","assignees_url":"https://api.github.com/repos/rails/rails/assignees{/user}","branches_url":"https://api.github.com/repos/rails/rails/branches{/branch}","tags_url":"https://api.github.com/repos/rails/rails/tags","blobs_url":"https://api.github.com/repos/rails/rails/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rails/rails/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rails/rails/git/refs{/sha}","trees_url":"https://api.github.com/repos/rails/rails/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rails/rails/statuses/{sha}","languages_url":"https://api.github.com/repos/rails/rails/languages","stargazers_url":"https://api.github.com/repos/rails/rails/stargazers","contributors_url":"https://api.github.com/repos/rails/rails/contributors","subscribers_url":"https://api.github.com/repos/rails/rails/subscribers","subscription_url":"https://api.github.com/repos/rails/rails/subscription","commits_url":"https://api.github.com/repos/rails/rails/commits{/sha}","git_commits_url":"https://api.github.com/repos/rails/rails/git/commits{/sha}","comments_url":"https://api.github.com/repos/rails/rails/comments{/number}","issue_comment_url":"https://api.github.com/repos/rails/rails/issues/comments{/number}","contents_url":"https://api.github.com/repos/rails/rails/contents/{+path}","compare_url":"https://api.github.com/repos/rails/rails/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rails/rails/merges","archive_url":"https://api.github.com/repos/rails/rails/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rails/rails/downloads","issues_url":"https://api.github.com/repos/rails/rails/issues{/number}","pulls_url":"https://api.github.com/repos/rails/rails/pulls{/number}","milestones_url":"https://api.github.com/repos/rails/rails/milestones{/number}","notifications_url":"https://api.github.com/repos/rails/rails/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rails/rails/labels{/name}","releases_url":"https://api.github.com/repos/rails/rails/releases{/id}","deployments_url":"https://api.github.com/repos/rails/rails/deployments","created_at":"2008-04-11T02:19:47Z","updated_at":"2018-10-19T17:13:09Z","pushed_at":"2018-10-19T17:12:10Z","git_url":"git://github.com/rails/rails.git","ssh_url":"git@github.com:rails/rails.git","clone_url":"https://github.com/rails/rails.git","svn_url":"https://github.com/rails/rails","homepage":"https://rubyonrails.org","size":167612,"stargazers_count":41183,"watchers_count":41183,"language":"Ruby","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":16638,"mirror_url":null,"archived":false,"open_issues_count":1066,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":16638,"open_issues":1066,"watchers":41183,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/rails/rails/pulls/34128"},"html":{"href":"https://github.com/rails/rails/pull/34128"},"issue":{"href":"https://api.github.com/repos/rails/rails/issues/34128"},"comments":{"href":"https://api.github.com/repos/rails/rails/issues/34128/comments"},"review_comments":{"href":"https://api.github.com/repos/rails/rails/pulls/34128/comments"},"review_comment":{"href":"https://api.github.com/repos/rails/rails/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/rails/rails/pulls/34128/commits"},"statuses":{"href":"https://api.github.com/repos/rails/rails/statuses/a5989e180cf8763366c46c0263baf687b85b7224"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"jeremy"}}