From 95ce2a40e734bb82b69f9a64270faf3ed69c92cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Erik=20Pedersen?= Date: Sat, 18 May 2019 08:38:58 +0200 Subject: hugolib: Prevent parallel server rebuilds There have been reports about infrequent paginator crashes when running the Hugo server since 0.55.0. The reason have been narrowed down to that of parallel rebuilds. This isn't a new thing, but the changes in 0.55.0 made it extra important to serialize the page initialization. This commit fixes that by protecting the `Build` method with a lock when running in server mode. Fixes #5885 Fixes #5968 --- hugolib/hugo_sites.go | 3 +++ hugolib/hugo_sites_build.go | 6 ++++++ 2 files changed, 9 insertions(+) diff --git a/hugolib/hugo_sites.go b/hugolib/hugo_sites.go index 6f95dbb12..5be4ec02b 100644 --- a/hugolib/hugo_sites.go +++ b/hugolib/hugo_sites.go @@ -62,6 +62,9 @@ type HugoSites struct { // If this is running in the dev server. running bool + // Serializes rebuilds when server is running. + runningMu sync.Mutex + // Render output formats for all sites. renderFormats output.Formats diff --git a/hugolib/hugo_sites_build.go b/hugolib/hugo_sites_build.go index d748a0169..7f725def2 100644 --- a/hugolib/hugo_sites_build.go +++ b/hugolib/hugo_sites_build.go @@ -31,6 +31,12 @@ import ( // Build builds all sites. If filesystem events are provided, // this is considered to be a potential partial rebuild. func (h *HugoSites) Build(config BuildCfg, events ...fsnotify.Event) error { + if h.running { + // Make sure we don't trigger rebuilds in parallel. + h.runningMu.Lock() + defer h.runningMu.Unlock() + } + ctx, task := trace.NewTask(context.Background(), "Build") defer task.End() -- cgit v1.2.3 From 8a1873a2d54281c78fd0c6b1f42d1297fec1e5f1 Mon Sep 17 00:00:00 2001 From: hugoreleaser Date: Sat, 18 May 2019 07:39:23 +0000 Subject: releaser: Add release notes draft for 0.55.6 Rename to *-ready.md to continue. [ci skip] --- temp/0.55.6-relnotes.md | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 temp/0.55.6-relnotes.md diff --git a/temp/0.55.6-relnotes.md b/temp/0.55.6-relnotes.md new file mode 100644 index 000000000..05efa78f2 --- /dev/null +++ b/temp/0.55.6-relnotes.md @@ -0,0 +1,23 @@ + + +This is a bug-fix release with one important fix. + + +Hugo now has: + +* 35148+ [stars](https://github.com/gohugoio/hugo/stargazers) +* 439+ [contributors](https://github.com/gohugoio/hugo/graphs/contributors) +* 317+ [themes](http://themes.gohugo.io/) + +## Enhancements + +### Core + +* Prevent parallel server rebuilds [95ce2a40](https://github.com/gohugoio/hugo/commit/95ce2a40e734bb82b69f9a64270faf3ed69c92cc) [@bep](https://github.com/bep) [#5885](https://github.com/gohugoio/hugo/issues/5885)[#5968](https://github.com/gohugoio/hugo/issues/5968) + +## Fixes + + + + + -- cgit v1.2.3 From 9b48c5d6bd56741dac714324a6ae59f6374bccdc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Erik=20Pedersen?= Date: Sat, 18 May 2019 09:49:46 +0200 Subject: Release 0.55.6 --- temp/0.55.5-relnotes-ready.md | 45 ------------------------------------------- temp/0.55.6-relnotes-ready.md | 2 ++ temp/0.55.6-relnotes.md | 23 ---------------------- 3 files changed, 2 insertions(+), 68 deletions(-) delete mode 100644 temp/0.55.5-relnotes-ready.md create mode 100644 temp/0.55.6-relnotes-ready.md delete mode 100644 temp/0.55.6-relnotes.md diff --git a/temp/0.55.5-relnotes-ready.md b/temp/0.55.5-relnotes-ready.md deleted file mode 100644 index 629c21e50..000000000 --- a/temp/0.55.5-relnotes-ready.md +++ /dev/null @@ -1,45 +0,0 @@ - - -This is a bug-fix release with a couple of important fixes. - - -Hugo now has: - -* 34743+ [stars](https://github.com/gohugoio/hugo/stargazers) -* 439+ [contributors](https://github.com/gohugoio/hugo/graphs/contributors) -* 314+ [themes](http://themes.gohugo.io/) - -## Enhancements - -### Templates - -* Provide more detailed errors in Where [f76e5011](https://github.com/gohugoio/hugo/commit/f76e50118b8b5dd8989d068db35222bfa0a242d8) [@moorereason](https://github.com/moorereason) - -### Other - -* Regenerate docs helper [cee181c3](https://github.com/gohugoio/hugo/commit/cee181c3a67fe04b8e0c9f2807c5aa2871df474e) [@bep](https://github.com/bep) -* Update blackfriday to v1.5.2 [1cbb501b](https://github.com/gohugoio/hugo/commit/1cbb501be8aa83b08865fbb6ad5aee254946712f) [@dbirks](https://github.com/dbirks) - -## Fixes - -### Templates - -* Fix nil compare in eq/ne for interface values [66b143a0](https://github.com/gohugoio/hugo/commit/66b143a01d1c192619839b732ce188923ab15d60) [@bep](https://github.com/bep) [#5905](https://github.com/gohugoio/hugo/issues/5905) -* Fix hugo package name and add godocs [4f93f8c6](https://github.com/gohugoio/hugo/commit/4f93f8c670b26258dc7e3a613c38dbc86d8eda76) [@moorereason](https://github.com/moorereason) - -### Output - -* Fix permalink in sitemap etc. when multiple permalinkable output formats [6b76841b](https://github.com/gohugoio/hugo/commit/6b76841b052b97625b8995f326d758b89f5c2349) [@bep](https://github.com/bep) [#5910](https://github.com/gohugoio/hugo/issues/5910) - -### Core - -* Fix PrevInSection/NextInSection for nested sections [bcbed4eb](https://github.com/gohugoio/hugo/commit/bcbed4ebdaf55b67abc521d69bba456c041a7e7d) [@bep](https://github.com/bep) [#5883](https://github.com/gohugoio/hugo/issues/5883) - -### Other - -* Fix concurrent initialization order [009076e5](https://github.com/gohugoio/hugo/commit/009076e5ee88fc46c95a9afd34f82f9386aa282a) [@bep](https://github.com/bep) [#5901](https://github.com/gohugoio/hugo/issues/5901) - - - - - diff --git a/temp/0.55.6-relnotes-ready.md b/temp/0.55.6-relnotes-ready.md new file mode 100644 index 000000000..d300adeb7 --- /dev/null +++ b/temp/0.55.6-relnotes-ready.md @@ -0,0 +1,2 @@ +This is a bug-fix release with one important fix. There have been reports about infrequent paginator crashes when running the Hugo server since 0.55.0. The reason have been narrowed down to that of parallel rebuilds. This isn't a new thing, but the changes in 0.55.0 made it extra important to serialize the page initialization. This release fixes that by protecting the `Build` method with a lock when running in server mode. [95ce2a40](https://github.com/gohugoio/hugo/commit/95ce2a40e734bb82b69f9a64270faf3ed69c92cc) [@bep](https://github.com/bep) [#5885](https://github.com/gohugoio/hugo/issues/5885)[#5968](https://github.com/gohugoio/hugo/issues/5968) + diff --git a/temp/0.55.6-relnotes.md b/temp/0.55.6-relnotes.md deleted file mode 100644 index 05efa78f2..000000000 --- a/temp/0.55.6-relnotes.md +++ /dev/null @@ -1,23 +0,0 @@ - - -This is a bug-fix release with one important fix. - - -Hugo now has: - -* 35148+ [stars](https://github.com/gohugoio/hugo/stargazers) -* 439+ [contributors](https://github.com/gohugoio/hugo/graphs/contributors) -* 317+ [themes](http://themes.gohugo.io/) - -## Enhancements - -### Core - -* Prevent parallel server rebuilds [95ce2a40](https://github.com/gohugoio/hugo/commit/95ce2a40e734bb82b69f9a64270faf3ed69c92cc) [@bep](https://github.com/bep) [#5885](https://github.com/gohugoio/hugo/issues/5885)[#5968](https://github.com/gohugoio/hugo/issues/5968) - -## Fixes - - - - - -- cgit v1.2.3 From 32f4b38338a391d9cbd10d1a8f19635b84bde45c Mon Sep 17 00:00:00 2001 From: hugoreleaser Date: Sat, 18 May 2019 07:55:28 +0000 Subject: releaser: Bump versions for release of 0.55.6 [ci skip] --- common/hugo/version_current.go | 2 +- snap/snapcraft.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/common/hugo/version_current.go b/common/hugo/version_current.go index 90c87fcd0..03a19aa26 100644 --- a/common/hugo/version_current.go +++ b/common/hugo/version_current.go @@ -17,6 +17,6 @@ package hugo // This should be the only one. var CurrentVersion = Version{ Number: 0.55, - PatchLevel: 5, + PatchLevel: 6, Suffix: "", } diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml index a391aa4a9..e76af1bd3 100644 --- a/snap/snapcraft.yaml +++ b/snap/snapcraft.yaml @@ -1,5 +1,5 @@ name: hugo -version: "0.55.5" +version: "0.55.6" summary: Fast and Flexible Static Site Generator description: | Hugo is a static HTML and CSS website generator written in Go. It is -- cgit v1.2.3 From a5d4c82d2f4932d4734427b83b9886253acc2d94 Mon Sep 17 00:00:00 2001 From: hugoreleaser Date: Sat, 18 May 2019 07:55:28 +0000 Subject: releaser: Add release notes to /docs for release of 0.55.6 [ci skip] --- docs/content/en/news/0.55.6-relnotes/index.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 docs/content/en/news/0.55.6-relnotes/index.md diff --git a/docs/content/en/news/0.55.6-relnotes/index.md b/docs/content/en/news/0.55.6-relnotes/index.md new file mode 100644 index 000000000..4be66d556 --- /dev/null +++ b/docs/content/en/news/0.55.6-relnotes/index.md @@ -0,0 +1,13 @@ + +--- +date: 2019-05-18 +title: "0.55.6" +description: "0.55.6" +categories: ["Releases"] +images: +- images/blog/hugo-bug-poster.png + +--- + + This is a bug-fix release with one important fix. There have been reports about infrequent paginator crashes when running the Hugo server since 0.55.0. The reason have been narrowed down to that of parallel rebuilds. This isn't a new thing, but the changes in 0.55.0 made it extra important to serialize the page initialization. This release fixes that by protecting the `Build` method with a lock when running in server mode. [95ce2a40](https://github.com/gohugoio/hugo/commit/95ce2a40e734bb82b69f9a64270faf3ed69c92cc) [@bep](https://github.com/bep) [#5885](https://github.com/gohugoio/hugo/issues/5885)[#5968](https://github.com/gohugoio/hugo/issues/5968) + -- cgit v1.2.3 From fa8e334dae46dfe71e1f6365d8054d085515c4c5 Mon Sep 17 00:00:00 2001 From: hugoreleaser Date: Sat, 18 May 2019 07:57:50 +0000 Subject: releaser: Prepare repository for 0.56.0-DEV [ci skip] --- common/hugo/version_current.go | 6 +++--- snap/snapcraft.yaml | 4 ++-- temp/0.55.6-relnotes-ready.md | 2 -- 3 files changed, 5 insertions(+), 7 deletions(-) delete mode 100644 temp/0.55.6-relnotes-ready.md diff --git a/common/hugo/version_current.go b/common/hugo/version_current.go index 03a19aa26..d296efcc8 100644 --- a/common/hugo/version_current.go +++ b/common/hugo/version_current.go @@ -16,7 +16,7 @@ package hugo // CurrentVersion represents the current build version. // This should be the only one. var CurrentVersion = Version{ - Number: 0.55, - PatchLevel: 6, - Suffix: "", + Number: 0.56, + PatchLevel: 0, + Suffix: "-DEV", } diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml index e76af1bd3..237d61e68 100644 --- a/snap/snapcraft.yaml +++ b/snap/snapcraft.yaml @@ -1,12 +1,12 @@ name: hugo -version: "0.55.6" +version: "0.56.0-DEV" summary: Fast and Flexible Static Site Generator description: | Hugo is a static HTML and CSS website generator written in Go. It is optimized for speed, easy use and configurability. Hugo takes a directory with content and templates and renders them into a full HTML website. confinement: strict -grade: stable # "devel" or "stable" +grade: devel # "devel" or "stable" apps: hugo: diff --git a/temp/0.55.6-relnotes-ready.md b/temp/0.55.6-relnotes-ready.md deleted file mode 100644 index d300adeb7..000000000 --- a/temp/0.55.6-relnotes-ready.md +++ /dev/null @@ -1,2 +0,0 @@ -This is a bug-fix release with one important fix. There have been reports about infrequent paginator crashes when running the Hugo server since 0.55.0. The reason have been narrowed down to that of parallel rebuilds. This isn't a new thing, but the changes in 0.55.0 made it extra important to serialize the page initialization. This release fixes that by protecting the `Build` method with a lock when running in server mode. [95ce2a40](https://github.com/gohugoio/hugo/commit/95ce2a40e734bb82b69f9a64270faf3ed69c92cc) [@bep](https://github.com/bep) [#5885](https://github.com/gohugoio/hugo/issues/5885)[#5968](https://github.com/gohugoio/hugo/issues/5968) - -- cgit v1.2.3