config: update fields, defaults, and required checks to match README - #190
Conversation
00fd1e1 to
4c78c65
Compare
Summary: Intent: - This branch builds on #190 (config: update fields, defaults, and required checks to match README), which aligned names/defaults/required-ness with config/README.md but left several fields that the README doesn't document at all. This removes them so the Go structs match the documented surface exactly. Changes: - Removed RepositoryConfig.FullHashRepos, ExcludedFiles, ExcludeExternalTargets, and StreamBazelLogs, and ServiceConfig.WorkerRootPath. - These fields drove real behavior, so this is a narrow behavior change, not just a doc cleanup: graphrunner/native.go now always includes external targets in the Bazel query and no longer applies a repo-level full-hash or excluded-file list (per-request excludes via RequestOptions still work), orchestrator/native_orchestrator.go no longer streams Bazel logs, and example/main.go derives the worker checkout path as workspaces_root/.workers instead of reading a separate config field. - Updated config/config_test.go and the YAML fixtures (example/tango-config.yaml, orchestrator/testdata/config.yaml, integration/testdata/tango-config.yaml.tmpl) to drop the removed keys. --- <sub>Generated by the 🪄 [pr-create](https://sg.uberinternal.com/code.uber.internal/uber-code/devexp-agent-marketplace/-/blob/claude-code/plugins/dev/uber-dev/skills/pr-create/SKILL.md) skill in devexp-agent-marketplace</sub>
| var ( | ||
| _bzlmodEnabledDefault = true | ||
| ) |
There was a problem hiding this comment.
Why is this not in the const block too?
There was a problem hiding this comment.
It's because the value is *bool not bool. Since the default is now true we need to make sure the value was unset. If we made it a bool, the default is false. There is no way to tell if it's false because it's unset or false because the user set it. So to check if bzlmod was disabled, we would check BzlmodEnabled != nil && *BzlmodEnabled == false.
1879205 to
a56db34
Compare
a2efb18 to
abe84e5
Compare
Summary: Intent: - This branch builds on #190 (config: update fields, defaults, and required checks to match README), which aligned names/defaults/required-ness with config/README.md but left several fields that the README doesn't document at all. This removes them so the Go structs match the documented surface exactly. Changes: - Removed RepositoryConfig.FullHashRepos, ExcludedFiles, ExcludeExternalTargets, and StreamBazelLogs, and ServiceConfig.WorkerRootPath. - These fields drove real behavior, so this is a narrow behavior change, not just a doc cleanup: graphrunner/native.go now always includes external targets in the Bazel query and no longer applies a repo-level full-hash or excluded-file list (per-request excludes via RequestOptions still work), orchestrator/native_orchestrator.go no longer streams Bazel logs, and example/main.go derives the worker checkout path as workspaces_root/.workers instead of reading a separate config field. - Updated config/config_test.go and the YAML fixtures (example/tango-config.yaml, orchestrator/testdata/config.yaml, integration/testdata/tango-config.yaml.tmpl) to drop the removed keys. --- <sub>Generated by the 🪄 [pr-create](https://sg.uberinternal.com/code.uber.internal/uber-code/devexp-agent-marketplace/-/blob/claude-code/plugins/dev/uber-dev/skills/pr-create/SKILL.md) skill in devexp-agent-marketplace</sub>
a5dbe2e to
0588d25
Compare
abe84e5 to
80ed523
Compare
Summary: Intent: - This branch builds on #190 (config: update fields, defaults, and required checks to match README), which aligned names/defaults/required-ness with config/README.md but left several fields that the README doesn't document at all. This removes them so the Go structs match the documented surface exactly. Changes: - Removed RepositoryConfig.FullHashRepos, ExcludedFiles, ExcludeExternalTargets, and StreamBazelLogs, and ServiceConfig.WorkerRootPath. - These fields drove real behavior, so this is a narrow behavior change, not just a doc cleanup: graphrunner/native.go now always includes external targets in the Bazel query and no longer applies a repo-level full-hash or excluded-file list (per-request excludes via RequestOptions still work), orchestrator/native_orchestrator.go no longer streams Bazel logs, and example/main.go derives the worker checkout path as workspaces_root/.workers instead of reading a separate config field. - Updated config/config_test.go and the YAML fixtures (example/tango-config.yaml, orchestrator/testdata/config.yaml, integration/testdata/tango-config.yaml.tmpl) to drop the removed keys. --- <sub>Generated by the 🪄 [pr-create](https://sg.uberinternal.com/code.uber.internal/uber-code/devexp-agent-marketplace/-/blob/claude-code/plugins/dev/uber-dev/skills/pr-create/SKILL.md) skill in devexp-agent-marketplace</sub>
a39ca66 to
b154f1a
Compare
0588d25 to
01ae7e8
Compare
b154f1a to
6eaa518
Compare
Rebases PR #190's config-schema changes onto main, whose independent config audit (2e0733f) already consolidated streaming defaults into max_message_bytes, so that part is kept as-is. Only the naming/behavior that main hadn't already converged on is applied: - Service.WorkerPoolSize -> MaxWorkerPoolSize (max_worker_pool_size) - Service.RepoManagerClonePath -> WorkspacesRootPath (workspaces_root_path), now required instead of defaulting to a temp dir - RepositoryConfig.QueryTimeout -> QueryTimeoutSeconds (query_timeout_seconds), default lowered to 600s - RepositoryConfig.BazelCommand -> BazelCommandPath (bazel_command_path) - RepositoryConfig.BzlmodEnabled bool -> *bool, defaulting to true when unset - TODO comments flagging FullHashRepos, ExcludedFiles, ExcludeExternalTargets, StreamBazelLogs, and WorkerRootPath as undocumented Co-Authored-By: Claude Sonnet 5 <[email protected]>
6eaa518 to
c7db8ee
Compare
|
|
Rebases PR #191 onto the #190 config rework (currently on yushan/config-readme-followup, itself not yet merged to main), dropping ExcludeExternalTargets and the settable ServiceConfig.WorkerRootPath — both undocumented and now redundant: - ExcludeExternalTargets: graphrunner/native.go now derives the external-target query purely from BzlmodEnabled (bzlmod repos always query //external, so the separate toggle was redundant with it). - WorkerRootPath: RepoManager already owns RepoManagerClonePath, so it derives its own <repo_manager_clone_path>/.workers/<repo>/worker-{1..N}/ instead of taking a second, independently configurable path for the same tree. FullHashRepos, ExcludedFiles, and StreamBazelLogs are kept for now (still needed internally), with a TODO noting they're undocumented in config/README.md. Co-Authored-By: Claude Sonnet 5 <[email protected]>
Rebases PR #191 onto the #190 config rework (currently on yushan/config-readme-followup, itself not yet merged to main), dropping ExcludeExternalTargets and the settable ServiceConfig.WorkerRootPath — both undocumented and now redundant: - ExcludeExternalTargets: graphrunner/native.go now derives the external-target query purely from BzlmodEnabled (bzlmod repos always query //external, so the separate toggle was redundant with it). - WorkerRootPath: RepoManager already owns RepoManagerClonePath, so it derives its own <repo_manager_clone_path>/.workers/<repo>/worker-{1..N}/ instead of taking a second, independently configurable path for the same tree. FullHashRepos, ExcludedFiles, and StreamBazelLogs are kept for now (still needed internally), with a TODO noting they're undocumented in config/README.md. Co-Authored-By: Claude Sonnet 5 <[email protected]>
Summary
Aligns config field names, defaults, and required checks with config/README.md from #180.
worker_pool_size→max_worker_pool_size,repo_manager_clone_path→workspaces_root,chunking→streaming(with sub-fields renamed tomax_num_targets/max_num_changed_targets/max_num_metadata_entries),query_timeout→query_timeout_seconds.config.Parsenow enforcesservice.workspaces_rootas required and applies documented defaults:bzlmod_enableddefaults totrue,query_timeout_secondsdefaults to600, streaming fields default to250/125/50000.config/config_test.gocovering new validation and defaults.Test plan
make buildmake testStack