Open marcoSven opened 3 years ago
it's hard to know what's causing the issue without more information. if there are service workers in use, they can affect this; I have no idea how the Ghost plugin pulls in data or what's actually missing in the build
if you can share the build log and/or the repo, I can take a look and see if we can spot the issue
thanks!
Hi, here are two starter builds both have the same caching issue. Notice dazzling matches the content (/test-post/ - Saucer sugar lemon decaffeinated) of the source, this is because there was one additional deploy after the content change build hook. Here link I see Saucer sour sugar lemon decaffeinated
CMS https://ghostwriterdev.bettinalimaco.com/test-post/ - both sites are triggered by content changes via build hooks
7:22:06 AM: Build ready to start
7:22:07 AM: build-image version: b0258b965567defc4a2d7e2f2dec2e00c8f73ad6
7:22:07 AM: build-image tag: v3.4.1
7:22:07 AM: buildbot version: cdc66b02d86506251d3343610a77385376c8c035
7:22:07 AM: Fetching cached dependencies
7:22:07 AM: Starting to download cache of 202.1MB
7:22:08 AM: Finished downloading cache in 1.090560036s
7:22:08 AM: Starting to extract cache
7:22:15 AM: Finished extracting cache in 6.72023412s
7:22:15 AM: Finished fetching cache in 7.85151605s
7:22:15 AM: Starting to prepare the repo for build
7:22:15 AM: Preparing Git Reference refs/heads/master
7:22:17 AM: Different publish path detected, going to use the one specified in the Netlify configuration file: 'public' versus 'public/' in the Netlify UI
7:22:17 AM: Starting build script
7:22:17 AM: Installing dependencies
7:22:17 AM: Python version set to 2.7
7:22:17 AM: Started restoring cached node version
7:22:20 AM: Finished restoring cached node version
7:22:20 AM: Attempting node version '12' from .nvmrc
7:22:21 AM: v12.19.0 is already installed.
7:22:21 AM: Now using node v12.19.0 (npm v6.14.8)
7:22:21 AM: Started restoring cached build plugins
7:22:21 AM: Finished restoring cached build plugins
7:22:21 AM: Attempting ruby version 2.7.1, read from environment
7:22:22 AM: Using ruby version 2.7.1
7:22:23 AM: Using PHP version 5.6
7:22:23 AM: 5.2 is already installed.
7:22:23 AM: Using Swift version 5.2
7:22:23 AM: Started restoring cached node modules
7:22:23 AM: Finished restoring cached node modules
7:22:23 AM: Started restoring cached yarn cache
7:22:23 AM: Finished restoring cached yarn cache
7:22:23 AM: Installing NPM modules using Yarn version 1.22.4
7:22:24 AM: yarn install v1.22.4
7:22:24 AM: [1/5] Validating package.json...
7:22:24 AM: [2/5] Resolving packages...
7:22:24 AM: warning Resolution field "sharp@0.26.0" is incompatible with requested version "sharp@^0.25.4"
7:22:24 AM: warning Resolution field "sharp@0.26.0" is incompatible with requested version "sharp@^0.25.4"
7:22:24 AM: warning Resolution field "sharp@0.26.0" is incompatible with requested version "sharp@^0.25.4"
7:22:25 AM: success Already up-to-date.
7:22:25 AM: Done in 0.94s.
7:22:25 AM: NPM modules installed using Yarn
7:22:25 AM: Started restoring cached go cache
7:22:25 AM: Finished restoring cached go cache
7:22:25 AM: go version go1.14.4 linux/amd64
7:22:25 AM: go version go1.14.4 linux/amd64
7:22:25 AM: Installing missing commands
7:22:25 AM: Verify run directory
7:22:26 AM:
7:22:26 AM: ┌─────────────────────────────┐
7:22:26 AM: │ Netlify Build │
7:22:26 AM: └─────────────────────────────┘
7:22:26 AM:
7:22:26 AM: ❯ Version
7:22:26 AM: @netlify/build 5.0.3
7:22:26 AM:
7:22:26 AM: ❯ Flags
7:22:26 AM: deployId: 5f96db8eae032f2391a1e625
7:22:26 AM: mode: buildbot
7:22:26 AM:
7:22:26 AM: ❯ Current directory
7:22:26 AM: /opt/build/repo
7:22:26 AM:
7:22:26 AM: ❯ Config file
7:22:26 AM: /opt/build/repo/netlify.toml
7:22:26 AM:
7:22:26 AM: ❯ Context
7:22:26 AM: production
7:22:26 AM:
7:22:26 AM: ❯ Loading plugins
7:22:26 AM: - netlify-plugin-gatsby-cache@0.3.0 from netlify.toml
7:22:26 AM:
7:22:26 AM: ┌────────────────────────────────────────────────────────┐
7:22:26 AM: │ 1. onPreBuild command from netlify-plugin-gatsby-cache │
7:22:26 AM: └────────────────────────────────────────────────────────┘
7:22:26 AM:
7:22:27 AM: Found a Gatsby cache. We’re about to go FAST. ⚡️
7:22:27 AM:
7:22:27 AM: (netlify-plugin-gatsby-cache onPreBuild completed in 554ms)
7:22:27 AM:
7:22:27 AM: ┌────────────────────────────────────┐
7:22:27 AM: │ 2. build.command from netlify.toml │
7:22:27 AM: └────────────────────────────────────┘
7:22:27 AM:
7:22:27 AM: $ NODE_ENV=production gatsby build
7:22:29 AM: success open and validate gatsby-configs - 0.106s
7:22:30 AM: success load plugins - 0.846s
7:22:30 AM: success onPreInit - 0.098s
7:22:30 AM: success delete html and css files from previous builds - 0.008s
7:22:30 AM: success initialize cache - 0.005s
7:22:30 AM: success copy gatsby files - 0.037s
7:22:30 AM: warning gatsby-plugin-feed was initialized in gatsby-config.js without a title in a feed.
7:22:30 AM: This means that the plugin will use the default feed title, which may not match your use case.
7:22:30 AM: This behavior will be removed in the next major release of gatsby-plugin-feed.
7:22:30 AM: For more info, check out: https://gatsby.dev/adding-rss-feed
7:22:30 AM: success onPreBootstrap - 0.020s
7:22:30 AM: success createSchemaCustomization - 0.030s
7:22:31 AM: success Checking for changed pages - 0.000s
7:22:31 AM: success source and transform nodes - 0.529s
7:22:32 AM: success building schema - 0.533s
7:22:32 AM: info Total nodes: 71, SitePage nodes: 14 (use --verbose for breakdown)
7:22:32 AM: success createPages - 0.067s
7:22:32 AM: success Checking for changed pages - 0.000s
7:22:32 AM: success createPagesStatefully - 0.066s
7:22:32 AM: success Cleaning up stale page-data - 0.002s
7:22:32 AM: success update schema - 0.030s
7:22:32 AM: success onPreExtractQueries - 0.001s
7:22:32 AM: success extract queries from components - 0.580s
7:22:32 AM: warning The GraphQL query in the non-page component "/opt/build/repo/src/templates/page.js" will not be run.
7:22:32 AM: Exported queries are only executed for Page components. It's possible you're
7:22:32 AM: trying to create pages in your gatsby-node.js and that's failing for some
reason.
7:22:32 AM: If the failing component(s) is a regular component and not intended to be a page
7:22:32 AM: component, you generally want to use a
thanks for your patience! I just checked these sites and there are Service Workers running — this will keep older content cached locally, which means the deployed site may be different than the cached site in your browser. this is a known issue with Service Workers, and the Gatsby Cache plugin won't affect this behavior
however, you can verify this by checking the "bypass for network" box in Chrome DevTools > Applications > Service Workers:
I hope that helps!
https://lucid-bartik-860c1d.netlify.app/ - there is no service worker on this site, which is the site with one content change behind. https://dazzling-bassi-c3e77e.netlify.app/test-post/ - this one with sw is the one that shows the latest content.
Notice dazzling matches the content (/test-post/ - Saucer sugar lemon decaffeinated) of the source, this is because there was one additional deploy after the content change build hook.
ah, hmm. let me tag @ehmicky on this, because we'll need to dig into these sites to figure out what's going on
@marcoSven can you try with the Gatsby cache plugin disabled, and if it is still occurring, with experimental builds disabled?
Content changes (updating, adding, or deleting), don't show after the first webhook triggered deploy. The changes usually show on the next or following build. Thoughts?
netlify.toml
`[build] command = "GATSBY_EXPERIMENTAL_PAGE_BUILD_ON_DATA_CHANGES=true gatsby build --log-pages" publish = "demo/public"
[template] incoming-hooks = ["Ghost"]
[[plugins]] package = "netlify-plugin-gatsby-cache"`