gitea: Wiki template error with golang 1.14

  • Gitea version (or commit ref): 1.11.1
  • Git version: 2.24.1
  • Operating system: Docker Alpine 3.11
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No
    • Not relevant
  • Log gist:

Description

When building an image (not the official one) with golang:alpine (which, as of now, points to 1.14.0-alpine3.11), trying to view a wiki page result on a blank html page with this error from the template engine :

template: repo/wiki/view:48:14: executing "repo/wiki/view" at <(not $.DisableHTTP) (and (not $.DisableSSH) (or $.IsSigned $.ExposeAnonSSH))>: can't give argument to non-function not $.DisableHTTP

I did no try to rebuild the official image using golang 1.14, but it works fine if I build the same image with golang:1.13-alpine.

Also the issue was quite hard (for me) to track as there is no error in the logs even with all levels set to trace.

I think it might be related to #5697 and #4817

Screenshots

The wiki pages

gitea-issue-wiki1

After clicking on the page

gitea-issue-wiki2

P.S Note that the build layer of my image is nothing fancy :

  apk --no-cache add \
  build-base \
  git \
  nodejs \
  npm \
  && \
  git clone --single-branch --branch "v${GITEA_VERSION}" --depth 1 'https://github.com/go-gitea/gitea' && \
  cd gitea && \
  make clean build

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Reactions: 2
  • Comments: 16 (9 by maintainers)

Commits related to this issue

Most upvoted comments

So go 1.14 has an issue with preempting and that there’s likely another fix needed to prefix calls with GODEBUG=asyncpreemptoff=1

@guillep2k #11481 - this one is mine, I made it after #10583, and it got merged. This fixed the problem with the Wiki revision page.

However, the earlier #10583 which fixes #10552 (the problem with Wiki’s view page) was not merged into the 1.11 branch.

Any chance of this getting backported to 1.11? Some distributions (like FreeBSD) have switched to go 1.14 as a default, exposing this bug. Or what’s the timeline for a 1.12 release, which presumably would be compatible with go 1.14?

@guillep2k Thanks I’ll rebuild with go 1.13.

Edit: that worked. Thanks.