Skip to content

fix executor sidecar#574

Closed
kaixi-wang wants to merge 93 commits into
release/v2.19.0from
kacey/fix-executor-sidecar
Closed

fix executor sidecar#574
kaixi-wang wants to merge 93 commits into
release/v2.19.0from
kacey/fix-executor-sidecar

Conversation

@kaixi-wang

Copy link
Copy Markdown
Member

Rationale

Review Priority

  • high
  • medium
  • low

Changes

Checklist

  • This PR maintains parity between Docker Compose and Helm

Testing

kaixi-wang and others added 30 commits May 21, 2026 14:13
…v2.19.0-rc.5 api:v2.19.0rc6 app:v2.19.0rc6 cas:v2.19.0-rc.5
Add an opt-in escape hatch for operators running managed Redis
(ElastiCache, MemoryStore, etc.) or an existing shared Redis. When
`telemetry.redis.external.url` is set, the chart skips the bundled
Redis `Deployment`/`Service`/`PersistentVolumeClaim` and wires both
consumer workloads and auto-injected sidecars at the external URL.

Threads through a new `telemetry.redis.url` helper that returns either
the external URL or the in-cluster `redis://<release>-telemetry-redis`
URL, replacing the inline `printf` previously used in two places.

Tests in tests/unit/helm/telemetry-redis_test.go cover: bundled Redis
NOT rendered when external.url set; api deployment env var points at the
external URL on every container (workload + sidecar); the default
release-scoped URL still wires correctly.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Replace the single `telemetry.redis.storage` knob with a
`telemetry.redis.persistence` block:

- `persistence.enabled` (default `true`) — when `false`, skip the PVC
  and run Redis on an `emptyDir`. State is lost on pod restart; intended
  for dev/minikube clusters without a dynamic PV provisioner.
- `persistence.size` — replaces `storage`. Same default (`1Gi`).
- `persistence.storageClass` — passed through to the PVC. Leave unset
  to use the cluster's default `StorageClass`.

Tests added: PVC has the expected `storageClassName` when set;
`persistence.enabled=false` skips the PVC and the Deployment switches
the `redis-data` volume to `emptyDir`.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
The delegated-operator workload containers and DO Job templates were
still building `FIFTYONE_TELEMETRY_REDIS_URL` inline via
`printf "redis://%s:6379" (include "telemetry.redis.name" .ctx)`,
bypassing the `telemetry.redis.url` helper added in the external-Redis
commit. As a result, setting `telemetry.redis.external.url` correctly
pointed api/app/cas/plugins/teams-app at the external URL but left the
DO workloads pointing at the in-cluster Service.

Both sites now go through `telemetry.redis.url .ctx`.

Regression tests added to tests/unit/helm/telemetry-redis_test.go cover
both the DO deployment workload container and the DO Job ConfigMap.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
…v2.19.0-rc.6 api:v2.19.0rc7 app:v2.19.0rc7 cas:v2.19.0-rc.6
- pin sidecar image default to v0.1.62 (matches helm
  `telemetry.sidecar.image`); update unit-test expectations in lockstep
- add `TELEMETRY_REDIS_MAXMEMORY_POLICY` env knob (was hardcoded to
  `allkeys-lru`; now mirrors helm `telemetry.redis.maxmemoryPolicy`)
- add `deploy.resources` cpu/memory limits + reservations to telemetry
  Redis and every sidecar service to match the helm defaults
  (Redis: 0.25/512M lim, 0.10/256M res; sidecars: 0.10/512M)
- rewrite env.template telemetry section: drop stale
  `compose.telemetry.yaml overlay` reference (bundled by default since
  the sidecar work landed), document the new policy knob and the v0.1.62
  pin, and clarify when to override
- expand `docs/configuring-telemetry.md` with the new env var and a
  resource-limits table cross-referencing the helm defaults

Applies symmetrically to internal-auth and legacy-auth, including the
plugins / dedicated-plugins / delegated-operators / delegated-operators
GPU overlay variants.
…s.yaml

The docker README documents that `compose.plugins.yaml` and
`compose.dedicated-plugins.yaml` are used *instead of* `compose.yaml`
(not layered on top of it), which previously forced each of the three
base files to redefine `telemetry-redis`, `fiftyone-app-telemetry`, and
`teams-api-telemetry` verbatim. Bumping image tags or resource limits
meant editing the same block three times — and missing one would
silently desync the deployments.

Move the telemetry services into `common-services.yaml` with `-common`
suffixes (mirroring the existing pattern for `fiftyone-app-common`,
`teams-api-common`, etc.), then have each compose file pull them in
via `extends:`. Each child redeclares `depends_on` because compose's
`extends` intentionally does not propagate it.

The rendered `docker compose config` output is byte-identical to the
pre-refactor version for every combo across both auth flavors; this is
a pure structural cleanup with no runtime behavior change.

`compose.delegated-operators.gpu.yaml` keeps its standalone sidecar
definition: it's only used in one file, and the GPU device reservation
diverges enough from the regular DO sidecar to make `extends` more
trouble than it saves.
The default RollingUpdate strategy spins up a new pod before the old
one terminates, which fails with a Multi-Attach error on the RWO PVC.
Recreate serializes pod replacement so the volume can detach first.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
mo-getter and others added 19 commits May 26, 2026 16:04
The project-level `volumes:` block in compose.delegated-operators.yaml
now declares per-slot executor-socket volumes for `teams-do-2` and
`teams-do-3`, so they appear in `project.Volumes` regardless of which
`do-N` profile is active. Add them to the expected volume set in the
internal-auth and legacy-auth `TestVolumes/delegatedOperations`
cases.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Signed-off-by: Alan Smith <209585+mo-getter@users.noreply.github.com>
The integration tests asserted on the literal string
`Container <project>-<svc>-1  Started` (two spaces) emitted by older
Docker Compose CLI versions. Compose v5.x emits a single space, so
the `s.Contains` check fails for every service even though `up`
succeeded — surfacing as a parent FAIL on every TestDockerComposeUp
case while leaf log assertions still PASS. Switch to `s.Regexp` with
`\s+` so the assertion matches both formats.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…v2.19.0-rc.13 api:v2.19.0rc14 app:v2.19.0rc14 cas:v2.19.0-rc.13
…1000

Same-UID fast path through ptrace_may_access() lets the sidecar tail
/proc/<pid>/fd/1 without DAC_READ_SEARCH, matching the common sidecar
definitions already on this branch.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…v2.19.0-rc.14 api:v2.19.0rc15 app:v2.19.0rc15 cas:v2.19.0-rc.14
…v2.19.0-rc.15 api:v2.19.0rc16 app:v2.19.0rc16 cas:v2.19.0-rc.15
@kaixi-wang kaixi-wang self-assigned this May 27, 2026
@kaixi-wang kaixi-wang requested a review from a team as a code owner May 27, 2026 06:53
@coderabbitai

coderabbitai Bot commented May 27, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Important

Review skipped

Auto incremental reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: ee95191f-5830-488b-8e30-0aa386880676

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Walkthrough

This PR introduces comprehensive telemetry sidecar support for FiftyOne Enterprise v2.19.0+, spanning Docker Compose and Kubernetes Helm deployments. Changes include telemetry documentation, Helm template implementation, Docker environment configuration, and extensive test coverage ensuring telemetry is injected and configured correctly across all deployment scenarios.

Changes

Telemetry Feature Implementation and Testing

Layer / File(s) Summary
Telemetry Feature Documentation
docker/README.md, docker/docs/configuring-telemetry.md, docker/docs/configuring-delegated-operators.md, docker/docs/configuring-gpu-workloads.md, docker/docs/upgrading.md, helm/docs/upgrading.md, docs/orchestrators/configuring-kubernetes-orchestrator.md
Comprehensive documentation of the telemetry sidecar architecture introduced in v2.19.0, including default deployment, configuration options, delegated-operator scaling via Compose profiles (replacing the deprecated FIFTYONE_DELEGATED_OPERATOR_WORKER_REPLICAS), GPU telemetry support, opt-out procedures, and Kubernetes native sidecar patterns.
Helm Chart Telemetry Templates
helm/fiftyone-teams-app/templates/_telemetry.tpl, helm/fiftyone-teams-app/templates/_helpers.tpl, helm/fiftyone-teams-app/templates/_do_targets.tpl, helm/fiftyone-teams-app/templates/NOTES.txt, helm/fiftyone-teams-app/README.md
New _telemetry.tpl template file defining Redis configuration, sidecar container specs (standard and native Kubernetes variants), RBAC role/binding helpers, and environment variable rendering. Updates to _helpers.tpl inject telemetry Redis URL and socket paths into API, app, plugins, and delegated-operator workload environments. README documents new telemetry values and pod security context defaults.
Docker Configuration and Environment Templates
docker/internal-auth/env.template, docker/legacy-auth/env.template, tests/fixtures/docker/integration_*.env
Removes legacy FIFTYONE_DELEGATED_OPERATOR_WORKER_REPLICAS variable and replaces it with Compose-profile-based worker slot documentation. Adds new telemetry configuration section with optional environment variables for Redis URL/image, telemetry namespace, and per-service target-name matching. Integration test fixtures updated to v2.19.0rc16.
Helm Test Infrastructure and Helpers
tests/unit/helm/yaml_helpers.go, tests/unit/helm/common_test.go, tests/unit/helm/telemetry-redis_test.go, tests/unit/helm/telemetry-rolebinding_test.go, tests/unit/helm/telemetry-sidecar_test.go
New disableTelemetry and splitYAMLDocs helper functions for test infrastructure. Expanded build tags in common_test.go. Four new comprehensive test suites validating telemetry Redis deployment/PVC/persistence, RBAC Role/RoleBinding generation, and sidecar injection with security context validation.
Existing Helm Test Updates
tests/unit/helm/api-deployment_test.go, tests/unit/helm/api-role_test.go, tests/unit/helm/app-deployment_test.go, tests/unit/helm/delegated-operator-instance-deployment_test.go, tests/unit/helm/delegated-operator-job-configmap_test.go, tests/unit/helm/plugins-deployment_test.go, tests/unit/helm/teams-app-deployment_test.go
Systematic updates across 25+ test methods to wrap Helm values with disableTelemetry(...) to verify telemetry injection logic. Updated pod security context assertions to expect explicit non-root UID/GID defaults (1000). New telemetry socket injection test added to delegated-operator instance deployment.
Docker Compose Configuration and Test Updates
tests/unit/compose/docker-compose-internal-auth_test.go, tests/unit/compose/docker-compose-legacy-auth_test.go, tests/integration/compose/docker-compose-internal-auth_test.go, tests/integration/compose/docker-compose-legacy-auth_test.go
Extended unit tests to validate telemetry service names, Redis image, telemetry environment variables, and socket volume mounts. Added Compose profiles support for delegated-operator GPU variants. Updated integration test log message expectations to match new service startup messages. Whitespace tolerance added to container startup assertions for Compose CLI version differences.
Deployment Script Updates
utils/bump-fixtures-helm.sh, utils/validate-docker-pulls.sh
Updated Helm fixture bump script to conditionally version telemetry sidecar image. Extended Docker pull validation to include docker.io/redis:7-alpine and voxel51/telemetry-sidecar images.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

  • voxel51/fiftyone-teams-app-deploy#571: Introduces telemetry documentation and delegated-operator scaling changes that align with this PR's telemetry and profile-based DO worker slot implementation.

Poem

🐰 Hops with joy at telemetry so bright,
Sidecars dancing, metrics taking flight!
Redis whispers secrets to the sky,
Observability—the rabbit's battle cry! 🎯✨

🚥 Pre-merge checks | ✅ 2 | ❌ 3

❌ Failed checks (2 warnings, 1 inconclusive)

Check name Status Explanation Resolution
Description check ⚠️ Warning The pull request description consists entirely of unfilled template sections with no substantive content provided in the Rationale, Changes, or Testing sections. All checkboxes remain unchecked and optional sections are empty. Complete all required sections: provide a clear rationale explaining the problem being addressed, detail the specific changes made, confirm the Docker Compose and Helm parity maintenance, and describe testing performed.
Docstring Coverage ⚠️ Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Title check ❓ Inconclusive The title "fix executor sidecar" is vague and overly generic. It does not clearly convey what the fix entails or which executor sidecar is being addressed, making it difficult for someone scanning the commit history to understand the primary change. Provide a more specific and descriptive title that clarifies the exact issue being fixed and its scope, such as "Fix executor sidecar telemetry configuration and security context" or similar.
✅ Passed checks (2 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch kacey/fix-executor-sidecar

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 4

🧹 Nitpick comments (3)
tests/unit/helm/telemetry-sidecar_test.go (2)

126-130: ⚡ Quick win

Make telemetry-off assertion strict for ShareProcessNamespace.

Line 126 currently allows an explicit false value, but the test description says the field should be unset when telemetry is off. Assert nil directly so regressions are caught precisely.

Proposed diff
-			if deployment.Spec.Template.Spec.ShareProcessNamespace != nil {
-				s.False(*deployment.Spec.Template.Spec.ShareProcessNamespace,
-					"shareProcessNamespace should not be true on %s when telemetry is disabled",
-					tc.template)
-			}
+			s.Nil(deployment.Spec.Template.Spec.ShareProcessNamespace,
+				"shareProcessNamespace should be unset on %s when telemetry is disabled",
+				tc.template)
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@tests/unit/helm/telemetry-sidecar_test.go` around lines 126 - 130, The test
currently uses s.False to check
deployment.Spec.Template.Spec.ShareProcessNamespace allowing an explicit false;
change the assertion to require the pointer be nil to enforce the field is unset
when telemetry is disabled. Locate the assertion referencing
deployment.Spec.Template.Spec.ShareProcessNamespace in telemetry-sidecar_test.go
and replace the s.False check with s.Nil on
deployment.Spec.Template.Spec.ShareProcessNamespace (keeping the same failure
message/context) so the test fails if the field is explicitly set to true or
false instead of being omitted.

183-194: ⚡ Quick win

Assert exact Capabilities.Add to avoid silent privilege creep.

Current checks only verify SYS_PTRACE presence/absence, so extra added capabilities could slip through unnoticed.

Proposed diff
-			var hasPtrace bool
-			for _, capability := range sc.Capabilities.Add {
-				if capability == "SYS_PTRACE" {
-					hasPtrace = true
-					break
-				}
-			}
 			if tc.executor {
-				s.True(hasPtrace, "executor sidecar must add SYS_PTRACE for py-spy crash archives")
+				s.Equal([]corev1.Capability{"SYS_PTRACE"}, sc.Capabilities.Add,
+					"executor sidecar should only add SYS_PTRACE")
 			} else {
-				s.False(hasPtrace, "service-mode sidecar must not add SYS_PTRACE")
+				s.Empty(sc.Capabilities.Add, "service-mode sidecar must not add capabilities")
 			}
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@tests/unit/helm/telemetry-sidecar_test.go` around lines 183 - 194, The test
currently only checks presence/absence of "SYS_PTRACE" by iterating over
sc.Capabilities.Add (using hasPtrace) which allows extra capabilities to be
added unnoticed; update the assertion to compare sc.Capabilities.Add exactly
against the expected slice for each case (when tc.executor true assert
sc.Capabilities.Add equals the exact expected list including "SYS_PTRACE", when
tc.executor false assert it equals the exact expected list without
"SYS_PTRACE"), using the test helper/assert method already in use so the test
fails if any unexpected capability is present.
tests/unit/helm/delegated-operator-job-configmap_test.go (1)

698-726: ⚡ Quick win

Add a telemetry-disabled regression case for socket injection.

This table only validates telemetry-enabled paths. Please add a telemetry.enabled=false case expecting zero telemetry-socket volume/mount so unconditional injection regressions are caught.

Proposed test-case addition
 	testCases := []struct {
 		name      string
 		values    map[string]string
 		expectVol int // expected occurrences of telemetry-socket volume
 		expectMnt int // expected occurrences of telemetry-socket mount
 	}{
+		{
+			name: "doesNotInjectWhenTelemetryDisabled",
+			values: map[string]string{
+				"telemetry.enabled": "false",
+				"delegatedOperatorJobTemplates.jobs.cpuDefault.unused": "nil",
+			},
+			expectVol: 0,
+			expectMnt: 0,
+		},
 		{
 			name: "autoInjectsWhenUserHasNoTelemetrySocket",
 			values: map[string]string{
 				"telemetry.enabled": "true",
 				"delegatedOperatorJobTemplates.jobs.cpuDefault.unused": "nil",
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@tests/unit/helm/delegated-operator-job-configmap_test.go` around lines 698 -
726, Add a new test case in the testCases slice to cover telemetry-disabled
behavior: when "telemetry.enabled" is set to "false" (alongside existing keys
like "delegatedOperatorJobTemplates.jobs.cpuDefault.unused"), assert expectVol:
0 and expectMnt: 0 so the test verifies no automatic injection of the
"telemetry-socket" volume/mount; locate the testCases variable in
delegated-operator-job-configmap_test.go and add the new case (referencing the
existing field names expectVol, expectMnt, and keys under
delegatedOperatorJobTemplates) to prevent unconditional injection regressions.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docker/docs/configuring-gpu-workloads.md`:
- Around line 57-58: The example COMPOSE_PROFILES value
"COMPOSE_PROFILES=do-1,gpu" is invalid because profiles start at do-2; update
the inline example in the text that currently reads "worker profile (e.g.
`COMPOSE_PROFILES=do-1,gpu`)" to use a valid profile example such as
"`COMPOSE_PROFILES=gpu`" (or show alternatives "`COMPOSE_PROFILES=do-2,gpu`" /
"`COMPOSE_PROFILES=do-3,gpu`" when describing adding extra CPU worker slots) so
readers aren't guided to a non-existent profile.

In `@docker/docs/upgrading.md`:
- Around line 143-144: Fix the malformed Markdown emphasis by balancing the bold
markers around the service name and capability: ensure `teams-do` and the
capability are consistently emphasized (for example change the line to
"**`teams-do`** requires the `SYS_PTRACE` capability." or "**teams-do** requires
the **`SYS_PTRACE`** capability.") — update the text that mentions teams-do and
SYS_PTRACE so the asterisks/backticks are properly paired.

In `@helm/fiftyone-teams-app/templates/NOTES.txt`:
- Around line 7-14: The NOTES.txt warning currently only shows when
telemetry.redis.persistence.existingClaim is empty, but if
telemetry.redis.persistence.enabled is false the Redis volume is still ephemeral
even when existingClaim is set; update the Helm template condition to trigger
the warning whenever .Values.telemetry.enabled is true,
.Values.telemetry.redis.external.url is empty, and
.Values.telemetry.redis.persistence.enabled is false (i.e. remove the extra
check against .Values.telemetry.redis.persistence.existingClaim), so replace the
conditional using .Values.telemetry.redis.persistence.enabled/ existingClaim
with one that only checks (not .Values.telemetry.redis.persistence.enabled)
alongside the other predicates and keep the same warning text in the NOTES
block.

In `@tests/unit/helm/telemetry-redis_test.go`:
- Around line 139-147: The test currently only verifies
FIFTYONE_TELEMETRY_REDIS_URL when it is found; update the loop over
deployment.Spec.Template.Spec.Containers and container.Env to assert the env var
exists per container before comparing its value: for each container, set a found
flag when ev.Name == "FIFTYONE_TELEMETRY_REDIS_URL", after scanning
container.Env call s.True(found, "container %s must have
FIFTYONE_TELEMETRY_REDIS_URL", container.Name) and then assert ev.Value ==
expectedURL (or compare the stored value) to validate the value; reference the
container.Env, ev.Name, and FIFTYONE_TELEMETRY_REDIS_URL symbols to locate where
to add the presence check.

---

Nitpick comments:
In `@tests/unit/helm/delegated-operator-job-configmap_test.go`:
- Around line 698-726: Add a new test case in the testCases slice to cover
telemetry-disabled behavior: when "telemetry.enabled" is set to "false"
(alongside existing keys like
"delegatedOperatorJobTemplates.jobs.cpuDefault.unused"), assert expectVol: 0 and
expectMnt: 0 so the test verifies no automatic injection of the
"telemetry-socket" volume/mount; locate the testCases variable in
delegated-operator-job-configmap_test.go and add the new case (referencing the
existing field names expectVol, expectMnt, and keys under
delegatedOperatorJobTemplates) to prevent unconditional injection regressions.

In `@tests/unit/helm/telemetry-sidecar_test.go`:
- Around line 126-130: The test currently uses s.False to check
deployment.Spec.Template.Spec.ShareProcessNamespace allowing an explicit false;
change the assertion to require the pointer be nil to enforce the field is unset
when telemetry is disabled. Locate the assertion referencing
deployment.Spec.Template.Spec.ShareProcessNamespace in telemetry-sidecar_test.go
and replace the s.False check with s.Nil on
deployment.Spec.Template.Spec.ShareProcessNamespace (keeping the same failure
message/context) so the test fails if the field is explicitly set to true or
false instead of being omitted.
- Around line 183-194: The test currently only checks presence/absence of
"SYS_PTRACE" by iterating over sc.Capabilities.Add (using hasPtrace) which
allows extra capabilities to be added unnoticed; update the assertion to compare
sc.Capabilities.Add exactly against the expected slice for each case (when
tc.executor true assert sc.Capabilities.Add equals the exact expected list
including "SYS_PTRACE", when tc.executor false assert it equals the exact
expected list without "SYS_PTRACE"), using the test helper/assert method already
in use so the test fails if any unexpected capability is present.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 109c1fc3-63fb-4735-baa0-9aecf1d621a2

📥 Commits

Reviewing files that changed from the base of the PR and between 195cff9 and 33b488f.

⛔ Files ignored due to path filters (32)
  • docker/common-services.yaml is excluded by !**/*.yaml
  • docker/internal-auth/compose.dedicated-plugins.yaml is excluded by !**/*.yaml
  • docker/internal-auth/compose.delegated-operators.gpu.yaml is excluded by !**/*.yaml
  • docker/internal-auth/compose.delegated-operators.yaml is excluded by !**/*.yaml
  • docker/internal-auth/compose.plugins.yaml is excluded by !**/*.yaml
  • docker/internal-auth/compose.yaml is excluded by !**/*.yaml
  • docker/legacy-auth/compose.dedicated-plugins.yaml is excluded by !**/*.yaml
  • docker/legacy-auth/compose.delegated-operators.gpu.yaml is excluded by !**/*.yaml
  • docker/legacy-auth/compose.delegated-operators.yaml is excluded by !**/*.yaml
  • docker/legacy-auth/compose.plugins.yaml is excluded by !**/*.yaml
  • docker/legacy-auth/compose.yaml is excluded by !**/*.yaml
  • helm/fiftyone-teams-app/templates/api-deployment.yaml is excluded by !**/*.yaml
  • helm/fiftyone-teams-app/templates/api-role.yaml is excluded by !**/*.yaml
  • helm/fiftyone-teams-app/templates/app-deployment.yaml is excluded by !**/*.yaml
  • helm/fiftyone-teams-app/templates/delegated-operator-instance-deployment.yaml is excluded by !**/*.yaml
  • helm/fiftyone-teams-app/templates/delegated-operator-job-configmap.yaml is excluded by !**/*.yaml
  • helm/fiftyone-teams-app/templates/plugins-deployment.yaml is excluded by !**/*.yaml
  • helm/fiftyone-teams-app/templates/telemetry-redis-deployment.yaml is excluded by !**/*.yaml
  • helm/fiftyone-teams-app/templates/telemetry-redis-pvc.yaml is excluded by !**/*.yaml
  • helm/fiftyone-teams-app/templates/telemetry-redis-service.yaml is excluded by !**/*.yaml
  • helm/fiftyone-teams-app/templates/telemetry-role.yaml is excluded by !**/*.yaml
  • helm/fiftyone-teams-app/templates/telemetry-rolebinding.yaml is excluded by !**/*.yaml
  • helm/fiftyone-teams-app/values.schema.json is excluded by !**/*.json
  • helm/fiftyone-teams-app/values.yaml is excluded by !**/*.yaml
  • tests/fixtures/docker/compose.override.mongodb.yaml is excluded by !**/*.yaml
  • tests/fixtures/docker/compose.override.mongodb_do.yaml is excluded by !**/*.yaml
  • tests/fixtures/docker/compose.override.mongodb_plugins.yaml is excluded by !**/*.yaml
  • tests/fixtures/helm/integration_values.yaml is excluded by !**/*.yaml
  • tests/unit/helm/test_data/delegated-operator-job-configmap_test/expected-cpu-default-override-template-values.yaml is excluded by !**/*.yaml
  • tests/unit/helm/test_data/delegated-operator-job-configmap_test/expected-cpu-default.yaml is excluded by !**/*.yaml
  • tests/unit/helm/test_data/delegated-operator-job-configmap_test/expected-override-example-cascading-template.yaml is excluded by !**/*.yaml
  • tests/unit/helm/test_data/delegated-operator-job-configmap_test/expected-override-example-template.yaml is excluded by !**/*.yaml
📒 Files selected for processing (34)
  • docker/README.md
  • docker/docs/configuring-delegated-operators.md
  • docker/docs/configuring-gpu-workloads.md
  • docker/docs/configuring-telemetry.md
  • docker/docs/upgrading.md
  • docker/internal-auth/env.template
  • docker/legacy-auth/env.template
  • docs/orchestrators/configuring-kubernetes-orchestrator.md
  • helm/docs/upgrading.md
  • helm/fiftyone-teams-app/README.md
  • helm/fiftyone-teams-app/templates/NOTES.txt
  • helm/fiftyone-teams-app/templates/_do_targets.tpl
  • helm/fiftyone-teams-app/templates/_helpers.tpl
  • helm/fiftyone-teams-app/templates/_telemetry.tpl
  • tests/fixtures/docker/integration_internal_auth.env
  • tests/fixtures/docker/integration_legacy_auth.env
  • tests/integration/compose/docker-compose-internal-auth_test.go
  • tests/integration/compose/docker-compose-legacy-auth_test.go
  • tests/unit/compose/docker-compose-internal-auth_test.go
  • tests/unit/compose/docker-compose-legacy-auth_test.go
  • tests/unit/helm/api-deployment_test.go
  • tests/unit/helm/api-role_test.go
  • tests/unit/helm/app-deployment_test.go
  • tests/unit/helm/common_test.go
  • tests/unit/helm/delegated-operator-instance-deployment_test.go
  • tests/unit/helm/delegated-operator-job-configmap_test.go
  • tests/unit/helm/plugins-deployment_test.go
  • tests/unit/helm/teams-app-deployment_test.go
  • tests/unit/helm/telemetry-redis_test.go
  • tests/unit/helm/telemetry-rolebinding_test.go
  • tests/unit/helm/telemetry-sidecar_test.go
  • tests/unit/helm/yaml_helpers.go
  • utils/bump-fixtures-helm.sh
  • utils/validate-docker-pulls.sh

Comment on lines +57 to +58
worker profile (e.g. `COMPOSE_PROFILES=do-1,gpu`); see
[Configuring Telemetry](./configuring-telemetry.md#scaling-teams-do-with-telemetry)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Replace invalid do-1 profile example.

COMPOSE_PROFILES=do-1,gpu conflicts with the slot model documented elsewhere (slot 1 is always on; profiles start at do-2). This example can lead users to set a non-existent profile. Use gpu alone (or do-2,gpu / do-3,gpu when adding extra CPU worker slots).

Suggested doc fix
- worker profile (e.g. `COMPOSE_PROFILES=do-1,gpu`); see
+ worker profile (e.g. `COMPOSE_PROFILES=gpu`; or `COMPOSE_PROFILES=do-2,gpu`
+ to add a second CPU worker); see
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
worker profile (e.g. `COMPOSE_PROFILES=do-1,gpu`); see
[Configuring Telemetry](./configuring-telemetry.md#scaling-teams-do-with-telemetry)
worker profile (e.g. `COMPOSE_PROFILES=gpu`; or `COMPOSE_PROFILES=do-2,gpu`
to add a second CPU worker); see
[Configuring Telemetry](./configuring-telemetry.md#scaling-teams-do-with-telemetry)
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docker/docs/configuring-gpu-workloads.md` around lines 57 - 58, The example
COMPOSE_PROFILES value "COMPOSE_PROFILES=do-1,gpu" is invalid because profiles
start at do-2; update the inline example in the text that currently reads
"worker profile (e.g. `COMPOSE_PROFILES=do-1,gpu`)" to use a valid profile
example such as "`COMPOSE_PROFILES=gpu`" (or show alternatives
"`COMPOSE_PROFILES=do-2,gpu`" / "`COMPOSE_PROFILES=do-3,gpu`" when describing
adding extra CPU worker slots) so readers aren't guided to a non-existent
profile.

Comment thread docker/docs/upgrading.md
Comment on lines +143 to +144
1. **`teams-do` requires the **`SYS_PTRACE`** capability to allow the
telemetry agent to observe the target process.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Fix malformed Markdown emphasis in capability requirement.

The emphasis markers are unbalanced around SYS_PTRACE, which may render incorrectly in docs.

Suggested doc fix
-1. **`teams-do` requires the **`SYS_PTRACE`** capability to allow the
+1. **`teams-do` requires the `SYS_PTRACE` capability** to allow the
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
1. **`teams-do` requires the **`SYS_PTRACE`** capability to allow the
telemetry agent to observe the target process.
1. **`teams-do` requires the `SYS_PTRACE` capability** to allow the
telemetry agent to observe the target process.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docker/docs/upgrading.md` around lines 143 - 144, Fix the malformed Markdown
emphasis by balancing the bold markers around the service name and capability:
ensure `teams-do` and the capability are consistently emphasized (for example
change the line to "**`teams-do`** requires the `SYS_PTRACE` capability." or
"**teams-do** requires the **`SYS_PTRACE`** capability.") — update the text that
mentions teams-do and SYS_PTRACE so the asterisks/backticks are properly paired.

Comment on lines +7 to +14
{{- if and .Values.telemetry.enabled (not .Values.telemetry.redis.external.url) (not .Values.telemetry.redis.persistence.enabled) (not .Values.telemetry.redis.persistence.existingClaim) }}
[INFO] Telemetry Redis is running on an emptyDir volume (no PersistentVolumeClaim).
Long-term telemetry archives in MongoDB are unaffected, but the in-window
dashboard backscroll (~10 minutes of un-archived data) is lost if the
Redis pod restarts. To make telemetry survive Redis restarts, set
`telemetry.redis.persistence.enabled: true` (needs a working StorageClass
or `telemetry.redis.persistence.existingClaim` pointing at a pre-created PVC).
{{ end }}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Warn on effective emptyDir even when existingClaim is set.

At Line 7, the condition hides this warning when telemetry.redis.persistence.existingClaim is non-empty. But with telemetry.redis.persistence.enabled=false, existingClaim is ignored and Redis is still ephemeral, so operators can miss the data-loss warning.

Suggested fix
-{{- if and .Values.telemetry.enabled (not .Values.telemetry.redis.external.url) (not .Values.telemetry.redis.persistence.enabled) (not .Values.telemetry.redis.persistence.existingClaim) }}
+{{- if and .Values.telemetry.enabled (not .Values.telemetry.redis.external.url) (not .Values.telemetry.redis.persistence.enabled) }}
 [INFO]  Telemetry Redis is running on an emptyDir volume (no PersistentVolumeClaim).
         Long-term telemetry archives in MongoDB are unaffected, but the in-window
         dashboard backscroll (~10 minutes of un-archived data) is lost if the
         Redis pod restarts. To make telemetry survive Redis restarts, set
         `telemetry.redis.persistence.enabled: true` (needs a working StorageClass
-        or `telemetry.redis.persistence.existingClaim` pointing at a pre-created PVC).
+        or `telemetry.redis.persistence.existingClaim` pointing at a pre-created PVC).
 {{ end }}
🧰 Tools
🪛 LanguageTool

[style] ~7-~7: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...ues.telemetry.redis.external.url) (not .Values.telemetry.redis.persistence.enabled) (n...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[style] ~7-~7: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...emetry.redis.persistence.enabled) (not .Values.telemetry.redis.persistence.existingCla...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@helm/fiftyone-teams-app/templates/NOTES.txt` around lines 7 - 14, The
NOTES.txt warning currently only shows when
telemetry.redis.persistence.existingClaim is empty, but if
telemetry.redis.persistence.enabled is false the Redis volume is still ephemeral
even when existingClaim is set; update the Helm template condition to trigger
the warning whenever .Values.telemetry.enabled is true,
.Values.telemetry.redis.external.url is empty, and
.Values.telemetry.redis.persistence.enabled is false (i.e. remove the extra
check against .Values.telemetry.redis.persistence.existingClaim), so replace the
conditional using .Values.telemetry.redis.persistence.enabled/ existingClaim
with one that only checks (not .Values.telemetry.redis.persistence.enabled)
alongside the other predicates and keep the same warning text in the NOTES
block.

Comment on lines +139 to +147
for _, container := range deployment.Spec.Template.Spec.Containers {
for _, ev := range container.Env {
if ev.Name == "FIFTYONE_TELEMETRY_REDIS_URL" {
s.Equal(expectedURL, ev.Value,
"FIFTYONE_TELEMETRY_REDIS_URL on %s should be release-scoped in-cluster URL",
container.Name)
}
}
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Assert env var presence in each container before validating value.

At Line 139, this test only checks equality when FIFTYONE_TELEMETRY_REDIS_URL is found. If the env var is missing, the test still passes silently.

Suggested fix
  for _, container := range deployment.Spec.Template.Spec.Containers {
+    found := false
     for _, ev := range container.Env {
       if ev.Name == "FIFTYONE_TELEMETRY_REDIS_URL" {
+        found = true
         s.Equal(expectedURL, ev.Value,
           "FIFTYONE_TELEMETRY_REDIS_URL on %s should be release-scoped in-cluster URL",
           container.Name)
+        break
       }
     }
+    s.Require().True(found,
+      "FIFTYONE_TELEMETRY_REDIS_URL should be set on %s container", container.Name)
   }
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@tests/unit/helm/telemetry-redis_test.go` around lines 139 - 147, The test
currently only verifies FIFTYONE_TELEMETRY_REDIS_URL when it is found; update
the loop over deployment.Spec.Template.Spec.Containers and container.Env to
assert the env var exists per container before comparing its value: for each
container, set a found flag when ev.Name == "FIFTYONE_TELEMETRY_REDIS_URL",
after scanning container.Env call s.True(found, "container %s must have
FIFTYONE_TELEMETRY_REDIS_URL", container.Name) and then assert ev.Value ==
expectedURL (or compare the stored value) to validate the value; reference the
container.Env, ev.Name, and FIFTYONE_TELEMETRY_REDIS_URL symbols to locate where
to add the presence check.

@kaixi-wang

Copy link
Copy Markdown
Member Author

closing in favor of #566

@kaixi-wang kaixi-wang closed this May 27, 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.

4 participants