Skip to content

Conversation

@chaptersix
Copy link
Contributor

What changed?

Describe what has changed in this PR.

Why?

Tell your future self why have you made these changes.

How did you test it?

  • built
  • run locally and tested manually
  • covered by existing tests
  • added new unit test(s)
  • added new functional test(s)

Potential risks

Any change is risky. Identify all risks you are aware of. If none, remove this section.

@chaptersix
Copy link
Contributor Author

chaptersix commented Dec 18, 2025

Sample output:

go run cmd/server/main.go config dynamic | head -n 10 
KEY                                                                TYPE                          SCOPE        DEFAULT
─────────────────────────────────────────────────────────────────  ────────────────────────────  ───────────  ────────────────────
matching.enableWorkerPluginMetrics                                 bool                          Global       false
history.enableWorkflowExecutionTimeoutTimer                        bool                          Global       true
history.acquireShardConcurrency                                    int                           Global       10
history.timerProcessorPollBackoffInterval                          duration                      Global       5s
history.replicatorProcessorMaxPollInterval                         duration                      Global       1m0s
worker.stickyCacheSize                                             int                           Global       0
worker.protectedNamespaces                                         []string                      Global       []
history.persistenceGlobalNamespaceMaxQPS                           int                           Namespace    0

},
},
{
Name: "config",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Integrate this with the validate-dynamic-config command above (probably move that one into here)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll pull in render-config as well

Key() Key
Precedence() Precedence
Validate(v any) error
Documentation() SettingDoc
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are already getters for Key and Precedence, let's just add new individual getters for description and default value instead of a new struct

settingType struct {
Name string
GoType string
TypeName string // lowercase type name for documentation
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the value in having an extra value here over just using the Go type via reflection?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

forgot why I added it, I'll see if i can remove it

return result
}

// getTypeName returns a human-readable type name for documentation.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is all this complexity worth it instead of just fmt.Sprintf("%T", v)?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll see if I can remove it.

@chaptersix
Copy link
Contributor Author

will open another PR after adding the ability for tdbg to pull these configs.

@chaptersix chaptersix closed this Jan 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants