* 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>
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
* 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
* 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.
* 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
* Split long functions and optimize code
* Replace `errors.Wrap()` with the `fmt.Errorf()`; rename `process*()` functions to `parse*()`
---------
Co-authored-by: Konstantin Koval
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
* 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>
Once you have more than a few paths assigned to a user, it becomes
quite hard to oversee the list.
Personally, I would add my albums to Photoview one by one, so I can
manage the processing better. For example, I can review and fix the face
recognition for one new album at a time, and I don't need to deal with
too much data.
Since I started to add the albums in a random order, it's relatively
hard to find which album is added and which is not.
An easy fix is to order the photo paths by their name.
- Extended the query of the rootAlbums to order them by path
* Validate incoming GPS data and throw an error if it is incorrect, storing Null values
* Extracted GPS data processing to function in external parser; optimized IF in internal parser; removed unnecessary comments; set exact values for positive test
* Add the migration for removing existing invalid GPS data and its test; added better errors to asserts in the GPS validation test
* Install FFmpeg and ExifTool on the API unit-test environment
* Fix 'stripped.jpg', 'IncorrectGPS.jpg', and 'CorrectGPS.jpg' tests for the external parser
* Optimized data validation in the external parser, returned error by the internal parser for invalid data, updated test to expect errors and handle them
* Switched from error to log entry in case of incorrect GPS data, as error handling is not so transparent in the internal parser
---------
Co-authored-by: Konstantin Koval
* Bump go version to 1.22. Bump all go module to the newest version, except pinning libheif@v1.15.1 to match the c lib version in Debian bookworm.
* Update go_wrapper.sh to fit golang image.
* Update the way to set go envs.
* Test against go 1.22
* Set default shell for all building stage in Dockerfile.