Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 1 addition & 0 deletions docker-compose-testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,7 @@ services:
- "1071:1071/tcp"
environment:
IS_DOCKER: "${IS_DOCKER:-false}"
OMNISDK_MOCK_DELAY_MS: "50"
command:
- bash
- -c
Expand Down
10 changes: 10 additions & 0 deletions internal/stackql/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import (
"github.com/stackql/stackql/internal/stackql/buildinfo"
"github.com/stackql/stackql/internal/stackql/config"
"github.com/stackql/stackql/internal/stackql/envfile"
"github.com/stackql/stackql/internal/stackql/intrinsic"

"github.com/magiconair/properties"
"github.com/spf13/cobra"
Expand Down Expand Up @@ -69,6 +70,12 @@ var (
replicateCtrMgr bool = false //nolint:unused // TODO: investigate and test then remove if possible
)

// previewCfgRaw is the raw --preview argument; cobra binds it here and
// initConfig hands it to the intrinsic package once.
//
//nolint:gochecknoglobals // cobra binds flags to package scope
var previewCfgRaw string

// rootCmd represents the base command when called without any subcommands.
//
//nolint:gochecknoglobals // global vars are a pattern for this lib
Expand Down Expand Up @@ -148,6 +155,7 @@ func init() {
rootCmd.PersistentFlags().StringVar(&runtimeCtx.StoreTxnCfgRaw, dto.StoreTxnCfgRawKey, "{}", "JSON / YAML string representing Txn store config")
rootCmd.PersistentFlags().StringVar(&runtimeCtx.GCCfgRaw, dto.GCCfgRawKey, "{}", "JSON / YAML string representing GC config")
rootCmd.PersistentFlags().StringVar(&runtimeCtx.ACIDCfgRaw, dto.ACIDCfgRawKey, "{}", "JSON / YAML string representing ACID config")
rootCmd.PersistentFlags().StringVar(&previewCfgRaw, intrinsic.CfgRawKey, "{}", "JSON string configuring the "+intrinsic.ProviderName+" provider backend; keys: batchSize, flushInterval, endpoint")
rootCmd.PersistentFlags().StringVar(&runtimeCtx.SessionCtxRaw, dto.SessionCtxKey, "{}", "JSON / YAML string representing session config")
rootCmd.PersistentFlags().IntVar(&runtimeCtx.APIRequestTimeout, dto.APIRequestTimeoutKey, 45, "API request timeout in seconds, 0 for no timeout.") //nolint:mnd // TODO: investigate
rootCmd.PersistentFlags().StringVar(&dummyString, dto.ColorSchemeKey, "", "DEPRECATED: color schems no longer active")
Expand Down Expand Up @@ -242,6 +250,8 @@ func mergeConfigFromFile(runtimeCtx *dto.RuntimeCtx, flagSet pflag.FlagSet) {
func initConfig() {
mergeConfigFromFile(&runtimeCtx, *rootCmd.PersistentFlags())

intrinsic.Init(previewCfgRaw)

// An absent --env.file is created empty (issue #691) so packaged installs
// have a credential store to populate; creation failure is non-fatal
// because a missing file is already tolerated by Source.
Expand Down
1 change: 1 addition & 0 deletions internal/stackql/intrinsic/intrinsic.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ const (

type column struct {
name string
sourceName string
description string
dataType string
}
Expand Down
Loading
Loading