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

Make bindata static build parse builtin templates correctly #24003

Merged
merged 1 commit into from Apr 8, 2023

Conversation

wxiaoguang
Copy link
Contributor

@wxiaoguang wxiaoguang commented Apr 8, 2023

Close #24002

Two problems before:

  1. The log.Fatal is missing after these wrapFatal calls, so the error is not shown to users.
  2. GetTemplateAssetNames has different behaviors for local files and builtin assets, for builtin assets, it also returns directories, so we need to check the extension again.

I have tested with TAGS="bindata sqlite sqlite_unlock_notify" make build && ./gitea , it works well now. Before, the server responds internal server error (because it doesn't complete the template parsing)

@GiteaBot GiteaBot added the lgtm/need 1 This PR needs approval from one additional maintainer to be merged. label Apr 8, 2023
@lunny lunny added type/bug skip-changelog This PR is irrelevant for the (next) changelog, for example bug fixes for unreleased features. labels Apr 8, 2023
@lunny
Copy link
Member

lunny commented Apr 8, 2023

As it's an emergency bug and I have tested locally. I will merge it with magic.

@lunny lunny merged commit 94fde46 into go-gitea:main Apr 8, 2023
0 of 2 checks passed
@wxiaoguang wxiaoguang deleted the fix-bindata-build branch April 8, 2023 13:58
@delvh delvh added this to the 1.20.0 milestone Apr 8, 2023
zjjhot added a commit to zjjhot/gitea that referenced this pull request Apr 10, 2023
* upstream/main: (39 commits)
  Fix protected branch for API (go-gitea#24013)
  [skip ci] Updated translations via Crowdin
  Fix markdownlint (go-gitea#24024)
  Introduce lint-md and compliance-docs pipeline (go-gitea#24021)
  Fix https setup doc zh-cn (go-gitea#24015)
  Replace tribute with text-expander-element for textarea (go-gitea#23985)
  Improve GetBoards and getDefaultBoard (go-gitea#22981)
  Expand/Collapse all changed files (go-gitea#23639)
  Show errors for KaTeX and mermaid on the preview tab (go-gitea#24009)
  Show protected branch rule names again (go-gitea#23907)
  Reference the `zh-CN` version of `reverse-proxies` in `https-support` (go-gitea#24016)
  Fix lint problem in `https-support.zh-cn.md` (go-gitea#24014)
  docs: HTTPS configuration for zh-cn (go-gitea#23039)
  Re-add initial wiki page text when editing the page (go-gitea#23984)
  [skip ci] Updated translations via Crowdin
  fix: do not escape space between PyPI repository url and package name… (go-gitea#23981)
  Make bindata static build parse builtin templates correctly (go-gitea#24003)
  Group template helper functions, remove `Printf`, improve template error messages (go-gitea#23982)
  Adjust sticky pr header to cover background (go-gitea#23956)
  Update github.com/google/go-github to v51 (go-gitea#23946)
  ...
@go-gitea go-gitea locked as resolved and limited conversation to collaborators Aug 1, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
lgtm/need 1 This PR needs approval from one additional maintainer to be merged. skip-changelog This PR is irrelevant for the (next) changelog, for example bug fixes for unreleased features. type/bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Current main branch has a regression bug with bindata build
4 participants