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

Repair LFS web rendering. #22195

Merged
merged 1 commit into from
Dec 21, 2022
Merged

Repair LFS web rendering. #22195

merged 1 commit into from
Dec 21, 2022

Conversation

kousu
Copy link
Contributor

@kousu kousu commented Dec 21, 2022

There was just a missing check.

Fixes #22193.

Fixup go-gitea#22042 (aka 1b32ed0).
Fixes go-gitea#22193.

Signed-off-by: Nick Guenther <nick.guenther@polymtl.ca>
@kousu
Copy link
Contributor Author

kousu commented Dec 21, 2022

I'm going to update the integration tests to check that LFS files actually render their contents.

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Dec 21, 2022
@GiteaBot GiteaBot added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels Dec 21, 2022
@GiteaBot GiteaBot added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Dec 21, 2022
@lunny lunny merged commit c4df10d into go-gitea:main Dec 21, 2022
@kousu kousu deleted the fix-render-lfs branch December 21, 2022 01:32
@kousu kousu mentioned this pull request Dec 21, 2022
kousu added a commit to neuropoly/gitea that referenced this pull request Dec 22, 2022
Follow up to go-gitea#22195:
that happened because there was no testing of how the UI
reacts to LFS files.

Until now Gitea has tested LFS via:

- the internal go API
- the external HTTP API
- the external git+http:// protocol
- the external git+ssh:// protocol

The first is small unit tests, and can create LFS structs in memory
as necessary. The latter all run `git lfs track *` and upload two random
binaries. ("code.gitea.io/gitea/tests/integration".lfsCommitAndPushTest)
In both cases, the LFS data are created by procedural code.

This is different: it adds declaractive LFS fixtures. That means a new
repo in gitea-repositories-meta/, a new folder for LFS objects in
gitea-lfs-meta/, and associated database entries in models/fixtures/.

Using this, it can easily add testing LFS via:

- the internal HTTP UI

Sources
-------

- lfs.git was hand-crafted using git commands, then `git push`ed into an
  empty bare repo.

Its contents:

- CONTRIBUTING.md (LFS object 7b6b2c88dba9f760a1a58469b67fee2b698ef7e9399c4ca4f34a14ccbe39f623)
  was hand-written.
- subdir/README.md (LFS object 9d172e5c64b4f0024b9901ec6afe9ea052f3c9b6ff9f4b07956d8c48c86fca82)
  was also hand-written.
- jpeg.jpg (LFS object 0b8d8b5f15046343fd32f451df93acc2bdd9e6373be478b968e4cad6b6647351)
  was copied from tests/gitea-repositories-meta/user2/repo1.wiki.git/
- crypt.bin (LFS object 2eccdb43825d2a49d99d542daa20075cff1d97d9d2349a8977efe9c03661737c)
  was generated with `dd if=/dev/urandom bs=1k count=2`
zjjhot added a commit to zjjhot/gitea that referenced this pull request Dec 23, 2022
* giteaoffical/main: (32 commits)
  Hide file borders on sticky diff box (go-gitea#22217)
  Test views of LFS files (go-gitea#22196)
  update docs latest to 1.17.4
  Frontport 1.17.4 changelog (go-gitea#22216)
  Remove test session cache to reduce possible concurrent problem (go-gitea#22199)
  Upgrade hugo to 0.82 (go-gitea#22209)
  Fix container layer display overflow (go-gitea#22208)
  Run hugo via `go run` and lock its version (go-gitea#22206)
  Update bleve and zapx to fix unaligned atomic (go-gitea#22031)
  Allow empty assignees on pull request edit (go-gitea#22150)
  Add Feed for Releases and Tags (go-gitea#21696)
  fix: update libcurl in docs pipeline (go-gitea#22203)
  Fixed colour transparency regex matching in project board sorting (go-gitea#22091) (go-gitea#22092)
  Mobile fix for Project view: Add delay to Sortable.js on mobile, to ensure scrolling is possible. (go-gitea#22152)
  Normalize NuGet package version on upload (go-gitea#22186)
  Attempt to fix TestExportUserGPGKeys (go-gitea#22159)
  Specify ID in `TestAPITeam` (go-gitea#22192)
  Repair LFS web rendering. (go-gitea#22195)
  Fix misc whitespace issues in install docs (go-gitea#22189)
  Update JS dependencies and eslint (go-gitea#22190)
  ...
@go-gitea go-gitea locked and limited conversation to collaborators May 3, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

LFS files no longer render
4 participants