Submodule Publish Time

Hello. I pushed an update to one of my git submodules (a submodule of the theme) and Netlify isn’t showing the change yet even after multiple builds. I made changes previously to the submodule and Netlify showed the changes almost immediately. How long does it take to propagate?

gracious-hoover-e83670

hmm, that isn’t behaviour i’d expect.

Do you have a build log you can share with us?

Sure. This is my most recent build.

8:50:20 PM: Build ready to start
8:50:22 PM: build-image version: 2dbd444fcdce00cf06325060a8238d5ae3e86774
8:50:22 PM: build-image tag: v3.3.7
8:50:22 PM: buildbot version: 11918e084194721d200458438c92ff8180b3b56c
8:50:22 PM: Fetching cached dependencies
8:50:22 PM: Starting to download cache of 254.9KB
8:50:22 PM: Finished downloading cache in 76.122457ms
8:50:22 PM: Starting to extract cache
8:50:22 PM: Failed to fetch cache, continuing with build
8:50:22 PM: Starting to prepare the repo for build
8:50:23 PM: No cached dependencies found. Cloning fresh repo
8:50:23 PM: git clone GitHub - tman5/fatalexception
8:50:23 PM: Preparing Git Reference refs/heads/master
8:50:24 PM: Starting build script
8:50:24 PM: Installing dependencies
8:50:26 PM: v10.19.0 is already installed.
8:50:27 PM: Now using node v10.19.0 (npm v6.13.4)
8:50:27 PM: Attempting ruby version 2.6.2, read from environment
8:50:28 PM: Using ruby version 2.6.2
8:50:28 PM: Using PHP version 5.6
8:50:28 PM: Installing Hugo 0.62.2
8:50:30 PM: Hugo Static Site Generator v0.62.2-83E50184/extended linux/amd64 BuildDate: 2020-01-05T18:57:23Z
8:50:30 PM: Started restoring cached go cache
8:50:30 PM: Finished restoring cached go cache
8:50:30 PM: unset GOOS;
8:50:30 PM: unset GOARCH;
8:50:30 PM: export GOROOT=‘/opt/buildhome/.gimme/versions/go1.12.linux.amd64’;
8:50:30 PM: export PATH=“/opt/buildhome/.gimme/versions/go1.12.linux.amd64/bin:${PATH}”;
8:50:30 PM: go version >&2;
8:50:30 PM: export GIMME_ENV=‘/opt/buildhome/.gimme/env/go1.12.linux.amd64.env’;
8:50:30 PM: go version go1.12 linux/amd64
8:50:30 PM: Installing missing commands
8:50:30 PM: Verify run directory
8:50:30 PM: Executing user command: hugo
8:50:30 PM: Building sites …
8:50:30 PM: | EN
8:50:30 PM: ±-----------------+
8:50:30 PM: ----+
8:50:30 PM: Pages | 27
8:50:30 PM: Paginator pages | 0
8:50:30 PM: Non-page files | 0
8:50:30 PM: Static files | 19
8:50:30 PM: Processed images | 0
8:50:30 PM: Aliases | 11
8:50:30 PM: Sitemaps | 1
8:50:30 PM: Cleaned | 0
8:50:30 PM: Total in 36 ms
8:50:30 PM: Skipping functions preparation step: no functions directory set
8:50:30 PM: Caching artifacts
8:50:30 PM: Started saving node modules
8:50:30 PM: Finished saving node modules
8:50:30 PM: Started saving pip cache
8:50:30 PM: Finished saving pip cache
8:50:30 PM: Started saving emacs cask dependencies
8:50:30 PM: Finished saving emacs cask dependencies
8:50:30 PM: Started saving maven dependencies
8:50:30 PM: Finished saving maven dependencies
8:50:30 PM: Started saving boot dependencies
8:50:30 PM: Finished saving boot dependencies
8:50:30 PM: Started saving go dependencies
8:50:30 PM: Finished saving go dependencies
8:50:33 PM: Build script success
8:50:33 PM: Starting to deploy site from ‘public’
8:50:33 PM: Creating deploy tree
8:50:33 PM: Creating deploy upload records
8:50:33 PM: 0 new files to upload
8:50:33 PM: Starting post processing
8:50:33 PM: 0 new functions to upload
8:50:33 PM: Post processing done
8:50:34 PM: Site is live
8:50:48 PM: Finished processing build request in 26.535722281s

You know what’s strange, I did a push again tonight to update something else and now all my submodule changes are showing.

hmm - we did have a slowdown in our build system approx 6 hours ago -

maybe that was affecting things? At any rate, glad it is all working now. If you see issues updating again let us know.

I’m experiencing the same thing. The builds work just fine, but with a stale version of the submodule. Can someone at Netlify confirm whether submodules are cached somewhere and for how long?

Hi @azhawkes,

We’ve responded to your help desk ticket. Let us know where you’d like to keep the conversation going.

Hi @hrishikesh, thanks for your reply. I figured out the issue and I’ll post it here in case someone else is similarly affected. It wasn’t Netlify’s fault. :slight_smile:

Turns out my submodule was tracking a detached HEAD, instead of the master branch. By default, when you add a submodule, Git doesn’t track any particular branch, so it was basically frozen in time (even though I was pushing updates to the master branch). I only noticed the problem when I did a fresh recursive clone and finally saw what Netlify sees. I fixed it by removing the submodule and re-adding it but this time specifying a branch.

This StackOverflow answer explains it: Why is my Git Submodule HEAD detached from master? - Stack Overflow

1 Like

Thanks so much for coming back and sharing that here, @azhawkes. Like you said, this will definitely be beneficial for future Forums members who encounter something similar. :netliconfetti: