[V2] Expand contextutils with org, service_name, cluster_id keys and logKeys#7229
[V2] Expand contextutils with org, service_name, cluster_id keys and logKeys#7229
Conversation
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
This PR appears to be a broad repository restructure: it removes substantial Helm chart content and legacy docs/CI files, adds new Go services (Actions + Cache Service), and introduces Buf configuration plus new GitHub workflows. This does not match the PR title/description about expanding flytestdlib/contextutils v2 log keys.
Changes:
- Adds new Go services/modules (
actions,cache_service) with config, setup wiring, migrations, and tests. - Replaces/overhauls tooling & CI (Buf configs, new publish/test workflows, new CODEOWNERS/.dockerignore adjustments).
- Removes a large set of Helm chart templates/values and many repository docs/changelogs/workflows.
Reviewed changes
Copilot reviewed 277 out of 5040 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| charts/flyte-core/values-eks-override.yaml | Removed workflow scheduler override values. |
| charts/flyte-core/values-dataplane.yaml | Removed dataplane values file content. |
| charts/flyte-core/values-controlplane.yaml | Removed controlplane values file content. |
| charts/flyte-core/templates/propeller/webhook-hpa.yaml | Removed propeller webhook HPA template. |
| charts/flyte-core/templates/propeller/service.yaml | Removed propeller Service template. |
| charts/flyte-core/templates/propeller/service-monitor.yaml | Removed propeller ServiceMonitor template. |
| charts/flyte-core/templates/propeller/rbac.yaml | Removed propeller RBAC template. |
| charts/flyte-core/templates/propeller/manager.yaml | Removed propeller manager PodTemplate template. |
| charts/flyte-core/templates/propeller/crds/flyteworkflow.yaml | Removed FlyteWorkflow CRD template. |
| charts/flyte-core/templates/propeller/configmap.yaml | Removed propeller ConfigMap template. |
| charts/flyte-core/templates/flytescheduler/service.yaml | Removed flytescheduler Service template. |
| charts/flyte-core/templates/flytescheduler/service-monitor.yaml | Removed flytescheduler ServiceMonitor template. |
| charts/flyte-core/templates/flytescheduler/sa.yaml | Removed flytescheduler ServiceAccount template. |
| charts/flyte-core/templates/flytescheduler/configmap.yaml | Removed flytescheduler ConfigMap template. |
| charts/flyte-core/templates/datacatalog/service.yaml | Removed datacatalog Service template. |
| charts/flyte-core/templates/datacatalog/rbac.yaml | Removed datacatalog ServiceAccount template. |
| charts/flyte-core/templates/datacatalog/configmap.yaml | Removed datacatalog ConfigMap template. |
| charts/flyte-core/templates/console/service.yaml | Removed console Service template. |
| charts/flyte-core/templates/console/service-monitor.yaml | Removed console ServiceMonitor template. |
| charts/flyte-core/templates/console/deployment.yaml | Removed console Deployment template. |
| charts/flyte-core/templates/console/configmap.yaml | Removed console ConfigMap template. |
| charts/flyte-core/templates/common/secret.yaml | Removed common secret manifest templating. |
| charts/flyte-core/templates/common/secret-auth.yaml | Removed admin OAuth client secret template. |
| charts/flyte-core/templates/common/namespace.yaml | Removed namespace creation template. |
| charts/flyte-core/templates/clusterresourcesync/deployment.yaml | Removed cluster resource sync deployment template. |
| charts/flyte-core/templates/clusterresourcesync/configmap.yaml | Removed cluster resource sync configmap template. |
| charts/flyte-core/templates/clusterresourcesync/cluster_resource_configmap.yaml | Removed cluster resource templates configmap template. |
| charts/flyte-core/templates/admin/service.yaml | Removed admin Service template. |
| charts/flyte-core/templates/admin/service-monitor.yaml | Removed admin ServiceMonitor template. |
| charts/flyte-core/templates/admin/secret.yaml | Removed admin Secret template. |
| charts/flyte-core/templates/admin/rbac.yaml | Removed admin RBAC template. |
| charts/flyte-core/templates/admin/configmap.yaml | Removed admin ConfigMap templates. |
| charts/flyte-core/README.md.gotmpl | Removed flyte-core chart README template. |
| charts/flyte-core/Chart.yaml | Removed flyte-core Chart.yaml. |
| charts/flyte-binary/templates/service/webhook.yaml | Simplified webhook Service and changed targetPort/protocol. |
| charts/flyte-binary/templates/service/http.yaml | Removed service-specific annotations block. |
| charts/flyte-binary/templates/service/grpc.yaml | Removed separate gRPC Service template. |
| charts/flyte-binary/templates/crds/flyteworkflow.yaml | Removed FlyteWorkflow CRD template. |
| charts/flyte-binary/templates/clusterrole.yaml | Modified ClusterRole rules (notably CRD/API groups & secrets/webhook perms). |
| charts/flyte-binary/templates/cluster-resource-templates.yaml | Removed cluster resource templates ConfigMap template. |
| charts/flyte-binary/README.md | Bumped chart version badge and updated co-pilot tag. |
| charts/flyte-binary/Chart.yaml | Bumped chart version and removed appVersion/dependencies section. |
| charts/event.json | Removed event.json file. |
| cache_service/setup.go | New setup wiring for CacheService handler + readiness check. |
| cache_service/repository/repository.go | New repository composition for cache service repos. |
| cache_service/repository/models/reservation.go | New reservation DB model. |
| cache_service/repository/models/cached_output.go | New cached output DB model. |
| cache_service/repository/interfaces/reservation.go | New reservation repo interface. |
| cache_service/repository/interfaces/repository.go | New repository interface. |
| cache_service/repository/interfaces/cached_output.go | New cached output repo interface. |
| cache_service/repository/impl/reservation.go | New sqlx-based reservation repo implementation. |
| cache_service/repository/impl/cached_output.go | New sqlx-based cached output repo implementation. |
| cache_service/repository/errors/errors.go | New typed repository errors + helper predicates. |
| cache_service/migrations/sql/20260408110000_init_schema.sql | New initial schema migration for cache service tables/indexes. |
| cache_service/migrations/migrations.go | New embedded migrations runner for cache service. |
| cache_service/manager/manager_test.go | New manager tests (Put/Get + reservation behavior). |
| cache_service/manager/main_test.go | New TestMain provisioning DB and running migrations. |
| cache_service/config/config.go | New cache service config schema + defaults. |
| cache_service/cmd/main.go | New cache-service binary wiring (DB, datastore, metrics keys). |
| buf.yaml | New Buf workspace/module configuration. |
| buf.gen.ts.yaml | New Buf generation config for TypeScript. |
| buf.gen.rust.yaml | New Buf generation config for Rust. |
| buf.gen.python.yaml | New Buf generation config for Python. |
| buf.gen.go.yaml | New Buf generation config for Go (incl gateway/openapi plugins). |
| boilerplate/flyte/golang_test_targets/download_tooling.sh | Upgraded mockery tool to v3. |
| boilerplate/flyte/golang_support_tools/tools.go | Updated tools import path for mockery v3. |
| assets/contributor-template.md | Removed contributor template. |
| actions/setup.go | New setup wiring for ActionsService + watcher lifecycle. |
| actions/service/interfaces.go | New ActionsClientInterface definition. |
| actions/config/config.go | New actions-service configuration schema + defaults. |
| actions/cmd/main.go | New actions-service binary wiring (k8s client, host/port). |
| SECURITY.md | Removed Security policy document. |
| RELEASE.md | Removed release process document. |
| Dockerfile.flytescheduler | Removed flytescheduler Dockerfile. |
| Dockerfile.flytepropeller | Removed flytepropeller Dockerfile. |
| Dockerfile.flytecopilot | Removed flytecopilot Dockerfile. |
| Dockerfile.flyteadmin | Removed flyteadmin Dockerfile. |
| Dockerfile.datacatalog | Removed datacatalog Dockerfile. |
| Dockerfile | Updated build base image/version and changed build inputs/target. |
| CODE_OF_CONDUCT.md | Removed code of conduct reference file. |
| CODEOWNERS | Replaced docs-only owners with default org/team owners. |
| CHANGELOG/README.md | Removed changelog index file. |
| CHANGELOG/CHANGELOG-v1.7.0.md | Removed changelog entry. |
| CHANGELOG/CHANGELOG-v1.6.1.md | Removed changelog entry. |
| CHANGELOG/CHANGELOG-v1.6.0-b1.md | Removed changelog entry. |
| CHANGELOG/CHANGELOG-v1.5.0.md | Removed changelog entry. |
| CHANGELOG/CHANGELOG-v1.5.0-a0.md | Removed changelog entry. |
| CHANGELOG/CHANGELOG-v1.4.3.md | Removed changelog entry. |
| CHANGELOG/CHANGELOG-v1.4.2.md | Removed changelog entry. |
| CHANGELOG/CHANGELOG-v1.4.1.md | Removed changelog entry. |
| CHANGELOG/CHANGELOG-v1.4.0.md | Removed changelog entry. |
| CHANGELOG/CHANGELOG-v1.4.0-b0.md | Removed changelog entry. |
| CHANGELOG/CHANGELOG-v1.3.0-b9.md | Removed changelog entry. |
| CHANGELOG/CHANGELOG-v1.3.0-b8.md | Removed changelog entry. |
| CHANGELOG/CHANGELOG-v1.3.0-b7.md | Removed changelog entry. |
| CHANGELOG/CHANGELOG-v1.3.0-b6.md | Removed changelog entry. |
| CHANGELOG/CHANGELOG-v1.3.0-b4.md | Removed changelog entry. |
| CHANGELOG/CHANGELOG-v1.3.0-b3.md | Removed changelog entry. |
| CHANGELOG/CHANGELOG-v1.3.0-b2.md | Removed changelog entry. |
| CHANGELOG/CHANGELOG-v1.3.0-b1.md | Removed changelog entry. |
| CHANGELOG/CHANGELOG-v1.2.0.md | Removed changelog entry. |
| CHANGELOG/CHANGELOG-v1.2.0-b5.md | Removed changelog entry. |
| CHANGELOG/CHANGELOG-v1.2.0-b4.md | Removed changelog entry. |
| CHANGELOG/CHANGELOG-v1.2.0-b3.md | Removed changelog entry. |
| CHANGELOG/CHANGELOG-v1.2.0-b2.md | Removed changelog entry. |
| CHANGELOG/CHANGELOG-v1.2.0-b1.md | Removed changelog entry. |
| CHANGELOG/CHANGELOG-v1.16.0-b4.md | Removed changelog entry. |
| CHANGELOG/CHANGELOG-v1.16.0-b3.md | Removed changelog entry. |
| CHANGELOG/CHANGELOG-v1.16.0-b2.md | Removed changelog entry. |
| CHANGELOG/CHANGELOG-v1.16.0-b1.md | Removed changelog entry. |
| CHANGELOG/CHANGELOG-v1.16.0-b0.md | Removed changelog entry. |
| CHANGELOG/CHANGELOG-v1.15.3.md | Removed changelog entry. |
| CHANGELOG/CHANGELOG-v1.15.2.md | Removed changelog entry. |
| CHANGELOG/CHANGELOG-v1.14.1.md | Removed changelog entry. |
| CHANGELOG/CHANGELOG-v1.13.1-rc1.md | Removed changelog entry. |
| CHANGELOG/CHANGELOG-v1.13.0-rc0.md | Removed changelog entry. |
| CHANGELOG/CHANGELOG-v1.12.1-rc0.md | Removed changelog entry. |
| CHANGELOG/CHANGELOG-v1.11.1-b0.md | Removed changelog entry. |
| CHANGELOG/CHANGELOG-v1.11.0.md | Removed changelog entry. |
| CHANGELOG/CHANGELOG-v1.11.0-b1.md | Removed changelog entry. |
| CHANGELOG/CHANGELOG-v1.11.0-b0.md | Removed changelog entry. |
| CHANGELOG/CHANGELOG-v1.10.7-b4.md | Removed changelog entry. |
| CHANGELOG/CHANGELOG-v1.10.7-b3.md | Removed changelog entry. |
| CHANGELOG/CHANGELOG-v1.10.7-b2.md | Removed changelog entry. |
| CHANGELOG/CHANGELOG-v1.10.7-b1.md | Removed changelog entry. |
| CHANGELOG/CHANGELOG-v1.10.7-b0.md | Removed changelog entry. |
| CHANGELOG/CHANGELOG-v1.10.6-b0.md | Removed changelog entry. |
| CHANGELOG/CHANGELOG-v1.10.0-b0.md | Removed changelog entry. |
| CHANGELOG/CHANGELOG-v1.1.0.md | Removed changelog entry. |
| CHANGELOG/CHANGELOG-v1.1.0-b1.md | Removed changelog entry. |
| CHANGELOG/CHANGELOG-v1.0.2.md | Removed changelog entry. |
| CHANGELOG/CHANGELOG-v1.0.2-b2.md | Removed changelog entry. |
| CHANGELOG/CHANGELOG-v1.0.2-b1.md | Removed changelog entry. |
| CHANGELOG/CHANGELOG-v1.0.1.md | Removed changelog entry. |
| CHANGELOG/CHANGELOG-v1.0.0.md | Removed changelog entry. |
| CHANGELOG/CHANGELOG-v1.0.0-b1.md | Removed changelog entry. |
| CHANGELOG/CHANGELOG-v0.9.0.md | Removed changelog entry. |
| CHANGELOG/CHANGELOG-v0.8.0.md | Removed changelog entry. |
| CHANGELOG/CHANGELOG-v0.7.0.md | Removed changelog entry. |
| CHANGELOG/CHANGELOG-v0.6.0.md | Removed changelog entry. |
| CHANGELOG/CHANGELOG-v0.5.0.md | Removed changelog entry. |
| CHANGELOG/CHANGELOG-v0.4.0.md | Removed changelog entry. |
| CHANGELOG/CHANGELOG-v0.3.0.md | Removed changelog entry. |
| CHANGELOG/CHANGELOG-v0.2.0.md | Removed changelog entry. |
| CHANGELOG/CHANGELOG-v0.19.4.md | Removed changelog entry. |
| CHANGELOG/CHANGELOG-v0.19.3.md | Removed changelog entry. |
| CHANGELOG/CHANGELOG-v0.19.3-b3.md | Removed changelog entry. |
| CHANGELOG/CHANGELOG-v0.19.3-b2.md | Removed changelog entry. |
| CHANGELOG/CHANGELOG-v0.19.3-b1.md | Removed changelog entry. |
| CHANGELOG/CHANGELOG-v0.19.2.md | Removed changelog entry. |
| CHANGELOG/CHANGELOG-v0.19.2-b5.md | Removed changelog entry. |
| CHANGELOG/CHANGELOG-v0.19.2-b4.md | Removed changelog entry. |
| CHANGELOG/CHANGELOG-v0.19.2-b3.md | Removed changelog entry. |
| CHANGELOG/CHANGELOG-v0.19.2-b2.md | Removed changelog entry. |
| CHANGELOG/CHANGELOG-v0.19.1.md | Removed changelog entry. |
| CHANGELOG/CHANGELOG-v0.19.0.md | Removed changelog entry. |
| CHANGELOG/CHANGELOG-v0.18.2.md | Removed changelog entry. |
| CHANGELOG/CHANGELOG-v0.18.1.md | Removed changelog entry. |
| CHANGELOG/CHANGELOG-v0.18.0.md | Removed changelog entry. |
| CHANGELOG/CHANGELOG-v0.17.3.md | Removed changelog entry. |
| CHANGELOG/CHANGELOG-v0.17.3-b4.md | Removed changelog entry. |
| CHANGELOG/CHANGELOG-v0.17.3-b3.md | Removed changelog entry. |
| CHANGELOG/CHANGELOG-v0.17.3-b2.md | Removed changelog entry. |
| CHANGELOG/CHANGELOG-v0.17.3-b1.md | Removed changelog entry. |
| CHANGELOG/CHANGELOG-v0.17.2.md | Removed changelog entry. |
| CHANGELOG/CHANGELOG-v0.17.1.md | Removed changelog entry. |
| CHANGELOG/CHANGELOG-v0.17.0.md | Removed changelog entry. |
| CHANGELOG/CHANGELOG-v0.16.0.md | Removed changelog entry. |
| CHANGELOG/CHANGELOG-v0.15.1.md | Removed changelog entry. |
| CHANGELOG/CHANGELOG-v0.15.0.md | Removed changelog entry. |
| CHANGELOG/CHANGELOG-v0.14.0.md | Removed changelog entry. |
| CHANGELOG/CHANGELOG-v0.13.0.md | Removed changelog entry. |
| CHANGELOG/CHANGELOG-v0.12.0.md | Removed changelog entry. |
| CHANGELOG/CHANGELOG-v0.11.0.md | Removed changelog entry. |
| CHANGELOG/CHANGELOG-v0.10.0.md | Removed changelog entry. |
| .run/single-binary.run.xml | Removed IDE run configuration file. |
| .readthedocs.yml | Removed ReadTheDocs configuration. |
| .goreleaser.yml | Removed goreleaser configuration. |
| .github/workflows/validate-helm-charts.yaml | Removed helm chart validation workflow. |
| .github/workflows/upgrade_automation.yml | Removed boilerplate upgrade automation workflow. |
| .github/workflows/unit-tests.yml | Removed reusable unit test workflow. |
| .github/workflows/tests.yml | Removed legacy tests workflow. |
| .github/workflows/stale.yml | Removed stale issue/PR workflow. |
| .github/workflows/sandbox.yml | Removed sandbox build workflow. |
| .github/workflows/publish.yml | Removed reusable image publish workflow. |
| .github/workflows/publish-images.yml | Removed publish-all-images workflow. |
| .github/workflows/lint.yml | Removed reusable lint workflow. |
| .github/workflows/integration.yml | Removed integration tests workflow. |
| .github/workflows/helm-charts.yaml | Removed helm charts packaging workflow. |
| .github/workflows/go_generate.yml | Removed go generate verification workflow. |
| .github/workflows/generate_flyte_manifest.yml | Removed manifest generation workflow. |
| .github/workflows/flyteidl-release.yml | Removed flyteidl release workflow. |
| .github/workflows/flyteidl-checks.yml | Removed flyteidl checks workflow. |
| .github/workflows/flyteidl-buf-publish.yml | Removed Buf package publish workflow for flyteidl. |
| .github/workflows/flytectl-release.yml | Removed flytectl release workflow. |
| .github/workflows/flytectl-install.yml | Removed flytectl install script verification workflow. |
| .github/workflows/dependency-review.yml | Removed dependency review workflow. |
| .github/workflows/contributors.yaml | Removed contributors automation workflow. |
| .github/workflows/component_docker_build.yml | Removed component docker build workflow. |
| .github/workflows/codespell.yml | Removed codespell workflow. |
| .github/config.yml | Removed welcome-bot config. |
| .github/codespell-ignored-words | Removed codespell ignore list. |
| .github/actions/setup-python-env/action.yml | Added a composite action to set up Python+uv env. |
| .github/actions/clear-action-cache/action.yml | Removed clear-action-cache composite action. |
| .github/PULL_REQUEST_TEMPLATE.md | Added a git-town stack section placeholder. |
| .github/ISSUE_TEMPLATE/ui_feature_request.yaml | Removed UI feature request issue template. |
| .github/ISSUE_TEMPLATE/housekeeping_template.yaml | Removed housekeeping issue template. |
| .github/ISSUE_TEMPLATE/flytectl_issue.yaml | Removed flytectl feature request issue template. |
| .github/ISSUE_TEMPLATE/feature_request.yaml | Removed core feature request issue template. |
| .github/ISSUE_TEMPLATE/docs_issue.yaml | Removed docs issue template. |
| .github/ISSUE_TEMPLATE/bug_report.yaml | Removed bug report issue template. |
| .github/ISSUE_TEMPLATE/backend-plugin-request.yaml | Removed plugin request issue template. |
| .gitattributes | Updated generated-file patterns to gen/** and mocks. |
| .dockerignore | Expanded dockerignore to exclude git/CI/generated/deps/IDE artifacts. |
| .github/workflows/regenerate-on-comment.yml | Added workflow to regenerate code on PR comment. |
| .github/workflows/publish-rust.yml | Added workflow to publish Rust crate on tags. |
| .github/workflows/publish-python.yml | Added workflow to publish Python package on tags (+ PR validation). |
| .github/workflows/publish-npm.yml | Added workflow to publish TypeScript package on tags. |
| .github/workflows/go-tests.yml | Added matrix Go unit test workflow with coverage artifact upload. |
| .github/workflows/git_town.yml | Added workflow to display git-town branch stacks in PRs. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…logKeys The shared interceptor chain in Union Cloud sets context values using v1 contextutils.Key types, but v2 services (actions, leaseworker, leasor, events-proxy, executorv2) use the v2 logger which reads v2 contextutils.Key. Both are `type Key string` but are different Go types, so context.Value() lookups fail silently and all context-propagated log fields are missing from v2 service logs. Add OrganizationKey, ServiceNameKey, and ClusterNameKey constants to v2 contextutils, and expand logKeys with ProjectKey, DomainKey, and the three new keys so that GetLogFields() includes them in structured log output. This is one half of the fix — the other half is a context bridge interceptor in the cloud repo that copies v1 values onto v2 keys at request time. Assisted-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Signed-off-by: Sergey Vilgelm <sergey@union.ai>
8f55bb8 to
3e0652f
Compare
1f9a99f to
1bc5683
Compare
Why are the changes needed?
The shared interceptor chain in Union Cloud sets context values using v1
contextutils.Keytypes, but v2 services (actions, leaseworker, leasor,events-proxy, executorv2) use the v2 logger which reads v2
contextutils.Key.Both are
type Key stringbut are different Go types —context.Value()requires exact type match, so all context-propagated log fields (x-request-id,
exec_id, org, project, domain, etc.) are missing from v2 service logs.
What changes were proposed in this pull request?
contextutils:OrganizationKey("org"),ServiceNameKey("service_name"),ClusterNameKey("cluster_id")logKeysarray with 5 entries:ProjectKey,DomainKey,OrganizationKey,ServiceNameKey,ClusterNameKeyGetLogFields()includes these fields in structured log outputThis is one half of the fix — the other half is a v1→v2 context bridge
interceptor in the cloud repo that copies v1 values onto v2 keys at request time.
How was this patch tested?
TestGetFieldsto verify all new keys appear inGetLogFields()outputLabels
changed: Expands v2 contextutils log key coverage
All new and existing tests passed.
All commits are signed-off.
🤖 Generated with Claude Code
main