Commit Graph

594 Commits

Author SHA1 Message Date
Kostiantyn
c4d183627d Bump github.com/go-sql-driver/mysql and golang.org/x/crypto to the latest versions (#1174)
Co-authored-by: Konstantin Koval
2025-02-22 21:11:43 +02:00
Googol Lee
06acd165f2 Bump golang from 1.23-bookworm to 1.24-bookworm, as well as gqlgen. (#1172)
* Bump golang from 1.23-bookworm to 1.24-bookworm

Bumps golang from 1.23-bookworm to 1.24-bookworm.

---
updated-dependencies:
- dependency-name: golang
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

* Update to use `go tool`, see https://go.dev/doc/go1.24#go-command.

* Update go.mod to go 1.24

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-02-17 18:45:30 +01:00
Kostiantyn
ba6a4ec07c Bump crypto and sys dependencies to new minor versions (#1170)
Co-authored-by: Konstantin Koval
2025-02-16 11:43:09 +02:00
Kostiantyn
d9627c2aef Bump x/image, x/text, and x/sync to their latest minor versions (#1167)
Co-authored-by: Konstantin Koval
2025-02-13 14:45:02 +02:00
Andreas
6d716a1f1e improved Thumbnail generation performance (#1158)
* improved Thumbnail generation performance

* unified SQL query style

* adjusted query

* changed query to make it more readable
2025-02-02 21:43:12 +02:00
Kostiantyn
b93d48f94e Bump gqlgen and gqlparser to the latest versions (#1166)
Co-authored-by: Konstantin Koval
2025-02-02 20:51:17 +02:00
Kostiantyn
bdb2aef669 Bump gqlgen, copy, crypto, mint, sys deps to the latest versions in API (#1156)
Co-authored-by: Konstantin Koval
2025-01-19 21:53:50 +02:00
Googol Lee
e045e0f7ae Fix sqlite fk configuration and enable all tests for sqlite. Enable detail SQL log in tests (#1151)
* Fix sqlite fk configuration and enable all tests for sqlite.

* Add default severity to golangci-lint config.
2025-01-02 23:02:19 +01:00
Kostiantyn
33ef0981d7 Bump gqlparser to the latest minor version (#1149)
Co-authored-by: Konstantin Koval
2025-01-02 18:31:24 +02:00
Kostiantyn
9835c1949d Bump gqlgen in API to the latest version and regenerate the code (#1147)
Co-authored-by: Konstantin Koval
2024-12-30 17:17:06 +02:00
Googol Lee
f88fcaba69 Use libmagic to identify files type. (#1124)
* Use libmagic to identify file types.

* Fix mime array for database querying.

* go mod tidy

* Fix typo

* Another fix for the scheduled image build workflow for tag case (#1137)

* Try to fix the incorrect tag processing

* more debug code

* try with context=git

* hopefully, final debug

* the final commit with no debug code

---------

Co-authored-by: Konstantin Koval

* Add benchmark.

* rollback workflows.

* Fix AI comments.

* Build image.

* Fix AI comments.

* Fix AI comments.

* Rollback build workflow.

---------

Co-authored-by: Kostiantyn <32730812+kkovaletp@users.noreply.github.com>
2024-12-14 22:07:03 +01:00
Kostiantyn
f1d4d0a048 Bump crypto, go-ffprobe, and sqlite GO dependencies in /api (#1140)
Updated dependencies for improved performance and security:
- golang.org/x/crypto to version v0.31.0
- gopkg.in/vansante/go-ffprobe.v2 to version v2.2.1
- gorm.io/driver/sqlite to version v1.5.7

Co-authored-by: Konstantin Koval
2024-12-14 20:56:44 +02:00
Kostiantyn
3c53ccc304 Bump several API dependencies to the latest versions (#1138)
* Bump several API dependencies to the latest versions

Bump github.com/stretchr/testify from 1.9.0 to 1.10.0 in /api
Bump github.com/vektah/gqlparser/v2 from 2.5.19 to 2.5.20 in /api
Bump gorm.io/driver/postgres from 1.5.10 to 1.5.11 in /api
Bump golang.org/x/image from 0.22.0 to 0.23.0 in /api
Bump golang.org/x/crypto from 0.29.0 to 0.30.0 in /api
Bump github.com/99designs/gqlgen from 0.17.56 to 0.17.57 in /api

* Regenerate GraphQL code

---------

Co-authored-by: Konstantin Koval
2024-12-06 16:20:48 +02:00
Googol Lee
f1b523a27e Include a group of small but real media files for testing. (#1131)
* Move scanner/test_data/* to a stand-alone directory.

* Include real medias.

* Rename testdata to test_data

* Rename test_data/scanner -> test_data/library

* Clean tests to avoid depneding env.

* Rename: scanner/test_data -> scanner/test_media

* Rename: test_data/bin -> test_data/mock_bin

* Fix paths in tests.
2024-11-23 09:02:11 +01:00
Kostiantyn
dde45c29b9 Bump gorm.io/driver/postgres from 1.5.9 to 1.5.10 in /api (#1135)
Co-authored-by: Konstantin Koval
2024-11-22 13:51:15 +02:00
Googol Lee
a9d7b774bd Add log package for better logging level. (#1130)
* Add log package. Update worker with new log package.

* Add init error to worker.

* Init workers when binary launching.

* Add tests to cover different errors.
2024-11-21 10:44:38 +01:00
Kostiantyn
0d69d5584e Refactor auth.go and media.go to remove deprecated dependencies (#1128)
* Refactor `auth.go` and `media.go` to remove deprecated dependencies

* Move the `text` dependency to direct ones in the `go.mod`

---------

Co-authored-by: Konstantin Koval
2024-11-20 21:55:14 +02:00
Googol Lee
772129dbeb Remove continue-on-error: true because it hides errors. (#1129)
* Add test for the workflow.

* Remove continue-on-error.

* Remove always failing test.

* Fix the hidden failure.

* Regenerated.
2024-11-19 19:03:19 +01:00
Kostiantyn
91bf79a86e Bump gqlgen and its indirect dependencies in API (#1123)
Co-authored-by: Konstantin Koval
2024-11-16 16:00:47 +02:00
Kostiantyn
3cf63e7e2b Bump gqlparser, crypto, image, and their deps to the latest versions (#1117)
Co-authored-by: Konstantin Koval
2024-11-09 19:02:43 +02:00
Kostiantyn
a0a2380f90 Remove deprecated convert and add required -auto-orient flags (#1118)
Co-authored-by: Konstantin Koval
2024-11-09 18:49:53 +02:00
Googol Lee
7b69f247d3 Fix gqlgen (#1105) 2024-11-02 17:05:29 +01:00
Googol Lee
84c642ca79 Fix gqlgen code (#1099) 2024-10-23 20:40:14 +02:00
Googol Lee
c151bdee96 Process jpgs if raw processing is disabled. (#1096) 2024-10-20 16:52:47 +02:00
Kostiantyn
7e3f76aba8 Bump github.com/vektah/gqlparser/v2 from 2.5.17 to 2.5.18 in /api (#1100)
Co-authored-by: Konstantin Koval <kkb@ukr.net>
2024-10-17 18:12:28 +02:00
bzzim
2f13094d08 Fix wrap nil error (#1042)
* Fix wrap nil error

In this case ReadVideoStreamMetadata return nil, nil because: 

func Wrap(err error, message string) error {
	if err == nil {
		return nil
	}
	.....
}

* Update process_video_task.go
2024-10-14 14:16:58 +02:00
Googol Lee
4303b71311 Use hardware acceleration when converting videos. (#1056) 2024-10-11 22:27:56 +02:00
Kostiantyn
dd90d476ad Refactoring part 2.4: Long func refactoring in graphql/resolvers (#1076)
* Split long functions and optimize code

* Addressing comments

* Remove unnecessary input param

---------

Co-authored-by: Konstantin Koval
2024-10-11 12:31:49 +03:00
Kostiantyn
7e0c38b5b4 Bump github.com/99designs/gqlgen, golang.org/x/crypto, golang.org/x/image, golang.org/x/sys, golang.org/x/text (#1094)
Co-authored-by: Konstantin Koval <kkb@ukr.net>
2024-10-11 10:23:42 +02:00
Kostiantyn
69e595000d Refactoring part 2.11: Long func refactoring in server and utils (#1083)
* Split long functions and optimize code

* Addressing comments

---------

Co-authored-by: Konstantin Koval
2024-10-09 18:20:03 +03:00
Kostiantyn
83e441650b Split long functions and optimize code (#1082)
Co-authored-by: Konstantin Koval
2024-10-08 21:58:17 +03:00
Kostiantyn
5fc8feb75e Refactoring part 2.3: Long func refactoring in graphql/models (#1075)
* Split long functions and optimize code

* 2 more small files

---------

Co-authored-by: Konstantin Koval
2024-10-08 21:10:34 +03:00
Kostiantyn
f8b9590aa9 Refactoring part 2.1: Long func refactoring in database (#1073)
* Split long functions and optimize code

* Replace `errors.Wrap()` with the `fmt.Errorf()`; rename `process*()` functions to `parse*()`

---------

Co-authored-by: Konstantin Koval
2024-10-04 16:49:41 +03:00
Kostiantyn
57d5ac5235 Bump version (#1070)
Co-authored-by: Konstantin Koval <kkb@ukr.net>
2024-10-01 16:11:02 +02:00
Kostiantyn
dee3a151e9 Update GitHub workflows with various improvements (#1028)
Updated DB images in tests to align with the PROD setup
Try to upload coverage only if tests were executed (passed or failed) - not skipped or canceled
Added ESLint execution after UI tests with results exported to artifact
Shifted scheduled run time from 00 minutes according to GitHub recommendations, as the 00 minutes of each hour is the busiest time
Dynamically extract a list of langs from the repo to use them for CodeQL analysis instead of hardcoded ones
Updated versions of several outdated actions
Added the Autobuild step before CodeQL analysis for GO
Added the Anchore dependency scan job, reporting to the Security tab. I can add steps to manage PR comments with the results, but I need a token to be provided by @viktorstrate
Added the Hadolint Dockerfile scan job, reporting to the Security tab. I can add steps to manage PR comments with the results, but I need a token to be provided by @viktorstrate
Implemented weekly rebuild of images for the latest commit in the master branch and the latest released tag. It will recreate images with the recent base image and 3rd-party dependencies even if there were no new pushes for a long time
Added the Dockle container analysis job to be run on master and tag and validate just pushed images, reporting to the Security tab
Added golangci-lint config to the /api folder, as a starting point and for local usage
Added 2 weekly jobs for Dependabot:
-- Maintain dependencies for GitHub Actions
-- Maintain dependencies for Dockerfile

---------

Co-authored-by: Konstantin Koval
2024-10-01 15:50:44 +03:00
Kostiantyn
d1193c5ca4 Refactoring part 1: Fix some annoying linter warnings in API code (#1064)
* names, constants of reusable strings, removed unneeded `if`, replaced deprecated imports

* more deprecated imports replaced

* What is this?))

* Fix a path and quote a var in Dockerfile

* Addressing review comments

---------

Co-authored-by: Konstantin Koval <kkb@ukr.net>
2024-09-30 14:45:02 +02:00
Kostiantyn
70a3944e21 Bump gqlgen (#1061)
Co-authored-by: Konstantin Koval <kkb@ukr.net>
2024-09-30 11:07:25 +02:00
Googol Lee
a1263feac4 Update gqlgen and fix the code. (#1055) 2024-09-17 17:00:03 +02:00
Googol Lee
340c181442 Use self-building dependencies and update the code with imagemagick. (#1053) 2024-09-17 15:02:23 +02:00
Kostiantyn
e8914e0890 new deps (#1048)
Co-authored-by: Konstantin Koval <kkb@ukr.net>
2024-09-12 22:17:01 +02:00
Googol Lee
a6cbfc76f3 Back to bookworm. (#1040) 2024-09-06 13:32:22 +02:00
Googol Lee
6e1e1d12ce Update to magick 7 in alpine. (#1035) 2024-09-02 22:12:00 +02:00
Googol Lee
ad13172a32 Switch to Debian testing and imagemagick. (#1021) 2024-08-29 10:30:06 +02:00
Jorilx
bef9e7c666 Add support for GIF images (#1024) 2024-08-20 22:41:30 +02:00
Kostiantyn
5438fbb3f4 Update crypto and image versions (#1015)
Co-authored-by: Konstantin Koval <kkb@ukr.net>
2024-08-11 20:02:24 +02:00
Googol Lee
cf1a66975d API server listens with the address of PHOTOVIEW_LISTEN_IP, #1010. (#1014)
Fix the listened host reference in the `main()` function
2024-08-09 17:32:07 +03:00
Kostiantyn
4d9ce30583 Bump 'crypto' and 'gorm' versions based on Dependabot PRs (#1008)
Co-authored-by: Konstantin Koval
2024-08-03 19:36:18 +03:00
Googol Lee
bdae9a67ce Add Set up Docker development environment in README.md (#997) 2024-07-23 21:56:30 +02:00
Googol Lee
0345bc1481 Update Set up development environment in README.md. (#995) 2024-07-16 23:10:38 +02:00
Googol Lee
eab10af4a3 Remove loading env from tests. (#988)
* Remove loading env from tests.

* Rollback the test workflow.
2024-07-03 21:28:36 +03:00