Skip to content

Conversation

@CamronStaley
Copy link
Contributor

@CamronStaley CamronStaley commented Dec 15, 2025

Rationale

Parity with these changes: https://github.com/voxel51/voxel-hub/pull/2009

Changes

Remove documentation for the old "days" environment variable and replace it with the new "legacy" env var.

Checklist

  • This PR maintains parity between Docker Compose and Helm

Testing

unit tests

Notes

This feature will be released in the next release. Once the release branch is made, we will update the target branch.

@CamronStaley CamronStaley self-assigned this Dec 15, 2025
@CamronStaley CamronStaley requested a review from a team as a code owner December 15, 2025 18:00
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 15, 2025

Walkthrough

Environment variable configuration for delegated operation expiration handling has been refactored. The naming scheme shifts from generic duration concepts to explicit monitored and legacy (unmonitored) expiration controls, with corresponding updates to documentation and test assertions.

Changes

Cohort / File(s) Summary
Environment Variable Documentation
docker/README.md
Updated variable descriptions: removed FIFTYONE_DO_EXPIRATION_DAYS and FIFTYONE_DO_EXPIRATION_MINUTES, added FIFTYONE_DO_LEGACY_EXPIRATION_MINUTES for unmonitored delegated operation timeout, and repurposed FIFTYONE_DO_EXPIRATION_MINUTES to describe monitored delegated operation timeout (30 minutes default) governing status reporting cadence.
Helm Test Assertions
tests/unit/helm/api-deployment_test.go
Updated test environment variable assertions in TestContainerEnv: renamed DO_EXPIRATION_DAYS to DO_EXPIRATION_MINUTES with value "30", and renamed DO_EXPIRATION_MINUTES to DO_LEGACY_EXPIRATION_MINUTES with empty value.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~5 minutes

  • Straightforward environmental variable renaming and semantic updates
  • Documentation and test assertions are parallel and consistent
  • No logic changes or complex interactions

Poem

🐰 A rabbit hops through config lands so fine,
Expiration timers, now with clearer line!
Monitored and legacy, each with their own pace,
No more confusion in the delegated space. ✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description check ✅ Passed The PR description provides clear rationale referencing upstream parity, describes changes, confirms Helm/Docker Compose parity, and mentions testing.
Title check ✅ Passed The title 'Add legacy DO expiration' directly corresponds to the main change: introducing FIFTYONE_DO_LEGACY_EXPIRATION_MINUTES and repurposing the expiration timeout semantics.

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

✨ Finishing touches
  • 📝 Generate docstrings

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

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
tests/unit/helm/api-deployment_test.go (1)

489-496: CRITICAL: Inconsistent environment variable names across test cases.

Only the overrideSecretName test case (lines 806-811) was updated with the new variable naming scheme (FIFTYONE_DO_EXPIRATION_MINUTES with value "30" and FIFTYONE_DO_LEGACY_EXPIRATION_MINUTES with empty value), but all other test cases still reference the old variable names (FIFTYONE_DO_EXPIRATION_DAYS and the old FIFTYONE_DO_EXPIRATION_MINUTES).

This inconsistency will cause tests to fail or validate incorrect behavior. All test cases in TestContainerEnv should be updated to use the new variable names and values to match the actual Helm chart behavior.

Apply this diff to update the remaining test cases:

 		{
 			"defaultValues", // legacy auth mode
 			nil,
 			func(envVars []corev1.EnvVar) {
 				expectedEnvVarJSON := `[
           ...
 		  {
-			"name": "FIFTYONE_DO_EXPIRATION_DAYS",
-			"value": "1"
+			"name": "FIFTYONE_DO_EXPIRATION_MINUTES",
+			"value": "30"
 		  },
 		  {
-			"name": "FIFTYONE_DO_EXPIRATION_MINUTES",
+			"name": "FIFTYONE_DO_LEGACY_EXPIRATION_MINUTES",
 			"value": ""
 		  },

Repeat this pattern for:

  • overrideEnv test case (lines 587-593)
  • internalAuthMode test case (lines 698-704)
  • overrideCasServiceNameAndPort test case (lines 902-908)
  • overrideExternalApiUrl test case (lines 998-1004)

Also applies to: 587-593, 698-704, 902-908, 998-1004

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 514c73a and 63a6cfc.

📒 Files selected for processing (2)
  • docker/README.md (1 hunks)
  • tests/unit/helm/api-deployment_test.go (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
  • GitHub Check: helm-unit / unit-helm
  • GitHub Check: helm-integration / integration-helm
  • GitHub Check: docker-pulls
  • GitHub Check: pre-commit
🔇 Additional comments (2)
tests/unit/helm/api-deployment_test.go (1)

806-811: LGTM: Correct variable renaming in this test case.

The environment variable updates in the overrideSecretName test case correctly reflect the new naming scheme:

  • FIFTYONE_DO_EXPIRATION_MINUTES now represents monitored delegated operation timeout (30 minutes)
  • FIFTYONE_DO_LEGACY_EXPIRATION_MINUTES represents unmonitored delegated operation timeout

However, ensure this same update is applied to all other test cases (see previous comment).

docker/README.md (1)

842-842: LGTM: Clear documentation for monitored delegated operations.

The updated description for FIFTYONE_DO_EXPIRATION_MINUTES clearly explains its purpose for monitored delegated operations and specifies the 30-minute default timeout. The distinction between monitored and unmonitored (legacy) operations is helpful.

| `FIFTYONE_DO_EXPIRATION_DAYS` | The amount of time in days that a delegated operation can run before being automatically terminated. Default is 1 day. | No |
| `FIFTYONE_DO_EXPIRATION_MINUTES` | The amount of time in minutes that a delegated operation can run before being automatically terminated. Default is `FIFTYONE_DO_EXPIRATION_DAYS` converted to minutes. If this field is provided it will override `FIFTYONE_DO_EXPIRATION_DAYS`. | No |
| `FIFTYONE_DO_EXPIRATION_MINUTES` | The amount of time in minutes that a monitored delegated operation can run without reporting its status before being automatically terminated. Default is 30 minutes. | No |
| `FIFTYONE_DO_LEGACY_EXPIRATION_MINUTES` | The amount of time in minutes that an unmonitored delegated operation can run before being automatically terminated. Default is `FIFTYONE_DO_EXPIRATION_DAYS` converted to minutes. If this field is provided it will override `FIFTYONE_DO_EXPIRATION_DAYS`. | No |
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Clarify the reference to undocumented FIFTYONE_DO_EXPIRATION_DAYS variable.

Line 843 references FIFTYONE_DO_EXPIRATION_DAYS in the description of FIFTYONE_DO_LEGACY_EXPIRATION_MINUTES, stating it can override that variable and is used as the default. However, FIFTYONE_DO_EXPIRATION_DAYS does not appear in the environment variables table, and the PR objectives indicate this variable should be removed from documentation.

Please clarify:

  1. If FIFTYONE_DO_EXPIRATION_DAYS is deprecated but still supported for backward compatibility, add a note explaining this and consider documenting it with a deprecation warning.
  2. If FIFTYONE_DO_EXPIRATION_DAYS is fully removed, update the description to remove references to it.

Consider this revision for line 843:

-| `FIFTYONE_DO_LEGACY_EXPIRATION_MINUTES`      | The amount of time in minutes that an unmonitored delegated operation can run before being automatically terminated. Default is `FIFTYONE_DO_EXPIRATION_DAYS` converted to minutes. If this field is provided it will override `FIFTYONE_DO_EXPIRATION_DAYS`.                  | No                        |
+| `FIFTYONE_DO_LEGACY_EXPIRATION_MINUTES`      | The amount of time in minutes that an unmonitored delegated operation can run before being automatically terminated. If not set, defaults to 1440 minutes (24 hours).                  | No                        |
🤖 Prompt for AI Agents
In docker/README.md around line 843, the description for
FIFTYONE_DO_LEGACY_EXPIRATION_MINUTES references an undocumented variable
FIFTYONE_DO_EXPIRATION_DAYS; update the docs to remove ambiguity by either (A)
if the days variable is deprecated-but-still-supported: add a one-line
deprecation note and document FIFTYONE_DO_EXPIRATION_DAYS with its default
behavior and warning that FIFTYONE_DO_LEGACY_EXPIRATION_MINUTES overrides it, or
(B) if the days variable is fully removed: delete the reference to
FIFTYONE_DO_EXPIRATION_DAYS and state the default explicitly (e.g., provide the
minute default or say it must be set), ensuring the description clearly states
that FIFTYONE_DO_LEGACY_EXPIRATION_MINUTES overrides any legacy setting.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

curious folk's thoughts on this. The reason I removed it is because we are only continuing to default to it for backwards compatibility in legacy orchestrators and the naming is confusing since it doesn't contain "legacy" like minutes does. I am open to adding it back with a "DEPRECATED" tag of some sort if people think that's the better approach.

Copy link
Contributor

Choose a reason for hiding this comment

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

idk if we have a way of deprecating things like that. You could add a small note to the upgrade guide for 2.XX?

Copy link
Contributor

Choose a reason for hiding this comment

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

We can consider keeping FIFTYONE_DO_EXPIRATION_DAYS documented in the table and in the description include a deprecated reference. We can also mention that the flag will be removed in X releases (at least 2).

Stuart makes a good point about including a note in the upgrade guide(s). We can instruct the user to replaced the deprecated with its replacement.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Okay updated lmk yalls thoughts

Copy link
Contributor

Choose a reason for hiding this comment

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

FWM

@CamronStaley CamronStaley requested a review from a team December 15, 2025 18:22
Copy link
Contributor

@kevin-dimichel kevin-dimichel left a comment

Choose a reason for hiding this comment

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

Is this PR intended to be merged upon the next release? The linked PRs were merged after the latest release.

@CamronStaley
Copy link
Contributor Author

@kevin-dimichel yes the intention is to get this merged with the next release of develop.

@kevin-dimichel kevin-dimichel changed the title Add legacy DO expiration feat: Add legacy DO expiration Jan 7, 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.

6 participants