Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hugo v0.123.0 breaks downloads page #94

Open
phillxnet opened this issue May 15, 2024 · 9 comments
Open

Hugo v0.123.0 breaks downloads page #94

phillxnet opened this issue May 15, 2024 · 9 comments
Assignees
Labels
help wanted Extra attention is needed

Comments

@phillxnet
Copy link
Member

Our current PRODUCTION website was last built from as-yet unaltered master branch (with working downloads page), however we have recently seen issues with newer builds from master that contain only headers in our programmatically generated download page options:

downloads-page-broken

It is suspected that we have a back-end issue re Hugo version or insufficient Hugo plugins or the like. This issue is to document this failing, and it's fix, in case we run into this again.

@phillxnet phillxnet self-assigned this May 15, 2024
@phillxnet
Copy link
Member Author

phillxnet commented May 15, 2024

installed via:

sudo snap install --channel=extended/stable hugo

snap info

snap info hugo

name:      hugo
summary:   A fast and flexible static site generator
publisher: Hugo Authors
store-url: https://snapcraft.io/hugo
contact:   https://discourse.gohugo.io/
license:   Apache-2.0
description: |
  Hugo is a static site generator written in Go, optimized for speed and designed for
  flexibility. With its advanced templating system and fast asset pipelines, Hugo renders a
  complete site in seconds, often less.
  
  Due to its flexible framework, multilingual support, and powerful taxonomy system, Hugo is
  widely used to create:
  
  * Corporate, government, nonprofit, education, news, event, and project sites
  * Documentation sites
  * Image portfolios
  * Landing pages
  * Business, professional, and personal blogs
  * Resumes and CVs
  
  Use Hugo's embedded web server during development to instantly see changes to content,
  structure, behavior, and presentation. Then deploy the site to your host, or push changes to
  your Git provider for automated builds and deployment.
commands:
  - hugo
snap-id:      t6YzDBM3com27avINGL5OD6ZKKG654ez
tracking:     extended/stable
refresh-date: today at 11:32 BST
channels:
  latest/stable:      0.126.0 2024-05-14 (19599) 99MB -
  latest/candidate:   ↑                               
  latest/beta:        ↑                               
  latest/edge:        0.126.0 2024-05-15 (19619) 99MB -
  extended/stable:    0.126.0 2024-05-14 (19600) 99MB -
  extended/candidate: ↑                               
  extended/beta:      ↑                               
  extended/edge:      0.126.0 2024-05-14 (19602) 99MB -
installed:            0.126.0            (19600) 99MB -

@phillxnet
Copy link
Member Author

phillxnet commented May 15, 2024

We programatically construct our downloads page via:

Using the following variable defined in config.toml

downloads_os_order = ["leap15.4", "tumbleweed", "leap15.3", "diy", "rpm", "centos7.1511"]

# use lowercase version of frontmatter os
downloads_os_order = ["leap15.4", "tumbleweed", "leap15.3", "diy", "rpm", "centos7.1511"]

And the frontmatter we reference is in the content files themselves i.e.:

---
title: "Leap15 4_x86_64"
date: 2023-01-26T15:00:42+01:00
draft: false
icon: "fa-brands fa-linux"
download-base: "/"
os: "Leap15.4"
os_weight: 40
machine: "generic"
arch: "x86_64"
rpm_version: "4.5.8"
rpm_release: "0"
installer_patch: ""
---

@phillxnet
Copy link
Member Author

Our last working PRODUCTION Website build/publish (master branch) had the following Hugo version/output:

Start building sites … 
hugo v0.121.2-6d5b44305eaa9d0a157946492a6f319da38de154+extended linux/amd64 BuildDate=2024-01-05T12:21:15Z VendorInfo=snap:0.121.2
                   | EN  
-------------------+-----
  Pages            | 42  
  Paginator pages  |  0  
  Non-page files   |  5  
  Static files     | 18  
  Processed images |  4  
  Aliases          | 18  
  Sitemaps         |  1  
  Cleaned          |  0  

Dated 11th Jan

@phillxnet
Copy link
Member Author

phillxnet commented May 15, 2024

So we have a breaking change upstream between v0.121.2 and v0.126.0 !!

https://github.com/gohugoio/hugo/releases

Announced breaking changes back when re v0.123.0

@phillxnet
Copy link
Member Author

sudo snap install --channel=extended hugo

Our revert options are minimal:

snap list hugo --all
Name  Version  Rev    Tracking         Publisher     Notes
hugo  0.125.7  19552  extended/stable  hugo-authors  disabled
hugo  0.126.0  19600  extended/stable  hugo-authors  -

in that 0.125.7 also failed. And there appears to be no older versions on the snap store !!!

sudo snap install hugo --channel=0.121.2/extended/stable
Warning: Specifying a channel "0.121.2/extended/stable" is relying on undefined behaviour.
         Interpreting it as "0.121.2/extended/stable" for now, but this will be an error later.

error: invalid risk in channel name: 0.121.2/extended/stable

@phillxnet
Copy link
Member Author

phillxnet commented May 15, 2024

OBS hugo

https://build.opensuse.org/repositories/devel:languages:go

sudo zypper addrepo https://download.opensuse.org/repositories/devel:/languages:/go/15.5/ devel_languages_go

Oh good:

sudo zypper search -s hugo
Loading repository data...
Reading installed packages...

S | Name                 | Type       | Version             | Arch   | Repository
--+----------------------+------------+---------------------+--------+-------------------
  | hugo                 | package    | 0.126.1-lp155.156.1 | x86_64 | devel_languages_go
  | hugo                 | srcpackage | 0.126.1-lp155.156.1 | noarch | devel_languages_go
  | hugo-bash-completion | package    | 0.126.1-lp155.156.1 | noarch | devel_languages_go
  | hugo-debuginfo       | package    | 0.126.1-lp155.156.1 | x86_64 | devel_languages_go
  | hugo-zsh-completion  | package    | 0.126.1-lp155.156.1 | noarch | devel_languages_go

@phillxnet
Copy link
Member Author

phillxnet commented May 15, 2024

Establish last working version

Tested via:

hugo server -D

Required to use binaries without packaging as no known packaging system seems to hold older versions of Hugo for openSUSE!

binary from https://github.com/gohugoio/hugo/releases/download/ downloads page
v0.121.2/hugo_extended_0.121.2_linux-amd64.deb works
v0.122.0/hugo_extended_0.122.0_linux-amd64.tar.gz works
v0.123.0/hugo_extended_0.123.0_linux-amd64.tar.gz FAILS
v0.126.1/hugo_extended_0.126.1_linux-amd64.tar.gz FAILS

Last working v0.122.0

Start building sites … 
hugo v0.122.0-b9a03bd59d5f71a529acb3e33f995e0ef332b3aa+extended linux/amd64 BuildDate=2024-01-26T15:54:24Z VendorInfo=gohugoio


                   | EN  
-------------------+-----
  Pages            | 43  
  Paginator pages  |  0  
  Non-page files   |  5  
  Static files     | 18  
  Processed images |  4  
  Aliases          | 19  
  Sitemaps         |  1  
  Cleaned          |  0  

First FAILING

Start building sites … 
hugo v0.123.0-3c8a4713908e48e6523f058ca126710397aa4ed5+extended linux/amd64 BuildDate=2024-02-19T16:32:38Z VendorInfo=gohugoio


                   | EN  
-------------------+-----
  Pages            | 37  
  Paginator pages  |  0  
  Non-page files   |  5  
  Static files     | 18  
  Processed images |  4  
  Aliases          | 19  
  Cleaned          |  0  

@phillxnet
Copy link
Member Author

Debug build using 0.123.0

~/hugo/hugo --logLevel debug 
Start building sites … 
hugo v0.123.0-3c8a4713908e48e6523f058ca126710397aa4ed5+extended linux/amd64 BuildDate=2024-02-19T16:32:38Z VendorInfo=gohugoio

INFO  build:  step process substep collect files 56 files_total 56 duration 4.918458ms
INFO  build:  step process duration 5.016084ms
DEBUG Set expanded permalink path for page solutions/customizable-btrfs-nas-storage-platform.md to "/customizable-btrfs-nas-storage-platform"
DEBUG Set expanded permalink path for page solutions/linux-btrfs-nas-server.md to "/linux-btrfs-nas-server"
DEBUG Set expanded permalink path for page solutions/personal-cloud-btrfs-nas-server.md to "/personal-cloud-btrfs-nas-server"
DEBUG Set expanded permalink path for page solutions/smb-private-cloud-btrfs-nas-server.md to "/smb-private-cloud-btrfs-nas-server"
INFO  build:  step assemble duration 2.904075ms
INFO  static: syncing static files to / duration 22.522907ms
INFO  build:  step render substep pages site en outputFormat html duration 67.69676ms
INFO  build:  step render substep pages site en outputFormat rss duration 6.266176ms
INFO  build:  step render pages 38 content 48 duration 79.028941ms
INFO  build:  step postProcess duration 14.455µs
INFO  build:  duration 87.24248ms

                   | EN  
-------------------+-----
  Pages            | 36  
  Paginator pages  |  0  
  Non-page files   |  5  
  Static files     | 18  
  Processed images |  4  
  Aliases          | 19  
  Cleaned          |  0 

@phillxnet phillxnet changed the title Recent downloads page fails in new builds Hugo v0.123.0 breaks downloads page May 15, 2024
@phillxnet
Copy link
Member Author

Ideally here we have to transition our 'ways' to be compatible with latest Hugo. Required changes to accomplish this are the 'fix' for this issue. And as yet unclear.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant