Skip to content

[full-ci] thumbnails: add libvips based thumbnail generator - #10310

Merged
rhafer merged 11 commits into
owncloud:masterfrom
rhafer:vips-thumbnailer
Oct 17, 2024
Merged

rhafer merged 11 commits into
owncloud:masterfrom
rhafer:vips-thumbnailer

Conversation

@rhafer

@rhafer rhafer commented Oct 15, 2024 •

Copy link
Copy Markdown
Contributor

Needs: owncloud-ci/golang#149

To improve performance (and to be able to support a wider range of images formats in the future)
the thumbnails service is now able to utilize libvips (https://www.libvips.org/) for generating thumbnails.
Enabling the use of libvips is implemented as a build-time option which is currently disabled for the
"bare-metal" build of the ocis binary and enabled for the docker image builds.

See README change for more details.

@rhafer rhafer self-assigned this Oct 15, 2024
@update-docs

update-docs Bot commented Oct 15, 2024

Copy link
Copy Markdown

Thanks for opening this pull request! The maintainers of this repository would appreciate it if you would create a changelog item based on your changes.

@rhafer
rhafer force-pushed the vips-thumbnailer branch 4 times, most recently from 65a94cc to 52ea02a Compare October 16, 2024 09:13
Comment thread services/thumbnails/README.md Resolved
@rhafer
rhafer force-pushed the vips-thumbnailer branch 2 times, most recently from 26ff408 to 87b2b13 Compare October 16, 2024 13:16
Comment thread services/thumbnails/README.md Resolved
Comment thread services/thumbnails/README.md Resolved
Comment thread services/thumbnails/README.md Resolved

@butonic butonic left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

works nicely!

@rhafer

rhafer commented Oct 16, 2024 •

Copy link
Copy Markdown
Contributor Author

The acceptance test are currently still using the native go thumbnailer. We might want to change that to test the libvips variant instead in a future PR

@rhafer
rhafer marked this pull request as ready for review October 16, 2024 16:02
@micbar

micbar commented Oct 16, 2024 •

Copy link
Copy Markdown
Contributor

I just compiled ocis on Mac (Intel)

Steps

brew install vips pkg-config
export PKG_CONFIG_PATH="/usr/local/opt/libffi/lib/pkgconfig"

Add -tags enable_vips to the go tool arguments of the debugger.

Then it compiles sucessfully and the thumbnails are generated.

First impression: 🚀

@micbar micbar left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome! Tested it locally. I see no regressions. 🚀

@v-scharf

Copy link
Copy Markdown
Contributor

I just compiled ocis on Mac (Intel)

checked on mac (m1) - works fine 👍

@rhafer

rhafer commented Oct 17, 2024

Copy link
Copy Markdown
Contributor Author

I just found an issue with rendering thumbnails for txt files. 🤦‍♂️ . Working on it ...

@v-scharf

Copy link
Copy Markdown
Contributor

I tried to run e2e test which checks thumbnail and preview.
for many preview requests we get 500 error

image

How to run: BASE_URL_OCIS=localhost:9200 HEADLESS=false RETRY=0 pnpm test:e2e:cucumber tests/e2e/cucumber/features/shares/share.feature:79

to enable e2e test in CI please rebase (e2e tests were disabled) #10325

Processor is now part of the generator. This should make it possible
to implement thumbnail generators that do not depend on the 'imaging'
module.
Move code using the 'kovidgoyal/imaging' package to separate files
to make it easier to create alternative implementations based on build
tags.
Can be enabled by setting the 'enable_vips' tag on 'go build'
rhafer and others added 7 commits October 17, 2024 12:23
To build with libvips support use 'make -C ocis build ENABLE_VIPS=true'
As libvips is not available as a static library we can no longer
create a statically linked ocis binary for the docker images when
libvips is enabled.
We also need to make sure that the base images used for building
ocis needs to match the image where ocis is installed when creating
a shared binary.
Signed-off-by: Jörn Friedrich Dreyer <[email protected]>
For GeoGebra files we where still using the imaging package to decode the
embedded png, but handed it of to vips for scaling, which can't work. Now
we use vips for decoding the image as well.
@rhafer rhafer changed the title thumbnails: add libvips based thumbnail generator [full-ci] thumbnails: add libvips based thumbnail generator Oct 17, 2024
@sonarqubecloud

Copy link
Copy Markdown

@rhafer

rhafer commented Oct 17, 2024

Copy link
Copy Markdown
Contributor Author

I tried to run e2e test which checks thumbnail and preview.
....
to enable e2e test in CI please rebase (e2e tests were disabled) #10325

@ScharfViktor Ok. I rebased. e2e test seem to have succeeded now.

@rhafer
rhafer merged commit e43a858 into owncloud:master Oct 17, 2024
@rhafer
rhafer deleted the vips-thumbnailer branch October 17, 2024 12:05
@micbar micbar mentioned this pull request Oct 21, 2024
18 tasks done
@prohtex

prohtex commented Oct 28, 2024

Copy link
Copy Markdown

I just compiled ocis on Mac (Intel)

Steps

brew install vips pkg-config
export PKG_CONFIG_PATH="/usr/local/opt/libffi/lib/pkgconfig"

Add -tags enable_vips to the go tool arguments of the debugger.

Then it compiles sucessfully and the thumbnails are generated.

First impression: 🚀

I have VIPS installed with MacPorts. Hope to see support enabled in a future release so I can test without building from source.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants