Skip to content

[codex] Treat loadmodule config as restart-only#31

Merged
immanuel-peter merged 1 commit into
mainfrom
issue/internal-code-from-v0.2.2
Jul 6, 2026
Merged

[codex] Treat loadmodule config as restart-only#31
immanuel-peter merged 1 commit into
mainfrom
issue/internal-code-from-v0.2.2

Conversation

@immanuel-peter

@immanuel-peter immanuel-peter commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Treat Redis loadmodule directives as restart-only config in the instance reconciler.
  • Normalize Redis config keys before checking restart-only directives so loadmodule /path/to/module.so is handled correctly.
  • Add regression coverage for loadmodule keys with module arguments.
  • Bump the Helm chart/app version to 0.2.3 and add the changelog entry.
  • Ignore local docs/cache build artifacts and document the repo preference for sparse code comments.

Root Cause

spec.redis can represent module loading directives as keys that include arguments, such as loadmodule /usr/local/lib/redis/modules/redistimeseries.so. The reconciler previously checked restart-only config with the full key string, so argument-bearing loadmodule directives were not recognized as restart-only and could be sent through live CONFIG SET reconciliation.

Validation

  • make test
  • make lint
  • helm lint charts/redis-operator

@immanuel-peter
immanuel-peter force-pushed the issue/internal-code-from-v0.2.2 branch from fcd05d7 to 56681fe Compare July 6, 2026 22:06
@immanuel-peter
immanuel-peter marked this pull request as ready for review July 6, 2026 22:07
@cursor

cursor Bot commented Jul 6, 2026

Copy link
Copy Markdown

Bugbot is not enabled for your account, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 56681fe624

ℹ️ 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".

Comment on lines +447 to +451
directive := key
if i := strings.IndexAny(key, " \t"); i >= 0 {
directive = key[:i]
}
return restartKeys[directive]

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Normalize restart-only directive names before lookup

For clusters whose spec.redis uses valid Redis config casing or leading whitespace, such as LoadModule /usr/local/lib/redis/modules/rejson.so, this keeps directive as LoadModule and the lookup returns false. The pod's generated redis.conf can still load that module at startup, but the instance reconciler will try to apply the same directive via live CONFIG SET on every reconcile instead of skipping it, reintroducing the failure this change is meant to avoid for those inputs. Trim and lowercase the directive before checking restartKeys.

Useful? React with 👍 / 👎.

@immanuel-peter
immanuel-peter merged commit d830cfb into main Jul 6, 2026
9 checks passed
@immanuel-peter
immanuel-peter deleted the issue/internal-code-from-v0.2.2 branch July 6, 2026 22:36
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.

1 participant