WIP: convert GORM to sqlc, for jobs/tasks #104304

Closed
Sybren A. Stüvel wants to merge 27 commits from sqlc-task into main

When changing the target branch, be careful to rebase the branch in your fork to match. See documentation.
4 changed files with 9 additions and 4 deletions
Showing only changes of commit 95021ca702 - Show all commits

View File

@ -38,7 +38,7 @@ func findBlender() {
result, err := find_blender.Find(ctx) result, err := find_blender.Find(ctx)
switch { switch {
case errors.Is(err, fs.ErrNotExist), errors.Is(err, exec.ErrNotFound): case errors.Is(err, fs.ErrNotExist), errors.Is(err, exec.ErrNotFound):
log.Warn().Msg("Blender could not be found. " + helpMsg) log.Info().Msg("Blender could not be found. " + helpMsg)
case err != nil: case err != nil:
log.Warn().AnErr("cause", err).Msg("There was an error finding Blender on this system. " + helpMsg) log.Warn().AnErr("cause", err).Msg("There was an error finding Blender on this system. " + helpMsg)
default: default:

View File

@ -24,6 +24,7 @@ import (
"projects.blender.org/studio/flamenco/internal/worker" "projects.blender.org/studio/flamenco/internal/worker"
"projects.blender.org/studio/flamenco/internal/worker/cli_runner" "projects.blender.org/studio/flamenco/internal/worker/cli_runner"
"projects.blender.org/studio/flamenco/pkg/sysinfo" "projects.blender.org/studio/flamenco/pkg/sysinfo"
"projects.blender.org/studio/flamenco/pkg/website"
) )
var ( var (
@ -296,8 +297,10 @@ func upstreamBufferOrDie(client worker.FlamencoClient, timeService clock.Clock)
func logFatalManagerDiscoveryError(err error, discoverTimeout time.Duration) { func logFatalManagerDiscoveryError(err error, discoverTimeout time.Duration) {
if errors.Is(err, context.DeadlineExceeded) { if errors.Is(err, context.DeadlineExceeded) {
log.Fatal().Str("timeout", discoverTimeout.String()).Msg("could not discover Manager in time") log.Fatal().Stringer("timeout", discoverTimeout).
Msgf("could not discover Manager in time, see %s", website.CannotFindManagerHelpURL)
} else { } else {
log.Fatal().Err(err).Msg("auto-discovery error") log.Fatal().Err(err).
Msgf("auto-discovery error, see %s", website.CannotFindManagerHelpURL)
} }
} }

View File

@ -5,6 +5,7 @@ package website
const ( const (
DocVariablesURL = "https://flamenco.blender.org/usage/variables/blender/" DocVariablesURL = "https://flamenco.blender.org/usage/variables/blender/"
WorkerCredsUnknownHelpURL = "https://flamenco.blender.org/faq/#what-does-unknown-worker-is-trying-to-communicate-mean" WorkerCredsUnknownHelpURL = "https://flamenco.blender.org/faq/#what-does-unknown-worker-is-trying-to-communicate-mean"
CannotFindManagerHelpURL = "https://flamenco.blender.org/faq/#my-worker-cannot-find-my-manager-what-do-i-do"
BugReportURL = "https://flamenco.blender.org/get-involved" BugReportURL = "https://flamenco.blender.org/get-involved"
ShamanRequirementsURL = "https://flamenco.blender.org/usage/shared-storage/shaman/#requirements" ShamanRequirementsURL = "https://flamenco.blender.org/usage/shared-storage/shaman/#requirements"
WorkerConfigURL = "https://flamenco.blender.org/usage/worker-configuration/" WorkerConfigURL = "https://flamenco.blender.org/usage/worker-configuration/"

View File

@ -18,7 +18,8 @@ Then follow the steps below to get everything up & running.
Most of Flamenco is made in Go. Most of Flamenco is made in Go.
1. Install [Go 1.21 or newer](https://go.dev/). 1. Install [the latest Go release](https://go.dev/). If you want to know specifically which version in required, check the
[go.mod](https://projects.blender.org/studio/flamenco/src/branch/main/go.mod) file.
2. Optional: set the environment variable `GOPATH` to where you want Go to put its packages. Go will use `$HOME/go` by default. 2. Optional: set the environment variable `GOPATH` to where you want Go to put its packages. Go will use `$HOME/go` by default.
3. Ensure `$GOPATH/bin` is included in your `$PATH` environment variable. Run `go env GOPATH` if you're not sure what path to use. 3. Ensure `$GOPATH/bin` is included in your `$PATH` environment variable. Run `go env GOPATH` if you're not sure what path to use.