feat(operator-wandb): configure artifact GC budget and task-row sharding - #677
feat(operator-wandb): configure artifact GC budget and task-row sharding#677zacharyblasczyk wants to merge 3 commits into
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: aef4a9cbc1
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| {{- if or (kindIs "bool" .Values.artifactsGc.EnableCheckpoint) (ne (toString .Values.artifactsGc.EnableCheckpoint) "") }} | ||
| GORILLA_ARTIFACTS_GC_ENABLE_CHECKPOINT: {{ .Values.artifactsGc.EnableCheckpoint | toString | quote }} | ||
| {{- end }} | ||
| {{- if .Values.artifactsGc.SkippedReadyCollectionIds }} | ||
| GORILLA_ARTIFACTS_GC_SKIPPED_READY_COLLECTION_IDS: {{ .Values.artifactsGc.SkippedReadyCollectionIds | quote }} |
There was a problem hiding this comment.
Add render coverage for the conditional GC values
The snapshots added here exercise only the default omitted path: no test config sets EnableCheckpoint or SkippedReadyCollectionIds. Consequently, the non-empty branches—and especially the supported boolean false override in this compound condition—can regress without any chart test detecting the rendered environment variables. Add focused render or snapshot cases covering boolean false, a non-empty string value, and a populated skip list.
AGENTS.md reference: AGENTS.md:L17-L20
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
🧹 Nitpick comments (1)
charts/operator-wandb/templates/glue.yaml (1)
33-35: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winName the tri-state checkpoint condition.
Extract the compound expression into a variable such as
$checkpointOverrideConfigured. The name makes the empty-string versus booleanfalsebehavior explicit.As per coding guidelines, give compound conditions a name when that name communicates intent better than the inline expression.
Suggested refactor
-{{- if or (kindIs "bool" .Values.artifactsGc.EnableCheckpoint) (ne (toString .Values.artifactsGc.EnableCheckpoint) "") }} +{{- $checkpointOverrideConfigured := or (kindIs "bool" .Values.artifactsGc.EnableCheckpoint) (ne (toString .Values.artifactsGc.EnableCheckpoint) "") }} +{{- if $checkpointOverrideConfigured }}🤖 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 `@charts/operator-wandb/templates/glue.yaml` around lines 33 - 35, In the Helm template condition guarding GORILLA_ARTIFACTS_GC_ENABLE_CHECKPOINT, assign the compound bool-or-nonempty check to a clearly named variable such as checkpointOverrideConfigured, then use that variable in the if statement while preserving the existing tri-state behavior.Source: Coding guidelines
🤖 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.
Nitpick comments:
In `@charts/operator-wandb/templates/glue.yaml`:
- Around line 33-35: In the Helm template condition guarding
GORILLA_ARTIFACTS_GC_ENABLE_CHECKPOINT, assign the compound bool-or-nonempty
check to a clearly named variable such as checkpointOverrideConfigured, then use
that variable in the if statement while preserving the existing tri-state
behavior.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 2788885e-034e-4999-b1ea-5c9388317356
⛔ Files ignored due to path filters (54)
test-configs/operator-wandb/__snapshots__/activity-store-disabled.snapis excluded by!**/*.snaptest-configs/operator-wandb/__snapshots__/activity-store-serve-backfill-off.snapis excluded by!**/*.snaptest-configs/operator-wandb/__snapshots__/azure-byob-access-key.snapis excluded by!**/*.snaptest-configs/operator-wandb/__snapshots__/azure-workload-identity-refs.snapis excluded by!**/*.snaptest-configs/operator-wandb/__snapshots__/azure-workload-identity.snapis excluded by!**/*.snaptest-configs/operator-wandb/__snapshots__/default.snapis excluded by!**/*.snaptest-configs/operator-wandb/__snapshots__/fmb.snapis excluded by!**/*.snaptest-configs/operator-wandb/__snapshots__/glue-leader-election.snapis excluded by!**/*.snaptest-configs/operator-wandb/__snapshots__/history-reader.snapis excluded by!**/*.snaptest-configs/operator-wandb/__snapshots__/historystore-parquet-grpc.snapis excluded by!**/*.snaptest-configs/operator-wandb/__snapshots__/historystore-parquet-only.snapis excluded by!**/*.snaptest-configs/operator-wandb/__snapshots__/keda-api-prometheus.snapis excluded by!**/*.snaptest-configs/operator-wandb/__snapshots__/keda-executor.snapis excluded by!**/*.snaptest-configs/operator-wandb/__snapshots__/keda-frfu.snapis excluded by!**/*.snaptest-configs/operator-wandb/__snapshots__/keda-parquet.snapis excluded by!**/*.snaptest-configs/operator-wandb/__snapshots__/local-bypass-no-app.snapis excluded by!**/*.snaptest-configs/operator-wandb/__snapshots__/local-bypass-with-app.snapis excluded by!**/*.snaptest-configs/operator-wandb/__snapshots__/mcp-server-empty-trace-url.snapis excluded by!**/*.snaptest-configs/operator-wandb/__snapshots__/mcp-server-external-trace.snapis excluded by!**/*.snaptest-configs/operator-wandb/__snapshots__/mcp-server-no-weave.snapis excluded by!**/*.snaptest-configs/operator-wandb/__snapshots__/mcp-server.snapis excluded by!**/*.snaptest-configs/operator-wandb/__snapshots__/no-local-bypass.snapis excluded by!**/*.snaptest-configs/operator-wandb/__snapshots__/oidc-secret-from-k8s.snapis excluded by!**/*.snaptest-configs/operator-wandb/__snapshots__/olap-features-enabled.snapis excluded by!**/*.snaptest-configs/operator-wandb/__snapshots__/olap-multi-feature.snapis excluded by!**/*.snaptest-configs/operator-wandb/__snapshots__/run-store-accelerator-run-updater.snapis excluded by!**/*.snaptest-configs/operator-wandb/__snapshots__/runs-v2-bufstream.snapis excluded by!**/*.snaptest-configs/operator-wandb/__snapshots__/snap-api-rate-limits.snapis excluded by!**/*.snaptest-configs/operator-wandb/__snapshots__/snap-ch-migration-job-no-olap.snapis excluded by!**/*.snaptest-configs/operator-wandb/__snapshots__/snap-ch-migration-job.snapis excluded by!**/*.snaptest-configs/operator-wandb/__snapshots__/snap-console-env-defaults.snapis excluded by!**/*.snaptest-configs/operator-wandb/__snapshots__/snap-console-env.snapis excluded by!**/*.snaptest-configs/operator-wandb/__snapshots__/snap-console-extraEnv.snapis excluded by!**/*.snaptest-configs/operator-wandb/__snapshots__/snap-enable-backfill.snapis excluded by!**/*.snaptest-configs/operator-wandb/__snapshots__/snap-image-digest-override.snapis excluded by!**/*.snaptest-configs/operator-wandb/__snapshots__/snap-image-tag-override.snapis excluded by!**/*.snaptest-configs/operator-wandb/__snapshots__/snap-lumen-aws.snapis excluded by!**/*.snaptest-configs/operator-wandb/__snapshots__/snap-lumen-azure.snapis excluded by!**/*.snaptest-configs/operator-wandb/__snapshots__/snap-lumen-gcp.snapis excluded by!**/*.snaptest-configs/operator-wandb/__snapshots__/snap-lumen-onprem-custom-bucket.snapis excluded by!**/*.snaptest-configs/operator-wandb/__snapshots__/snap-lumen-onprem-default-bucket.snapis excluded by!**/*.snaptest-configs/operator-wandb/__snapshots__/snap-mysql-cacert-inline.snapis excluded by!**/*.snaptest-configs/operator-wandb/__snapshots__/snap-no-oidc-settings-extra-cors.snapis excluded by!**/*.snaptest-configs/operator-wandb/__snapshots__/snap-oidc-settings-default.snapis excluded by!**/*.snaptest-configs/operator-wandb/__snapshots__/snap-oidc-settings-extra-cors.snapis excluded by!**/*.snaptest-configs/operator-wandb/__snapshots__/snap-priority-classes.snapis excluded by!**/*.snaptest-configs/operator-wandb/__snapshots__/snap-smtp-mail-from-secret.snapis excluded by!**/*.snaptest-configs/operator-wandb/__snapshots__/snap-smtp-mail-from.snapis excluded by!**/*.snaptest-configs/operator-wandb/__snapshots__/snap-tolerations-and-selectors.snapis excluded by!**/*.snaptest-configs/operator-wandb/__snapshots__/url-encoded-password.snapis excluded by!**/*.snaptest-configs/operator-wandb/__snapshots__/user-defined-clickhouse-secret.snapis excluded by!**/*.snaptest-configs/operator-wandb/__snapshots__/user-defined-secrets.snapis excluded by!**/*.snaptest-configs/operator-wandb/__snapshots__/weave-trace-with-worker.snapis excluded by!**/*.snaptest-configs/operator-wandb/__snapshots__/weave-trace.snapis excluded by!**/*.snap
📒 Files selected for processing (3)
charts/operator-wandb/Chart.yamlcharts/operator-wandb/templates/glue.yamlcharts/operator-wandb/values.yaml
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 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 `@charts/operator-wandb/values.yaml`:
- Around line 646-654: Add validation for the CollectionShardCount value in the
chart’s schema or template guard, allowing only 0 or integers from 2 through 32
and rejecting 1 and values outside that range. Add coverage for values 0, 1, 2,
32, and 33, preserving valid configuration rendering and preventing invalid
values from reaching the environment.
🪄 Autofix
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: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 3ffded90-2e62-4f12-ae29-cccd0eed129c
📒 Files selected for processing (3)
charts/operator-wandb/templates/glue.yamlcharts/operator-wandb/tests/artifacts_gc_env_test.yamlcharts/operator-wandb/values.yaml
Description
Companion to wandb/core#50429, this exposes the Helm values needed for fixed, independently scheduled Artifact GC task rows.
The final
artifactsGcsurface is:BatchSizeGORILLA_ARTIFACTS_GC_BATCH_SIZE0NumWorkersGORILLA_ARTIFACTS_GC_NUM_WORKERS0DeleteFilesNumWorkersGORILLA_ARTIFACTS_GC_DELETE_FILES_NUM_WORKERS0ObjectStoreConcurrencyBudgetGORILLA_ARTIFACTS_GC_OBJECT_STORE_CONCURRENCY_BUDGET0CollectionShardCountGORILLA_ARTIFACTS_GC_COLLECTION_SHARD_COUNT0All five values render unconditionally as quoted strings. The chart version is bumped from
0.44.5to0.44.6.CollectionShardCountsemantics are enforced by both the chart render guard and Core:0: preserve the existing task topology1: invalid2..32: activate or validate that many real task rowsSharded rows enable checkpointing internally. Checkpoint and incident-specific skip-list controls are deliberately not part of the public Helm surface.
Why
The earlier design fanned shards out inside one Glue invocation, which coupled all shard completion and checkpoint persistence to the slowest shard. Real task rows give each shard its own schedule, retry lifecycle, and ordinary checkpoint.
Worker counts and the object-store budget are per row. For example, four rows with
NumWorkers: 16andObjectStoreConcurrencyBudget: 16permit aggregate limits of 64 outer workers and 64 object-store operations.Proposed QA user spec:
Validation
0,1,2,32,33, negative, fractional, and string inputs.v3.20.1).Summary by CodeRabbit
New Features
Bug Fixes
Chores