Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Owl more validation #583

Merged
merged 34 commits into from
Jul 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
eaad35f
Use NewRequiredError
sourishkrout May 19, 2024
6943ee9
Use graph to determine secret sensitivity
sourishkrout May 22, 2024
c0001e0
Account for unset env var
sourishkrout May 30, 2024
3846848
No changes, no record
sourishkrout May 30, 2024
bf231e9
Graph defines specs; not the parser
sourishkrout May 30, 2024
b035f8f
Include required in monitor
sourishkrout May 31, 2024
a7333a4
wip
sourishkrout May 31, 2024
8392c74
wip
sourishkrout May 31, 2024
cfa9c6e
move opSets passing to reducer runtime
sourishkrout Jun 1, 2024
87738d2
Colocate with query
sourishkrout Jun 1, 2024
f12d6b7
Keep runner v1 backwards compatible
sourishkrout Jun 3, 2024
84db22e
Spec definitions
sourishkrout Jun 4, 2024
af71e50
Reorg tests
sourishkrout Jun 4, 2024
c5e1681
Call complex specs Complex for clarity
sourishkrout Jun 25, 2024
7f297bf
wip
sourishkrout Jun 25, 2024
9339cb1
Rebase
sourishkrout Jul 11, 2024
db872e9
Restore test
sourishkrout Jul 11, 2024
9a9d612
Validation errors integral to graph
sourishkrout Jul 12, 2024
c7dfb6e
Remove cruft
sourishkrout Jul 12, 2024
a50050e
Include version info in kernel startup logging
sourishkrout Jul 12, 2024
ebd175d
Don't trace query
sourishkrout Jul 12, 2024
430bbec
Rename and expand errors
sourishkrout Jul 15, 2024
a86f6e9
Require hostname or IP
sourishkrout Jul 15, 2024
2638bb5
Add complex item
sourishkrout Jul 15, 2024
20411c8
Required vs optional
sourishkrout Jul 15, 2024
dfdc44a
Don't allocate mem
sourishkrout Jul 15, 2024
da800c0
Omit status if empty
sourishkrout Jul 16, 2024
236d16b
ExecInfo prototype
sourishkrout Jul 16, 2024
254cfe2
Descriptive names
sourishkrout Jul 17, 2024
1830183
Small refactor
sourishkrout Jul 17, 2024
1ef68d7
Shorten
sourishkrout Jul 17, 2024
7e3734e
Add Database URL validation
sourishkrout Jul 17, 2024
2baf7f8
Allow PascalCase
sourishkrout Jul 17, 2024
31d3cfb
Optionally replace for local dev
sourishkrout Jul 17, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ repos:
hooks:
- id: typos
args: ["--diff", "--force-exclude"]
exclude: "^.vscode/|go.mod"
exclude: "^.vscode/|go.mod|_test.go"
- repo: local
hooks:
- id: go-mod-tidy
Expand Down
3 changes: 3 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ module github.com/stateful/runme/v3

go 1.22

// replace github.com/stateful/godotenv => ../godotenv

require (
buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go v1.34.2-20240717164558-a6c49f84cc0f.2
github.com/Masterminds/semver/v3 v3.2.1
Expand Down Expand Up @@ -36,6 +38,7 @@ require (
github.com/rwtodd/Go.Sed v0.0.0-20240405174034-bb8ed5da0fd0
github.com/stateful/godotenv v0.0.0-20240309032207-c7bc0b812915
github.com/vektah/gqlparser/v2 v2.5.16
github.com/xo/dburl v0.23.2
github.com/yuin/goldmark v1.7.4
go.uber.org/dig v1.17.1
go.uber.org/multierr v1.11.0
Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,8 @@ github.com/xanzy/ssh-agent v0.3.3 h1:+/15pJfg/RsTxqYcX6fHqOXZwwMP+2VyYWJeWM2qQFM
github.com/xanzy/ssh-agent v0.3.3/go.mod h1:6dzNDKs0J9rVPHPhaGCukekBHKqfl+L3KghI1Bc68Uw=
github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e h1:JVG44RsyaB9T2KIHavMF/ppJZNG9ZpyihvCd0w101no=
github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e/go.mod h1:RbqR21r5mrJuqunuUZ/Dhy/avygyECGrLceyNeo4LiM=
github.com/xo/dburl v0.23.2 h1:Fl88cvayrgE56JA/sqhNMLljCW/b7RmG1mMkKMZUFgA=
github.com/xo/dburl v0.23.2/go.mod h1:uazlaAQxj4gkshhfuuYyvwCBouOmNnG2aDxTCFZpmL4=
github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=
Expand Down
5 changes: 4 additions & 1 deletion internal/cmd/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import (
"github.com/stateful/runme/v3/internal/runner/client"
"github.com/stateful/runme/v3/internal/tui"
"github.com/stateful/runme/v3/internal/tui/prompt"
"github.com/stateful/runme/v3/internal/version"
runnerv1 "github.com/stateful/runme/v3/pkg/api/gen/proto/go/runme/runner/v1"
"github.com/stateful/runme/v3/pkg/document"
"github.com/stateful/runme/v3/pkg/document/identity"
Expand Down Expand Up @@ -187,7 +188,9 @@ func getLogger(devMode bool, aiLogs bool) (*zap.Logger, error) {
// Record the caller of the log message
newLogger = newLogger.WithOptions(zap.AddCaller())

newLogger.Info("Logger initialized", zap.Bool("devMode", devMode), zap.Bool("aiLogs", aiLogs), zap.String("aiLogFile", aiLogFile))
versionInfo := version.BaseVersionInfo()

newLogger.Info("Logger initialized", zap.String("versionInfo", versionInfo), zap.Bool("devMode", devMode), zap.Bool("aiLogs", aiLogs), zap.String("aiLogFile", aiLogFile))
return newLogger, nil
}

Expand Down
17 changes: 17 additions & 0 deletions internal/command/exec_info.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
package command

import "context"

type runnerContextKey struct{}

var ExecutionInfoKey = &runnerContextKey{}

type ExecutionInfo struct {
RunID string
KnownName string
KnownID string
}

func ContextWithExecutionInfo(ctx context.Context, execInfo *ExecutionInfo) context.Context {
return context.WithValue(ctx, ExecutionInfoKey, execInfo)
}
Loading