Commit Graph

1337 Commits

Author SHA1 Message Date
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
Googol Lee
6b33e88258 Add build deps of openh264. (#1126) 2024-11-18 15:24:34 +01:00
Googol Lee
07d24b942e Fix imagemagick doesn't have any dep when cross-compiling. (#1125) 2024-11-17 21:46:44 +01:00
Kostiantyn
9d7963151b Bump codecov-action in Tests workflow from 4 to 5 (#1121)
Co-authored-by: Konstantin Koval
2024-11-16 17:29:49 +02: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
535a3a744c Fix the config builder job for scheduled docker build workflow (#1120)
* try to fix by removing ''

* add source data for the debug

* Remove debug code

* Move the event logging before the `case`

---------

Co-authored-by: Konstantin Koval
2024-11-15 21:36:00 +02:00
Michał
21bf945aeb Capitalize Polish language label for consistency in language preferences (#1119) 2024-11-12 09:42:13 +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
Kostiantyn
7a59f3445f Fix scheduled docker build for the latest tagged commit (#1116)
* Try to fetch all history

* more debug output

* The final commit

---------

Co-authored-by: Konstantin Koval
2024-11-08 17:32:15 +02:00
Kostiantyn
0fb6636ead Switch all images to the new registry (#1109)
* Switch all images to the new registry

* Update compose files

* Update Readme

* Fix several merge issues.

---------

Co-authored-by: Konstantin Koval
2024-11-03 08:42:37 +02:00
Kostiantyn
0d5225e542 Push dependencies image to the new registry (#1108)
This is the 1st of 2 PRs to migrate to the new Docker registry, where we have more control over the images and are able to manage them.
The new registry is https://hub.docker.com/u/photoview

---------

Co-authored-by: Konstantin Koval 
Co-authored-by: viktorstrate <viktorstrate@gmail.com>
2024-11-02 18:52:46 +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
dependabot[bot]
1a861d9388 Bump anchore/scan-action from 4 to 5 in /.github/workflows (#1095)
Bumps [anchore/scan-action](https://github.com/anchore/scan-action) from 4 to 5.
- [Release notes](https://github.com/anchore/scan-action/releases)
- [Changelog](https://github.com/anchore/scan-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/anchore/scan-action/compare/v4...v5)

---
updated-dependencies:
- dependency-name: anchore/scan-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-10-14 21:12:00 +03: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
4fc9edbd78 Update dep (#1091)
* Update with new deps.

* Update with libheif, removing encoders.
2024-10-12 16:38:38 +02:00
Googol Lee
1165c47efb Cleanup deps. (#1090)
* Clean deps.

* Remove encoders for libheif.
2024-10-12 15:58:14 +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
87acd54291 Fix ESLint step in CI - part 2 (#1086)
* Run ESLint inside the testing container

* Switch to `docker exec` as the container is still alive after the testing

* Get back to `docker run`, as `exec` doesn't work for stopped containers

* Add missing ESLint plugin for React

* And 1 more missing plugin

* Add missing command to copy the report

* Set `$PHOTOVIEW_LISTEN_IP` to "0.0.0.0" as it has to accept connections from outside and from the healthcheck in localhost

---------

Co-authored-by: Konstantin Koval <kkb@ukr.net>
2024-10-04 11:56:17 +02:00
Kostiantyn
ff009a6ae6 Set $NODE_ENV according to the image purpose during Docker build (#1088)
* Set $NODE_ENV according to the image purpose during Docker build

* Move `husky` from dev-deps to prod-deps, as it is used during prod `npm ci`

---------

Co-authored-by: Konstantin Koval <kkb@ukr.net>
2024-10-04 11:20:49 +02:00
Kostiantyn
7057643b5d Fix ESLint step in UI testing job and add CodeCov tokens (#1084)
* Add missing script line back to the `package.json`

* Set CodeCov token for coverage upload steps

---------

Co-authored-by: Konstantin Koval <kkb@ukr.net>
2024-10-03 18:03:50 +02:00
Kostiantyn
bf765abde4 Fetch all tags during checkout (#1072)
Co-authored-by: Konstantin Koval <kkb@ukr.net>
2024-10-03 13:13:59 +02: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
Googol Lee
f861c97b49 Include all heif plugins in one so file. 2024-09-30 19:53:17 +02:00
Googol Lee
9547be075c Build libheif with all dependencies in one so file. 2024-09-30 17:16:09 +02: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
Googol Lee
4b678f201d Fix cache pushing problem. (#1052) 2024-09-13 16:11:29 +02:00
Googol Lee
4655684b49 Fix cache flag in dependencies workflow. (#1050) 2024-09-13 13:41:39 +02:00
Googol Lee
49ae7d17df Fix cache options. (#1049) 2024-09-13 11:44:30 +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
17b27d7e60 Add build workflow for workers. (#1047) 2024-09-12 19:09:03 +02:00
Amandus
8e602f8d2b docs: Add reminder to url encode postgres password env variable (#1041) 2024-09-06 17:49:48 +02:00
Googol Lee
0ffa7e05fa Bump to golang 1.23 (#1046) 2024-09-06 17:43:19 +02:00
Googol Lee
d91ce8ff42 Rollback uid/gid to 999. (#1044) 2024-09-06 15:34:32 +02:00
Googol Lee
a6cbfc76f3 Back to bookworm. (#1040) 2024-09-06 13:32:22 +02:00