Monorepo for Tangled tangled.org

spindle/engine: store workflow logs in s3 #1216

open opened by jobala.tngl.sh targeting master from jobala.tngl.sh/tangled: upload-workflow-logs

Overview#

This pr implements the first part of this proposal and introduces one new environment variable

  • LogBucket, when set logs will be uploaded to the specified bucket.
Labels

None yet.

assignee

None yet.

Participants 3
AT URI
at://did:plc:qcqdzn5ohjxyp2ilrunon6kn/sh.tangled.repo.pull/3mhq5g7a6ra22
-1
Interdiff #7 β†’ #8
go.mod

This file has not been changed.

go.sum

This file has not been changed.

nix/gomod2nix.toml

This file has not been changed.

nix/modules/spindle.nix

This file has not been changed.

-1
nix/vm.nix
··· 166 166 167 167 # TODO: separate spindle user 168 168 }; 169 - 170 169 systemd.services = let 171 170 mkDataSyncScripts = source: target: { 172 171 enableStrictShellChecks = true;
spindle/config/config.go

This file has not been changed.

spindle/engine/engine.go

This file has not been changed.

spindle/engine/s3.go

This file has not been changed.

History

10 rounds 3 comments
sign up or login to add to the discussion
2 commits
expand
spindle/engine: store workflow logs in s3
spindle/engine: read secrets from environment file
no conflicts, ready to merge
expand 0 comments
10 commits
expand
spindle/engine: store workflow logs in s3
spindle/engine: read secrets from environment file
nix,knotmirror: listen & sync local knots from local knotmirror
lexicons: sync.requestCrawl and knot.subscribeRepos
nix,knotserver,knotmirror/xrpc: sync.requestCrawl support
ogre: rename appview/ogcard to ogre
ogre: request jpeg from avatar service
nix,knotmirror: listen & sync local knots from local knotmirror
nix,knotmirror: listen & sync local knots from local knotmirror
spindle/engine: remove unrelated changes
expand 0 comments
12 commits
expand
spindle/engine: store workflow logs in s3
spindle/engine: read secrets from environment file
nix,knotmirror: listen & sync local knots from local knotmirror
lexicons: sync.requestCrawl and knot.subscribeRepos
nix,knotserver,knotmirror/xrpc: sync.requestCrawl support
ogre: rename appview/ogcard to ogre
ogre: request jpeg from avatar service
nix,knotmirror: listen & sync local knots from local knotmirror
nix,knotmirror: listen & sync local knots from local knotmirror
spindle/engine: remove unrelated changes
spindle/engine: add overwritten changes
spindle/engine: fix typo
expand 0 comments
11 commits
expand
spindle/engine: store workflow logs in s3
spindle/engine: read secrets from environment file
nix,knotmirror: listen & sync local knots from local knotmirror
lexicons: sync.requestCrawl and knot.subscribeRepos
nix,knotserver,knotmirror/xrpc: sync.requestCrawl support
ogre: rename appview/ogcard to ogre
ogre: request jpeg from avatar service
nix,knotmirror: listen & sync local knots from local knotmirror
nix,knotmirror: listen & sync local knots from local knotmirror
spindle/engine: remove unrelated changes
spindle/engine: add overwritten changes
expand 0 comments
10 commits
expand
spindle/engine: store workflow logs in s3
spindle/engine: read secrets from environment file
nix,knotmirror: listen & sync local knots from local knotmirror
lexicons: sync.requestCrawl and knot.subscribeRepos
nix,knotserver,knotmirror/xrpc: sync.requestCrawl support
ogre: rename appview/ogcard to ogre
ogre: request jpeg from avatar service
nix,knotmirror: listen & sync local knots from local knotmirror
nix,knotmirror: listen & sync local knots from local knotmirror
spindle/engine: remove unrelated changes
expand 0 comments
9 commits
expand
spindle/engine: store workflow logs in s3
spindle/engine: read secrets from environment file
nix,knotmirror: listen & sync local knots from local knotmirror
lexicons: sync.requestCrawl and knot.subscribeRepos
nix,knotserver,knotmirror/xrpc: sync.requestCrawl support
ogre: rename appview/ogcard to ogre
ogre: request jpeg from avatar service
nix,knotmirror: listen & sync local knots from local knotmirror
nix,knotmirror: listen & sync local knots from local knotmirror
expand 0 comments
8 commits
expand
spindle/engine: store workflow logs in s3
spindle/engine: read secrets from environment file
nix,knotmirror: listen & sync local knots from local knotmirror
lexicons: sync.requestCrawl and knot.subscribeRepos
nix,knotserver,knotmirror/xrpc: sync.requestCrawl support
ogre: rename appview/ogcard to ogre
ogre: request jpeg from avatar service
nix,knotmirror: listen & sync local knots from local knotmirror
expand 0 comments
7 commits
expand
spindle/engine: store workflow logs in s3
spindle/engine: read secrets from environment file
nix,knotmirror: listen & sync local knots from local knotmirror
lexicons: sync.requestCrawl and knot.subscribeRepos
nix,knotserver,knotmirror/xrpc: sync.requestCrawl support
ogre: rename appview/ogcard to ogre
ogre: request jpeg from avatar service
expand 1 comment

sorry, but you will need to rebase with master before submitting!

2 commits
expand
spindle/engine: store workflow logs in s3
spindle/engine: read secrets from environment file
expand 0 comments
1 commit
expand
spindle/engine: store workflow logs in s3
expand 2 comments

spindle/config/config.go:44-51 β€”Β this will result in SPINDLE_S3_LOG_BUCKET, but nix/modules/spindle.nix:147 we reference SPINDLE_NIXERY_PIPELINES_LOG_BUCKET here.

spindle/engine/engine.go:60 β€” probably good to parameterize the bucket name from config as well!

spindle/engine/s3.go:20 β€”Β Go convention is camel case, so BaseS3Path is preferred here.

spindle/engine/s3.go:38 β€”Β also camel case here please: s3Key

spindle/engine/engine.go:154 β€”Β this is a no-op with just a single argument.

nix/modules/spindle.nix:148-150 β€”Β we should ideally use EnvironmentFile here. Refer to how secrets are passed through to the appview service, for example.

High level design concern: NewS3 creates a new S3 client for each workflow (on every defer). We should ideally initialize this upon spindle startup and passed through via the engine struct.

We should ideally initialize this upon spindle startup and passed through via the engine struct.

Doing this means that each engine will have to register a clean up task for uploading logs which is easy to forget. Doing it in spindle/engine means that new engines don't have to worry about how to upload logs.