Skip to content

fix: use *int for audited jobs fields to preserve product defaults#89

Merged
ian-flores merged 1 commit intomainfrom
add-audited-jobs-support
Feb 19, 2026
Merged

fix: use *int for audited jobs fields to preserve product defaults#89
ian-flores merged 1 commit intomainfrom
add-audited-jobs-support

Conversation

@ian-flores
Copy link
Collaborator

Summary

  • Changes audited jobs int fields in WorkbenchRServerConfig to *int pointers so that unset fields are omitted from rserver.conf instead of being written as =0
  • This prevents the operator from overriding the product's built-in defaults (e.g., log-limit=10000, deletion-expiry=90, vanilla-required=1)
  • When a user explicitly sets a value (including 0), it is still written correctly

Test plan

  • TestWorkbenchConfig_AuditedJobs - verifies all explicitly set fields are written
  • TestWorkbenchConfig_AuditedJobsPartial - verifies nil *int fields are omitted from config output
  • TestSiteAuditedJobsConfiguration - verifies full config propagation with pointer types
  • TestSiteAuditedJobsPartialConfiguration - verifies unset fields are nil (not zero)

Audited jobs int fields in WorkbenchRServerConfig were plain int, causing
Go zero values (0) to be written to rserver.conf when not explicitly set.
This overrode product defaults (e.g. log-limit=10000, deletion-expiry=90).

Change to *int so nil fields are omitted from the config, letting the
product use its own built-in defaults.
@ian-flores ian-flores force-pushed the add-audited-jobs-support branch from 7487e66 to cf56d91 Compare February 18, 2026 21:25
@ian-flores ian-flores marked this pull request as ready for review February 18, 2026 21:37
@ian-flores ian-flores added this pull request to the merge queue Feb 19, 2026
Merged via the queue into main with commit 709e580 Feb 19, 2026
4 checks passed
@ian-flores ian-flores deleted the add-audited-jobs-support branch February 19, 2026 16:03
ian-flores pushed a commit that referenced this pull request Feb 19, 2026
## [1.11.2](v1.11.1...v1.11.2) (2026-02-19)

### Bug Fixes

* use *int for audited jobs fields to preserve product defaults ([#89](#89)) ([709e580](709e580))
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.

2 participants