• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

refinery / refinerycms / 4114
95%

Build:
DEFAULT BRANCH: master
Ran 31 Aug 2020 12:54AM UTC
Jobs 20
Files 228
Run time 6min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

pending completion
4114

push

travis-ci-com

web-flow
fix fragment caching for deleting page (#3480)

Hey,

we discovered some strange behaviour in our live application. If an refinery admin deletes a specific page, the fragment caching cannot resolve the caching to the right pages. We found a specific setup which always fails. You can see it in the Test Setup section. The main problem is, that we can't reproduce it in the refinery spec tests. To fix this issue, we updated the collection caching part. 

In the Error Output ActiveSupport::Cache.retrieve_cache_key section you can see the strange behaviour of mapping the cache to the wrong refinery_page.


## Test Setup

```ruby
    setup do
      # delete all refinery pages and create a root page
      ensure_only_homepage!

      page_first = Refinery::Page.root
      page_second = create(:refinery_page, title: 'Parent Page second')
      
      page_second.children.create(title: 'Second Parent Page First Child')
      page_second.children.create(title: 'Second Parent Page Second Child')

      @delete_me = page_first.children.create(title: 'Delete Me Page')

      sign_in_to_cms
    end

    should 'delete an existing page' do
      with_caching do
        visit refinery.admin_pages_path

        refinery_page = @delete_me
        assert has_content? refinery_page.title
        find("#page_#{refinery_page.id} .delete_icon", match: :first).click
        page.accept_alert

        Refinery::Page.all.map(&:title).uniq.each do |title|
          next if title.blank?
          assert has_no_text?(title, minimum: 2)
        end
      end
    end
```

## Error Output ActiveSupport::Cache.retrieve_cache_key

```ruby
# ActiveSupport::Cache.send(:retrieve_cache_key, child_page.self_and_descendants)
# -> "refinery/pages/query-0dee4f65ed115ac80776d3631787c654-1-20200728075715363993"
# pages/app/views/refinery/admin/pages/_page.html.erb:51
<%= render(partial: 'page', collection: page.children, cached: ->(child_page) { ch... (continued)

6343 of 6681 relevant lines covered (94.94%)

85.12 hits per line

Jobs
ID Job ID Ran Files Coverage
1 4114.1 (2.6, DB=postgresql EXTENSION=core) 31 Aug 2020 12:54AM UTC 0
81.22
Travis Job 4114.1
2 4114.2 (2.6, DB=postgresql EXTENSION=dragonfly) 31 Aug 2020 12:54AM UTC 0
62.81
Travis Job 4114.2
3 4114.3 (2.6, DB=postgresql EXTENSION=pages) 31 Aug 2020 12:55AM UTC 0
88.56
Travis Job 4114.3
4 4114.4 (2.6, DB=postgresql EXTENSION=images) 31 Aug 2020 12:54AM UTC 0
82.81
Travis Job 4114.4
5 4114.5 (2.6, DB=postgresql EXTENSION=resources) 31 Aug 2020 12:54AM UTC 0
72.96
Travis Job 4114.5
6 4114.6 (2.6, DB=mysql EXTENSION=core) 31 Aug 2020 12:54AM UTC 0
81.79
Travis Job 4114.6
7 4114.7 (2.6, DB=mysql EXTENSION=dragonfly) 31 Aug 2020 12:54AM UTC 0
62.81
Travis Job 4114.7
8 4114.8 (2.6, DB=mysql EXTENSION=pages) 31 Aug 2020 12:57AM UTC 0
88.56
Travis Job 4114.8
9 4114.9 (2.6, DB=mysql EXTENSION=images) 31 Aug 2020 12:57AM UTC 0
82.81
Travis Job 4114.9
10 4114.10 (2.6, DB=mysql EXTENSION=resources) 31 Aug 2020 12:56AM UTC 0
72.96
Travis Job 4114.10
11 4114.11 (2.5, DB=postgresql EXTENSION=core) 31 Aug 2020 12:56AM UTC 0
81.14
Travis Job 4114.11
12 4114.12 (2.5, DB=postgresql EXTENSION=dragonfly) 31 Aug 2020 12:57AM UTC 0
62.78
Travis Job 4114.12
13 4114.13 (2.5, DB=postgresql EXTENSION=pages) 31 Aug 2020 12:57AM UTC 0
88.52
Travis Job 4114.13
14 4114.14 (2.5, DB=postgresql EXTENSION=images) 31 Aug 2020 12:57AM UTC 0
82.82
Travis Job 4114.14
15 4114.15 (2.5, DB=postgresql EXTENSION=resources) 31 Aug 2020 12:59AM UTC 0
72.93
Travis Job 4114.15
16 4114.16 (2.5, DB=mysql EXTENSION=core) 31 Aug 2020 12:59AM UTC 0
81.71
Travis Job 4114.16
17 4114.17 (2.5, DB=mysql EXTENSION=dragonfly) 31 Aug 2020 12:59AM UTC 0
62.78
Travis Job 4114.17
18 4114.18 (2.5, DB=mysql EXTENSION=pages) 31 Aug 2020 12:59AM UTC 0
88.52
Travis Job 4114.18
19 4114.19 (2.5, DB=mysql EXTENSION=images) 31 Aug 2020 01:00AM UTC 0
82.82
Travis Job 4114.19
20 4114.20 (2.5, DB=mysql EXTENSION=resources) 31 Aug 2020 12:59AM UTC 0
72.93
Travis Job 4114.20
Source Files on build 4114
Detailed source file information is not available for this build.
  • Back to Repo
  • Build #4114
  • b41118ed on github
  • Prev Build on master (#4110)
  • Next Build on master (#4115)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc