Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
172 commits
Select commit Hold shift + click to select a range
80df46d
ENG-00000 remove trim of nongraphic characters
vagarwal-viant Jul 10, 2025
41fc97d
fixed nil pointer
adranwit Aug 22, 2025
69bf4ff
fixed logger merge issue
adranwit Aug 22, 2025
ac2a99f
patched slicelen issue
adranwit Aug 22, 2025
4d4d704
patched logger nil
adranwit Aug 22, 2025
9939b7c
patched logger nil
adranwit Aug 22, 2025
c91f5c2
patched logger nil
adranwit Aug 22, 2025
c0e2ca2
added race condition safeguard
adranwit Aug 25, 2025
b8977da
added race condition safeguard
adranwit Aug 25, 2025
abfa80b
added race condition safeguard
adranwit Aug 26, 2025
3b2abc8
updated error handling
adranwit Aug 26, 2025
3f8777c
updated fs embeder handling
adranwit Aug 26, 2025
a7553f7
updated fs embeder handling
adranwit Aug 26, 2025
5a9614b
updated fs embeder handling
adranwit Aug 26, 2025
1325f81
updated fs embeder handling
adranwit Aug 26, 2025
09d33d3
updated fs embeder handling
adranwit Aug 26, 2025
8de645c
updated fs embeder handling
adranwit Aug 26, 2025
e6519be
updated fs embeder handling
adranwit Aug 26, 2025
3c91237
patched predicate racing
adranwit Aug 28, 2025
1ed2fee
updated limit
adranwit Aug 29, 2025
1d3e0a2
updated limit
adranwit Aug 29, 2025
17b3e45
patched limit
adranwit Aug 29, 2025
09ce111
updated ensureValidValue
pol-mfilipowicz-viant Sep 3, 2025
d51933a
updated error handling
adranwit Sep 5, 2025
fda8140
updated error handling
adranwit Sep 5, 2025
c0f5411
updated error handling
adranwit Sep 5, 2025
310295e
updated error handling
adranwit Sep 8, 2025
e95c4d7
updated error handling
adranwit Sep 8, 2025
c672e99
updated dep
adranwit Sep 15, 2025
9b734aa
updated deparemoved goccy josn
adranwit Sep 18, 2025
198248f
added retry on invalid connection
adranwit Sep 23, 2025
cf7d395
added retry on invalid connection
adranwit Sep 23, 2025
e7d7ab5
enhanced marhsller
adranwit Sep 24, 2025
148f00b
enhanced marhsller
adranwit Sep 24, 2025
16e573b
enhanced marhsller
adranwit Sep 24, 2025
6208351
enhanced marhsller
adranwit Sep 24, 2025
c540449
enhanced marhsller
adranwit Sep 24, 2025
a782238
enhanced marhsller
adranwit Sep 29, 2025
f8fcc28
expose marshallers, move queryselector to xdatly
adranwit Oct 7, 2025
f09ab1f
expose marshallers, move queryselector to xdatly
adranwit Oct 7, 2025
217831c
expose marshallers, move queryselector to xdatly
adranwit Oct 7, 2025
672e82b
added generic router
adranwit Oct 8, 2025
1a97134
added generic router
adranwit Oct 8, 2025
a0ec4c3
updated locator signature
adranwit Oct 8, 2025
9972471
allow large json objects in LoadData
vjc1234 Oct 9, 2025
ad9cc45
updated locator signature
adranwit Oct 9, 2025
d3e6e1f
Merge remote-tracking branch 'origin/master'
adranwit Oct 9, 2025
a5e5306
fixed concurrency issues in deferredMarshaller
vjc1234 Oct 12, 2025
fb16b2a
Merge remote-tracking branch 'origin/master'
vjc1234 Oct 12, 2025
71810a8
updated locator signature
adranwit Oct 15, 2025
a3813dc
Merge remote-tracking branch 'origin/master'
adranwit Oct 15, 2025
cca251d
enhanced mcp integration
adranwit Oct 20, 2025
520d4c3
enhanced mcp integration
adranwit Oct 20, 2025
fce13f3
enhanced mcp integration
adranwit Oct 20, 2025
120a696
enhanced mcp integration
adranwit Oct 20, 2025
bcb769b
enhanced mcp integration
adranwit Oct 27, 2025
d847cf1
patched parser
adranwit Oct 27, 2025
d06c784
patched parser
adranwit Oct 28, 2025
b88cbd5
patched parser
adranwit Oct 28, 2025
1b5e79f
patched parser
adranwit Oct 28, 2025
c26fd5e
patched parser
adranwit Oct 28, 2025
57d9ca6
patched parser
adranwit Oct 28, 2025
452af4f
patched parser
adranwit Oct 28, 2025
82d6bb5
patched parser
adranwit Oct 29, 2025
d002e57
ENG-00000 structql update
Oct 30, 2025
dc84d4f
Merge pull request #60 from viant/ENG-0000-structql-update
adranwit Oct 30, 2025
37994e2
ENG-0000 datly tarslate for Patch
Oct 31, 2025
6437e5d
patched parser
adranwit Oct 31, 2025
8bb9c6a
patched parser
adranwit Nov 1, 2025
14be98f
added tx option and added support for multi part
adranwit Nov 5, 2025
5811a0a
added tx option and added support for multi part
adranwit Nov 5, 2025
d7ce972
added tx option and added support for multi part
adranwit Nov 6, 2025
c15bb61
added tx option and added support for multi part
adranwit Nov 6, 2025
9ef102c
patched multi content upload
adranwit Nov 6, 2025
66a4318
patched multi content upload
adranwit Nov 7, 2025
9ff2695
patched multi content upload
adranwit Nov 7, 2025
f644cf7
patched multi content upload
adranwit Nov 7, 2025
115062e
patched multi content upload
adranwit Nov 7, 2025
ecf6383
patched multi content upload
adranwit Nov 8, 2025
d6e7146
patched multi content upload
adranwit Nov 8, 2025
d3359f9
patched multi content upload
adranwit Nov 8, 2025
e9e5ca7
patched multi content upload
adranwit Nov 8, 2025
889497e
patched multi content upload
adranwit Nov 13, 2025
8654c5c
slice interface type cast fixed
ppoudyal-viant Nov 21, 2025
d7474f7
patched multi content upload
adranwit Nov 22, 2025
f220c98
Merge remote-tracking branch 'origin/master'
adranwit Nov 22, 2025
6e2e58e
patched type pointers
adranwit Nov 22, 2025
dde0e0e
limit type cast modified to include other primitives than int.
ppoudyal-viant Nov 24, 2025
5522092
Merge remote-tracking branch 'origin/master'
ppoudyal-viant Nov 24, 2025
1e7d511
limit type cast modified to include other primitives than int.
ppoudyal-viant Nov 24, 2025
f03b9e6
ENG-51724 merge main
vagarwal-viant Nov 25, 2025
06dba53
ENG-51724 add safe guards across marshalling for deeper dive into panic
vagarwal-viant Nov 25, 2025
728c9e4
add safeMarshal in the logging
tzhao-viant Nov 25, 2025
2ea3d57
Merge pull request #61 from viant/add_safeMarshal
adranwit Nov 26, 2025
3d6b55b
ENG-52439: using AppendMetrics with mutex lock; updating logging with…
himanshu808 Dec 2, 2025
5236e65
ENG-52439: adding unit test cases
himanshu808 Dec 3, 2025
85ec28d
Merge pull request #62 from viant/ENG-52349-guarding-metrics-w-mutex
adranwit Dec 3, 2025
ee5d315
patched type pointers
adranwit Dec 4, 2025
e66b070
Merge remote-tracking branch 'origin/master'
adranwit Dec 4, 2025
010a92a
patched type pointers
adranwit Dec 4, 2025
0b0e8b6
ENG-52379: adding trace id to info logs
himanshu808 Dec 5, 2025
7f60767
patched type pointers
adranwit Dec 8, 2025
72023c4
patched type pointers
adranwit Dec 8, 2025
93a78c4
patched type pointers
adranwit Dec 8, 2025
80bd6bf
patched type pointers
adranwit Dec 8, 2025
d7ee4a3
patched type pointers
adranwit Dec 8, 2025
0c1053e
ENG-51959: using snapshot for logging
himanshu808 Dec 9, 2025
c53d3f7
Merge branch 'master' of github.com-personal:viant/datly into ENG-523…
himanshu808 Dec 10, 2025
f6ac431
ENG-52379: updating logic to add trace id to logs
himanshu808 Dec 10, 2025
714f139
Merge pull request #63 from viant/ENG-51959-nil-ptr-error-fix
adranwit Dec 10, 2025
d8c4b10
ENG-52379: making the trace id key configurable
himanshu808 Dec 10, 2025
a544ab9
Merge pull request #64 from viant/ENG-52379-traceid-in-logger
adranwit Dec 10, 2025
14e6a88
patched type pointers
adranwit Dec 14, 2025
84850d0
Merge remote-tracking branch 'origin/master'
adranwit Dec 14, 2025
147384b
added viewSyncFlag to control sync request from mcp handler.
ppoudyal-viant Dec 15, 2025
4b5aed2
Merge remote-tracking branch 'origin/master'
ppoudyal-viant Dec 15, 2025
fea9e58
patched type pointers
adranwit Dec 15, 2025
224bc9d
Merge remote-tracking branch 'origin/master'
adranwit Dec 15, 2025
3ad960f
error reclassification
adranwit Dec 15, 2025
7739b70
error reclassification
adranwit Dec 16, 2025
4ba19cc
init view schema if nil
tzhao-viant Dec 16, 2025
3a03b8e
error reclassification
adranwit Dec 17, 2025
5bd0dee
error reclassification
adranwit Dec 17, 2025
3ff3ba1
patched marshaller
adranwit Dec 17, 2025
8f56405
patched marshaller
adranwit Dec 17, 2025
926929f
patched marshaller
adranwit Dec 18, 2025
af83748
use aState.Selector(parameter.Name) instead of parameter.Selector() t…
vjc1234 Dec 19, 2025
425ecc4
ENG-00000 fix handling of /n and /t
vagarwal-viant Dec 22, 2025
cfe7823
patched marshaller
adranwit Dec 22, 2025
29bb5f1
Merge remote-tracking branch 'origin/master'
adranwit Dec 22, 2025
aa021f3
Merge pull request #65 from viant/ENG-00000_handleCharacters
adranwit Dec 22, 2025
03ee2da
ENG-52641: adding mutex to Options struct in locator
himanshu808 Dec 29, 2025
75d2b3e
Merge pull request #66 from viant/ENG-52641-options-struct-mutex
adranwit Dec 29, 2025
bf88275
patched marshaller
adranwit Jan 6, 2026
f13d128
patched marshaller
adranwit Jan 8, 2026
0a05392
patched marshaller
adranwit Jan 9, 2026
30a174e
fix oauth refresh issue
adranwit Jan 11, 2026
a2cca14
updated SetLiterals
pol-mfilipowicz-viant Jan 14, 2026
3481a39
fix oauth refresh issue
adranwit Jan 28, 2026
9df5cc7
updated dep
adranwit Feb 11, 2026
3f924d4
- introduces shape pkg
adranwit Feb 14, 2026
8846346
fix config relative path handling
adranwit Feb 18, 2026
4dce520
nil pointer on schema error amplified.
ppoudyal-viant Feb 20, 2026
dc6a137
- introduces shape pkg
adranwit Feb 22, 2026
d07cd24
Implemented near-full shape-engine parity with the legacy internal tr…
adranwit Feb 23, 2026
e7fcb5c
Implemented near-full shape-engine parity with the legacy internal tr…
adranwit Feb 23, 2026
f16184b
shape/compile: add type support helpers; refine preprocessing and typ…
adranwit Feb 24, 2026
b218524
shape/compile: add type support helpers; refine preprocessing and typ…
adranwit Feb 24, 2026
bc71676
Merge pull request #67 from viant/dynamic
adranwit Feb 24, 2026
833f42f
Fix nil panics and route loss during config sync cycles
kkincaidV Feb 24, 2026
f705cce
Merge pull request #68 from kkincaidV/nil-fix
adranwit Feb 24, 2026
d36ccaf
shape/compile: add type support helpers; refine preprocessing and typ…
adranwit Feb 24, 2026
1b4675d
Merge remote-tracking branch 'origin/master'
adranwit Feb 24, 2026
1d68a32
shape/compile: add type support helpers; refine preprocessing and typ…
adranwit Feb 24, 2026
7abce12
shape/compile: add type support helpers; refine preprocessing and typ…
adranwit Feb 24, 2026
022ef9c
updated dep
adranwit Feb 24, 2026
6f552ce
updated dep
adranwit Feb 24, 2026
6fc7357
updated dep
adranwit Feb 24, 2026
7e8970b
updated dep
adranwit Feb 24, 2026
6ca1923
updated dep
adranwit Feb 25, 2026
66f763f
patched async jobs, enhanced dql grammar
adranwit Feb 25, 2026
3aae6be
patched async jobs, enhanced dql grammar
adranwit Feb 25, 2026
e5536e0
refactor openapi schema/generator and add polymorphism scaffolding
adranwit Feb 25, 2026
4eea356
harden openapi responses typing and marshal/session compatibility
adranwit Feb 25, 2026
286a88f
updated openapi schema builder
adranwit Feb 25, 2026
74fd475
updated openapi schema builder
adranwit Feb 25, 2026
b1f84f3
updated openapi schema builder
adranwit Feb 25, 2026
1da05d0
updated openapi schema builder
adranwit Feb 26, 2026
055ee4b
updated openapi schema builder
adranwit Feb 26, 2026
8d10d62
- stabilize e2e
adranwit Feb 27, 2026
85f81b5
- stabilize e2e
adranwit Feb 27, 2026
1cbc10f
- stabilize e2e
adranwit Feb 27, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ tmp/
*.gz
.DS_Store
autogen
dql
dql
*.iml
*.so
logs
Expand Down
2 changes: 1 addition & 1 deletion Version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v0.20.2
v0.21.0
2 changes: 1 addition & 1 deletion cmd/cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ package cmd
import (
"context"
"fmt"

"github.com/jessevdk/go-flags"
"github.com/viant/datly/cmd/command"
soptions "github.com/viant/datly/cmd/options"
)

func RunApp(version string, args soptions.Arguments) error {

options, err := buildOptions(args)
if err != nil {
return err
Expand Down
33 changes: 33 additions & 0 deletions cmd/command/async_defaults.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
package command

import (
"github.com/viant/afs/file"
"github.com/viant/afs/url"
"github.com/viant/datly/gateway/runtime/standalone"
)

const (
defaultJobURL = "/tmp/datly/jobs"
defaultFailedJobURL = "/tmp/datly/failed"
)

func applyAsyncJobDefaults(config *standalone.Config) {
if config == nil {
return
}

if config.JobURL == "" && config.FailedJobURL == "" {
config.JobURL = defaultJobURL
config.FailedJobURL = defaultFailedJobURL
return
}

if config.JobURL == "" {
config.JobURL = defaultJobURL
}

if config.FailedJobURL == "" {
parent, _ := url.Split(config.JobURL, file.Scheme)
config.FailedJobURL = url.Join(parent, "failed", "jobs")
}
}
51 changes: 51 additions & 0 deletions cmd/command/async_defaults_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
package command

import (
"testing"

"github.com/viant/datly/gateway"
"github.com/viant/datly/gateway/runtime/standalone"
)

func TestApplyAsyncJobDefaults(t *testing.T) {
testCases := []struct {
name string
jobURL string
failedJobURL string
expectJob string
expectFailed string
}{
{
name: "both empty use tmp defaults",
expectJob: "/tmp/datly/jobs",
expectFailed: "/tmp/datly/failed",
},
{
name: "custom job only derives failed path",
jobURL: "/custom/jobs",
expectJob: "/custom/jobs",
expectFailed: "file://localhost/custom/failed/jobs",
},
{
name: "failed only keeps failed and defaults job",
failedJobURL: "/custom/failed",
expectJob: "/tmp/datly/jobs",
expectFailed: "/custom/failed",
},
}

for _, testCase := range testCases {
cfg := &standalone.Config{Config: &gateway.Config{}}
cfg.JobURL = testCase.jobURL
cfg.FailedJobURL = testCase.failedJobURL

applyAsyncJobDefaults(cfg)

if cfg.JobURL != testCase.expectJob {
t.Fatalf("%s: expected JobURL=%s, got %s", testCase.name, testCase.expectJob, cfg.JobURL)
}
if cfg.FailedJobURL != testCase.expectFailed {
t.Fatalf("%s: expected FailedJobURL=%s, got %s", testCase.name, testCase.expectFailed, cfg.FailedJobURL)
}
}
}
69 changes: 67 additions & 2 deletions cmd/command/generate.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ func (s *Service) generate(ctx context.Context, options *options.Options) error
if _, err := s.loadPlugin(ctx, options); err != nil {
return err
}
if ruleOption.EffectiveEngine() == "shape" && options.Generate.Operation != "get" {
return fmt.Errorf("shape engine currently supports gen get only")
}
if options.Generate.Operation == "get" {
return s.generateGet(ctx, options)
}
Expand Down Expand Up @@ -144,8 +147,51 @@ func (s *Service) generateGet(ctx context.Context, opts *options.Options) (err e
if err = s.translate(ctx, opts); err != nil {
return err
}
if err = s.persistRepository(ctx); err != nil {
return err
if opts.Rule().EffectiveEngine() != options.EngineShape {
if err = s.persistRepository(ctx); err != nil {
return err
}
}

if opts.Rule().EffectiveEngine() == options.EngineShape {
componentURL := url.Join(translate.Repository.RepositoryURL, "Datly", "routes")
datlySrv, err := datly.New(ctx, repository.WithComponentURL(componentURL))
if err != nil {
return err
}
for i, source := range sources {
translate.Rule.Index = i
sourceText, loadErr := translate.Rule.LoadSource(ctx, s.fs, source)
if loadErr != nil {
return loadErr
}
method, uri := parseShapeRulePath(sourceText, translate.Rule.RuleName(), translate.Repository.APIPrefix)
key := uri
if !strings.EqualFold(method, "GET") {
key = method + ":" + uri
}
aComponent, compErr := datlySrv.Component(ctx, key)
if compErr != nil {
return compErr
}
applyDefaultComponentPackage(aComponent, translate.Rule.ModulePrefix)
_, sourceName := path.Split(url.Path(source))
sourceName = trimExt(sourceName)
var embeds = map[string]string{}
var namedResources []string
if repo := opts.Repository(); repo != nil && len(repo.SubstitutesURL) > 0 {
namedResources = append(namedResources, repo.SubstitutesURL...)
}
code := aComponent.GenerateOutputCode(ctx, defComp, true, embeds, namedResources...)
destURL := path.Join(translate.Rule.ModuleLocation, translate.Rule.ModulePrefix, sourceName+".go")
if err = s.fs.Upload(ctx, destURL, file.DefaultFileOsMode, strings.NewReader(code)); err != nil {
return err
}
if err = s.persistEmbeds(ctx, translate.Rule.ModuleLocation, translate.Rule.ModulePrefix, embeds, aComponent); err != nil {
return err
}
}
return nil
}

for i, resource := range s.translator.Repository.Resource {
Expand All @@ -167,6 +213,7 @@ func (s *Service) generateGet(ctx context.Context, opts *options.Options) (err e
if err != nil {
return err
}
applyDefaultComponentPackage(aComponent, modulePrefix)
var embeds = map[string]string{}
var namedResources []string

Expand All @@ -190,6 +237,24 @@ func (s *Service) generateGet(ctx context.Context, opts *options.Options) (err e
return nil
}

func applyDefaultComponentPackage(component *repository.Component, modulePrefix string) {
if component == nil {
return
}
if component.Output.Type.Package != "" || component.Input.Type.Package != "" {
return
}
modulePrefix = strings.Trim(modulePrefix, "/")
if modulePrefix == "" {
return
}
base := path.Base(modulePrefix)
if base == "" || base == "." || base == "/" {
return
}
component.Output.Type.Package = strings.ReplaceAll(base, "-", "_")
}

func (s *Service) persistEmbeds(ctx context.Context, moduleLocation string, modulePrefix string, embeds map[string]string, component *repository.Component) error {
rootName := component.View.Name
formatter := text.DetectCaseFormat(rootName)
Expand Down
5 changes: 1 addition & 4 deletions cmd/command/mcp.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,7 @@ func (s *Service) mcp(ctx context.Context, mcpOption *options.Mcp) error {
setter.SetStringIfEmpty(&s.config.JobURL, mcpOption.JobURL)
setter.SetStringIfEmpty(&s.config.FailedJobURL, mcpOption.FailedJobURL)
setter.SetIntIfZero(&s.config.MaxJobs, mcpOption.MaxJobs)
if s.config.FailedJobURL == "" && s.config.JobURL != "" {
parent, _ := url.Split(s.config.JobURL, file.Scheme)
s.config.FailedJobURL = url.Join(parent, "failed", "jobs")
}
applyAsyncJobDefaults(s.config)
if mcpOption.LoadPlugin && s.config.Config.PluginsURL != "" {
parent, _ := url.Split(mcpOption.PluginInfo, file.Scheme)
_ = s.fs.Copy(ctx, parent, s.config.Config.PluginsURL)
Expand Down
2 changes: 1 addition & 1 deletion cmd/command/plugin.go
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ func (s *Service) reportPluginIssue(ctx context.Context, destURL string) error {
if fixBuilder.Len() > 0 {
fmt.Printf("[FIXME]: to address pulugin dependency run the following:\n")
}
fmt.Printf(fixBuilder.String())
fmt.Print(fixBuilder.String())
return nil
}

Expand Down
5 changes: 1 addition & 4 deletions cmd/command/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,7 @@ func (s *Service) run(ctx context.Context, run *options.Run) (*standalone.Server
setter.SetStringIfEmpty(&s.config.JobURL, run.JobURL)
setter.SetStringIfEmpty(&s.config.FailedJobURL, run.FailedJobURL)
setter.SetIntIfZero(&s.config.MaxJobs, run.MaxJobs)
if s.config.FailedJobURL == "" && s.config.JobURL != "" {
parent, _ := url.Split(s.config.JobURL, file.Scheme)
s.config.FailedJobURL = url.Join(parent, "failed", "jobs")
}
applyAsyncJobDefaults(s.config)
if run.LoadPlugin && s.config.Config.PluginsURL != "" {
parent, _ := url.Split(run.PluginInfo, file.Scheme)
_ = s.fs.Copy(ctx, parent, s.config.Config.PluginsURL)
Expand Down
10 changes: 10 additions & 0 deletions cmd/command/translate.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ func (s *Service) Translate(ctx context.Context, opts *options.Options) (err err
if err = s.translate(ctx, opts); err != nil {
return err
}
engine := opts.Rule().EffectiveEngine()
if engine == options.EngineShape || engine == options.EngineShapeIR {
return nil
}
return s.persistRepository(ctx)
}

Expand All @@ -49,6 +53,12 @@ func (s *Service) persistRepository(ctx context.Context) error {
}

func (s *Service) translate(ctx context.Context, opts *options.Options) error {
switch opts.Rule().EffectiveEngine() {
case options.EngineShape:
return s.translateShape(ctx, opts)
case options.EngineShapeIR:
return s.translateShapeIR(ctx, opts)
}
if err := s.ensureTranslator(opts); err != nil {
return fmt.Errorf("failed to create translator: %v", err)
}
Expand Down
Loading
Loading