Skip to content

config: add _path suffix to path-like fields#202

Closed
yushan8 wants to merge 5 commits into
yushan/remove-undocumented-config-fieldsfrom
yushan/config-path-suffix-rename
Closed

config: add _path suffix to path-like fields#202
yushan8 wants to merge 5 commits into
yushan/remove-undocumented-config-fieldsfrom
yushan/config-path-suffix-rename

Conversation

@yushan8

@yushan8 yushan8 commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Renames ServiceConfig.WorkspacesRoot (workspaces_root) → WorkspacesRootPath (workspaces_root_path) and RepositoryConfig.BazelCommand (bazel_command) → BazelCommandPath (bazel_command_path).
  • Matches the _path suffix convention already used elsewhere in ServiceConfig (repo_manager_clone_path, worker_root_path) and the current config/README.md, per review feedback on [config] Tango configuration documentation #180.
  • Pure rename, no behavior change.

Stacked on #191.

Test plan

  • make build
  • make test
  • make gazelle

yushan8 added 5 commits July 14, 2026 13:33
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>
The <workspaces_root>/.workers derivation moved from a config.Parse default
into example/main.go when ServiceConfig.WorkerRootPath was removed, but it
was untested there (package main). Move it into config as a small method
with its own test, so the layout documented on WorkspacesRoot can't drift
silently again.
ServiceConfig.WorkerRootPath() recomputed the join on every call and
exposed a public method just to derive a path. Set it once as a plain
field during Parse instead, so every config initialization gets a
consistent, precomputed value without callers needing to call a method.
…oval

Removing RepositoryConfig.ExcludeExternalTargets left the Bazel query
always including //external:all-targets, which errors under Bzlmod
("no such package 'external'") since this repo's own config sets
bzlmod_enabled: true. Gate the //external:all-targets clause on
BzlmodEnabled instead, matching the behavior documented in
config/README.md.

Removing ExcludedFiles also dropped the "^@@?bazel_tools/" exclusion
the integration test relied on to skip hashing @bazel_tools' files,
some of which (e.g. tools/test/tw.exe, Windows-only) don't exist on
every OS. Restore the equivalent exclusion via the per-request
RequestOptions.ExtraExcludeFilesRegex, which still exists precisely
for this kind of ad hoc exclusion.
…command)

Matches the existing convention elsewhere in ServiceConfig
(repo_manager_clone_path, worker_root_path) and config/README.md's
current documented field names: workspaces_root -> workspaces_root_path,
bazel_command -> bazel_command_path. Pure rename, no behavior change.
@yushan8 yushan8 requested review from a team as code owners July 14, 2026 20:39
@yushan8 yushan8 force-pushed the yushan/remove-undocumented-config-fields branch from 27cc6f7 to 67934f9 Compare July 14, 2026 22:19
@yushan8

yushan8 commented Jul 14, 2026

Copy link
Copy Markdown
Contributor Author

Folded directly into #190 instead of keeping this as a separate stacked PR. Closing.

@yushan8 yushan8 closed this Jul 14, 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.

1 participant