Skip to content

Commit b24d2f5

Browse files
tconley1428cretzclaude
authored
Automatic request header support (#236)
* Automatic request header support * Update proxy generator * Remove incorrect tests which require resource-id changes * Update with header annotations from api pr * Rerun make, fix one test * Fix generator bugs and improve test coverage - Remove unused getPackageName() function - Fix swallowed error in RangeFiles callback by capturing it in rangeErr - Avoid redundant fmt.Sprintf("%s", val) when value template has no prefix - Add tests for nil request, resource-id prefixes, nested fields, nil parents, deployment/taskqueue/schedule types, and empty namespace Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * Update proto submodule to master and regenerate proxy code Proto submodule now includes merged API PR #737 which standardizes resource_id annotations to use bare values. Regenerated proxy code passes resource_id values through without adding prefixes. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Chad Retz <chad@temporal.io> Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent fc0cd70 commit b24d2f5

5 files changed

Lines changed: 807 additions & 2 deletions

File tree

cmd/proxygenerator/main.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,12 @@ func main() {
3131
log.Print(interceptorErr)
3232
}
3333

34-
if serviceErr != nil || interceptorErr != nil {
34+
requestHeaderErr := generateRequestHeader(cfg)
35+
if requestHeaderErr != nil {
36+
log.Print(requestHeaderErr)
37+
}
38+
39+
if serviceErr != nil || interceptorErr != nil || requestHeaderErr != nil {
3540
os.Exit(1)
3641
}
3742
}

cmd/proxygenerator/request_header.go

Lines changed: 317 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

proxy/interceptor.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)