diff --git a/cmd/web/bootstrap/bootstrap.go b/cmd/web/bootstrap/bootstrap.go index 234eda6..401d725 100644 --- a/cmd/web/bootstrap/bootstrap.go +++ b/cmd/web/bootstrap/bootstrap.go @@ -362,34 +362,41 @@ func InitAISummarizerStorage(conf AISummarizerConfig, log logger.Logger) *ai_sum } // InitGoRulesClient initializes the GoRules SDK client. -func InitGoRulesClient(conf GoRulesConfig, log logger.Logger) gorules.Client { - if conf.BaseURL == "" || conf.Token == "" || conf.RuleID == "" { - log.Warn("GoRules client not configured, falling back to static Kanban statuses", map[string]interface{}{}) - return nil - } +func InitGoRulesClient(_ GoRulesConfig, log logger.Logger) gorules.Client { + // GoRules SDK temporarily disabled — gorulessdk private repo unreachable from server. + // Kanban falls back to built-in bid workflow columns when client is nil. + log.Warn("GoRules client disabled; Kanban uses built-in bid workflow columns", map[string]interface{}{}) + return nil - timeout := conf.Timeout - if timeout <= 0 { - timeout = 10 * time.Second - } + /* + if conf.BaseURL == "" || conf.Token == "" || conf.RuleID == "" { + log.Warn("GoRules client not configured, falling back to static Kanban statuses", map[string]interface{}{}) + return nil + } - client, err := gorules.New(gorules.Config{ - BaseURL: conf.BaseURL, - Token: conf.Token, - Timeout: timeout, - }, log) - if err != nil { - log.Error("Failed to initialize GoRules client", map[string]interface{}{ - "error": err.Error(), + timeout := conf.Timeout + if timeout <= 0 { + timeout = 10 * time.Second + } + + client, err := gorules.New(gorules.Config{ + BaseURL: conf.BaseURL, + Token: conf.Token, + Timeout: timeout, + }, log) + if err != nil { + log.Error("Failed to initialize GoRules client", map[string]interface{}{ + "error": err.Error(), + }) + return nil + } + + log.Info("GoRules client initialized successfully", map[string]interface{}{ + "base_url": conf.BaseURL, + "timeout": timeout, + "rule_id": conf.RuleID, }) - return nil - } - log.Info("GoRules client initialized successfully", map[string]interface{}{ - "base_url": conf.BaseURL, - "timeout": timeout, - "rule_id": conf.RuleID, - }) - - return client + return client + */ } diff --git a/go.mod b/go.mod index 3bf8898..f34fcef 100644 --- a/go.mod +++ b/go.mod @@ -18,7 +18,7 @@ require ( go.uber.org/zap v1.26.0 golang.org/x/crypto v0.40.0 gopkg.in/natefinch/lumberjack.v2 v2.2.1 - repo.ravanertebat.com/k.khodayari/gorulessdk v1.0.10 +// repo.ravanertebat.com/k.khodayari/gorulessdk v1.0.10 // temporarily disabled: private repo unreachable from server ) require ( diff --git a/go.sum b/go.sum index 8247541..26f27f3 100644 --- a/go.sum +++ b/go.sum @@ -163,5 +163,3 @@ gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -repo.ravanertebat.com/k.khodayari/gorulessdk v1.0.10 h1:xxNnEyXr6v9wWb3nv2YpRDJ+2kEX7s588RdD6mGqwWI= -repo.ravanertebat.com/k.khodayari/gorulessdk v1.0.10/go.mod h1:SqAyTO7MZgI20+E1/xedUGHGWU5uyphZ2izHx62Rsr0= diff --git a/pkg/gorules/client.go b/pkg/gorules/client.go index f99526c..cd2b4e5 100644 --- a/pkg/gorules/client.go +++ b/pkg/gorules/client.go @@ -3,16 +3,17 @@ package gorules import ( "context" "errors" - "strings" "time" "tm/pkg/logger" - "repo.ravanertebat.com/k.khodayari/gorulessdk" + // "repo.ravanertebat.com/k.khodayari/gorulessdk" // temporarily disabled: private repo unreachable from server ) +/* const ( showAvailableStatusAction = gorulessdk.ShowAvailableStatus ) +*/ // Config contains GoRules client configuration. type Config struct { @@ -32,12 +33,18 @@ type Client interface { EvaluateAvailableStatuses(ctx context.Context, currentStatus string, ruleID string) ([]StatusWithCategory, error) } +// New creates a new GoRules client. +// Temporarily disabled: gorulessdk is unavailable from the deployment server. +func New(_ Config, _ logger.Logger) (Client, error) { + return nil, errors.New("gorulessdk temporarily disabled") +} + +/* type sdkClient struct { client *gorulessdk.Client logger logger.Logger } -// New creates a new GoRules client. func New(cfg Config, log logger.Logger) (Client, error) { if strings.TrimSpace(cfg.BaseURL) == "" { return nil, errors.New("gorules base url is required") @@ -83,3 +90,4 @@ func (s *sdkClient) EvaluateAvailableStatuses(ctx context.Context, currentStatus } return statuses, nil } +*/